Skip to content

Commit 111515a

Browse files
authored
Merge pull request hathach#1629 from jmark1m/master
Fix bug hathach#1628 by preventing shared irq slots for filling up
2 parents 7ba950c + 0931b52 commit 111515a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/portable/raspberrypi/rp2040/hcd_rp2040.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ bool hcd_init(uint8_t rhport)
380380
// Force VBUS detect to always present, for now we assume vbus is always provided (without using VBUS En)
381381
usb_hw->pwr = USB_USB_PWR_VBUS_DETECT_BITS | USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_BITS;
382382

383+
// Remove shared irq if it was previously added so as not to fill up shared irq slots
384+
irq_remove_handler(USBCTRL_IRQ, hcd_rp2040_irq);
385+
383386
irq_add_shared_handler(USBCTRL_IRQ, hcd_rp2040_irq, PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY);
384387

385388
// clear epx and interrupt eps

0 commit comments

Comments
 (0)