|
83 | 83 | EPX_CTRL_DEFAULT = EP_CTRL_ENABLE_BITS | EP_CTRL_INTERRUPT_PER_BUFFER | offsetof(usb_host_dpram_t, epx_data) |
84 | 84 | }; |
85 | 85 |
|
86 | | -//--------------------------------------------------------------------+ |
87 | 86 | //--------------------------------------------------------------------+ |
88 | 87 | // |
89 | 88 | //--------------------------------------------------------------------+ |
@@ -179,10 +178,10 @@ static void __tusb_irq_path_func(sie_start_xfer)(bool send_setup, bool is_rx, bo |
179 | 178 | } |
180 | 179 |
|
181 | 180 | // START_TRANS bit on SIE_CTRL has the same behavior as the AVAILABLE bit |
182 | | - // described in RP2040 Datasheet, release 2.1, section "4.1.2.5.1. Concurrent access". |
| 181 | + // described in RP2040 Datasheet, release 2.1, section "4.1.2.5.1. Concurrent access".! |
183 | 182 | // We write everything except the START_TRANS bit first, then wait some cycles. |
184 | 183 | usb_hw->sie_ctrl = sie_ctrl; |
185 | | - busy_wait_us(1); |
| 184 | + busy_wait_at_least_cycles(32); |
186 | 185 | usb_hw->sie_ctrl = sie_ctrl | USB_SIE_CTRL_START_TRANS_BITS; |
187 | 186 | } |
188 | 187 |
|
@@ -232,7 +231,7 @@ static void __tusb_irq_path_func(epx_save_context)(hw_endpoint_t *ep) { |
232 | 231 | static void __tusb_irq_path_func(epx_switch_ep)(hw_endpoint_t *ep) { |
233 | 232 | const bool is_setup = (ep->state == EPSTATE_PENDING_SETUP); |
234 | 233 |
|
235 | | - epx = ep; // switch pointer |
| 234 | + epx = ep; // switch pointer |
236 | 235 | ep->state = EPSTATE_ACTIVE; |
237 | 236 |
|
238 | 237 | if (is_setup) { |
@@ -350,7 +349,7 @@ static void __tusb_irq_path_func(hcd_rp2040_irq)(void) { |
350 | 349 | if (status & USB_INTS_HOST_CONN_DIS_BITS) { |
351 | 350 | // Clear speed latch first; after settle the re-read reflects the true current state. |
352 | 351 | usb_hw_clear->sie_status = USB_SIE_STATUS_SPEED_BITS; |
353 | | - busy_wait_us(1); |
| 352 | + busy_wait_at_least_cycles(32); |
354 | 353 | const uint8_t speed = dev_speed(); |
355 | 354 | if (speed == SIE_CTRL_SPEED_DISCONNECT) { |
356 | 355 | // Stop SIE and silence hardware before emitting remove. Concurrent |
|
0 commit comments