2016-02-25 06:02 PM
The processor is an STM32F373VC using STM32CubeMX generated code with the FREERTOS option enabled.
I have attempted to add the code: NVIC_PriorityGroupConfig( NVIC_PRIORITYGROUP_4 ); to the code in main.c as instructed in the red text on page: http://www.freertos.org/RTOS-Cortex-M3-M4.html (I had to figure out the argument must have all capital characters). and as instructed in the comment in line 221 in the file ''stm32f3xx_hal_cortex.c''. I cannot find the function NVIC_PriorityGroupConfig() defined anywhere, nor can the gcc compiler running in Ac6. Where is it?2024-03-29 05:40 PM - edited 2024-03-29 06:14 PM
Bumping this as we are running into this same issue 8 years later.
Latest version of Cube, using L476 as the processor with UART, USB, and the USB interrupt enabled. The FreeRTOS docs still call for a usage of NVIC_PriorityGroupConfig(); but this function is not generated by Cube nor is it in the core FreeRTOS kernel files. We did find this git repo that defined the function:
But this is a 3rd-party source (and is F4, not L4). Where is this file actually supposed to exist?
2024-03-29 07:05 PM - edited 2024-03-29 07:09 PM
Use NVIC_SetPriorityGrouping or HAL_NVIC_SetPriorityGrouping. As specified in CMSIS.
2024-03-29 07:24 PM
We did actually try HAL_NVIC_SetPriorityGrouping guessing that it performed a similar function. That left the code getting trapped in an assertion
configASSERT( ucMaxSysCallPriority );
in the port.c file, so we thought that HAL_NVIC_SetPriorityGrouping was likely incorrect (or was not the only thing required).
2024-03-30 12:14 PM - edited 2024-03-30 12:16 PM
The latter. Not the only thing required. FreeRTOS has certain requirement for the ucMaxSysCallPriority value. It is priority that must be encoded consistently with what HAL_NVIC_SetPriorityGrouping sets.
For best result please look at FreeRTOS examples in the Cube library packages for your STM32. Take some example, build, run.