Skip to content

Commit eabe052

Browse files
committed
ports/stm32: Fix TinyUSB interrupt handler RHPORT for HS controller.
Change OTG_HS_IRQHandler to call tud_int_handler(1) instead of tud_int_handler(0) to correctly route High-Speed USB interrupts to RHPORT 1. Previously, HS USB interrupts were incorrectly routed to RHPORT 0, causing device descriptor read failures during enumeration. Signed-off-by: Andrew Leech <[email protected]>
1 parent 7e5bb93 commit eabe052

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/stm32/stm32_it.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ void OTG_FS_IRQHandler(void) {
372372
void USB1_OTG_HS_IRQHandler(void) {
373373
IRQ_ENTER(USB1_OTG_HS_IRQn);
374374
#if MICROPY_HW_TINYUSB_STACK
375-
tud_int_handler(0);
375+
tud_int_handler(1); // RHPORT 1 for HS controller
376376
#else
377377
HAL_PCD_IRQHandler(&pcd_hs_handle);
378378
#endif
@@ -382,7 +382,7 @@ void USB1_OTG_HS_IRQHandler(void) {
382382
void OTG_HS_IRQHandler(void) {
383383
IRQ_ENTER(OTG_HS_IRQn);
384384
#if MICROPY_HW_TINYUSB_STACK
385-
tud_int_handler(0);
385+
tud_int_handler(1); // RHPORT 1 for HS controller
386386
#else
387387
HAL_PCD_IRQHandler(&pcd_hs_handle);
388388
#endif

0 commit comments

Comments
 (0)