cancel
Showing results for 
Search instead for 
Did you mean: 

Uses FreeRTOS functions checkbox in CubeMx

Posted on July 13, 2017 at 10:03

Hello there,

I am using CubeMx with FreeRTOS for a while now. I am still not sure how does the checkbox ''Uses FreeRTOS functions'' works under NVIC Configuration settings:

0690X00000607WyQAI.png

I would appreciate an explanation on what does this really do and what exactly are ''FreeRTOS functions''. I have noticed that interrupts generated in CubeMx sometimes get this checkbox checked automatically and sometimes not. I dont know what does it depend on.

#interrupts #freertos #cubemx
2 REPLIES 2
Tilen MAJERLE
ST Employee
Posted on July 14, 2017 at 11:38

Hello

Przenioslo.Lukasz

‌,

Please find quote from user manual:

When FreeRTOS is enabled, an additional column is shown (see Figure 84). In this case, all the interrupt service routines (ISRs) that are calling the interrupt safe FreeRTOS APIs, should have a priority lower than the priority defined in the LIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY parameter (the highest the value, the lowest the priority). The check in the corresponding checkbox guarantees that the restriction is applied.

If an ISR does not use such functions, the checkbox can be unchecked and any priority level can be set.

It is possible to check/uncheck multiple rows at a time (see rows highlighted in blue in Figure 84).

You can find this manual inside STM32CubeMX help.

Posted on July 14, 2017 at 11:45

Could you please explain me how does this kind of safe function looks like in the code? So far I have always been overriding the weak interrupt handlers, for example:

/**

  * @brief Rx Transfer completed callback.

  * @param huart: UART handle.

  * @retval None

  */

__weak void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)

{

  /* Prevent unused argument(s) compilation warning */

  UNUSED(huart);

  /* NOTE : This function should not be modified, when the callback is needed,

            the HAL_UART_RxCpltCallback can be implemented in the user file.

   */

}

How does those soft RTOS interrupts look like?