diff options
| author | Mengsk <[email protected]> | 2022-11-08 21:58:51 +0100 |
|---|---|---|
| committer | Mengsk <[email protected]> | 2022-11-08 21:58:51 +0100 |
| commit | da1589f116ede03dfe6a12968934640ebb4cd94a (patch) | |
| tree | dab4ed6113e5a2630298498852d488c3cac38cf2 | |
| parent | f3f3739073b46bc7609e4c55f50accbfb08e1807 (diff) | |
Fix FREERTOS USB IRQ priority.
| -rw-r--r-- | hw/bsp/stm32l4/family.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/bsp/stm32l4/family.c b/hw/bsp/stm32l4/family.c index 8b464f647..0b1443aa0 100644 --- a/hw/bsp/stm32l4/family.c +++ b/hw/bsp/stm32l4/family.c @@ -74,7 +74,11 @@ void board_init(void) SysTick_Config(SystemCoreClock / 1000); #elif CFG_TUSB_OS == OPT_OS_FREERTOS // If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher ) - //NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); +#if defined(USB_OTG_FS) + NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); +#else + NVIC_SetPriority(USB_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ); +#endif #endif /* Enable USB power on Pwrctrl CR2 register */ |
