Replies: 1 comment
-
yeah, it is not set on purpose since the priority of USB should be determined by application, if you follow the board_init() in tinyusb example, you will notice it is set when FreeRTOS is used https://github.com/hathach/tinyusb/blob/master/hw/bsp/stm32f4/family.c#L62 . This is purely application decision. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I came across this issue while porting to an ATSAMV71 microcontroller, as a vendor device, using FreeRTOS.
At L116 of the 0.15.0 version of dcd_samx7x.c CMSIS function
NVIC_EnableIRQ((IRQn_Type) ID_USBHS);
is called without the priority of this interrupt configured beforehand.The interrupt priorities on ARM Cortex M7 microcontrollers are all zero at reset. In ARM conventions, lower numbers are higher priority.
https://developer.arm.com/documentation/dui0646/c/Cortex-M7-Peripherals/Nested-Vectored-Interrupt-Controller?lang=en#Cihjdhda
Since the portable file for the dcd_samx7x microcontroller doesn't set the interrupt priority, it remains at the default reset value, 0 (highest). This priority is above (numerically below) the
ucMaxSysCallPriority
parameter checked in FreeRTOS invPortValidateInterruptPriority
in port.c whenconfigASSERT_DEFINED
is set. The assertion then holds execution in an infinite loop and the application cannot proceed with normal execution.Library users could remedy this issue by either modifying their portable mcu dcd_XXXX.c file or by invoking
NVIC_SetPriority
with a FreeRTOS compatible priority in their implementation ofbsp_init()
or equivalent application code.Beta Was this translation helpful? Give feedback.
All reactions