Fix FREERTOS USB IRQ priority.

This commit is contained in:
Mengsk 2022-11-08 21:58:51 +01:00
parent f3f3739073
commit da1589f116
1 changed files with 5 additions and 1 deletions

View File

@ -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 */