Skip to content

Commit

Permalink
Merge pull request hathach#1629 from jmark1m/master
Browse files Browse the repository at this point in the history
Fix bug hathach#1628 by preventing shared irq slots for filling up
  • Loading branch information
hathach authored Sep 13, 2022
2 parents 7ba950c + 0931b52 commit 111515a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/portable/raspberrypi/rp2040/hcd_rp2040.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ bool hcd_init(uint8_t rhport)
// Force VBUS detect to always present, for now we assume vbus is always provided (without using VBUS En)
usb_hw->pwr = USB_USB_PWR_VBUS_DETECT_BITS | USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_BITS;

// Remove shared irq if it was previously added so as not to fill up shared irq slots
irq_remove_handler(USBCTRL_IRQ, hcd_rp2040_irq);

irq_add_shared_handler(USBCTRL_IRQ, hcd_rp2040_irq, PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY);

// clear epx and interrupt eps
Expand Down

0 comments on commit 111515a

Please sign in to comment.