File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ void dcd_int_handler(uint8_t rhport)
765765 if ( tu_bit_test (int_status , USBD_INTEN_ENDEPOUT0_Pos + epnum ))
766766 {
767767 xfer_td_t * xfer = get_td (epnum , TUSB_DIR_OUT );
768- uint8_t const xact_len = NRF_USBD -> EPOUT [epnum ].AMOUNT ;
768+ uint16_t const xact_len = NRF_USBD -> EPOUT [epnum ].AMOUNT ;
769769
770770 xfer -> buffer += xact_len ;
771771 xfer -> actual_len += xact_len ;
Original file line number Diff line number Diff line change @@ -385,6 +385,9 @@ bool hcd_init(uint8_t rhport)
385385 // Force VBUS detect to always present, for now we assume vbus is always provided (without using VBUS En)
386386 usb_hw -> pwr = USB_USB_PWR_VBUS_DETECT_BITS | USB_USB_PWR_VBUS_DETECT_OVERRIDE_EN_BITS ;
387387
388+ // Remove shared irq if it was previously added so as not to fill up shared irq slots
389+ irq_remove_handler (USBCTRL_IRQ , hcd_rp2040_irq );
390+
388391 irq_add_shared_handler (USBCTRL_IRQ , hcd_rp2040_irq , PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY );
389392
390393 // clear epx and interrupt eps
Original file line number Diff line number Diff line change 6464
6565 // NOTE: H7 with only 1 USB port: H72x / H73x / H7Ax / H7Bx
6666 // USB_OTG_FS_PERIPH_BASE and OTG_FS_IRQn not defined
67+ #if (! defined USB2_OTG_FS )
68+ #define USB_OTG_FS_PERIPH_BASE USB1_OTG_HS_PERIPH_BASE
69+ #define OTG_FS_IRQn OTG_HS_IRQn
70+ #endif
6771
6872#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
6973 #include "stm32f7xx.h"
You can’t perform that action at this time.
0 commit comments