2019-01-11 01:00 AM
I have configured TIM1 as SysTick().
I noticed that the function
void SysTick_Handler(void)
is no mode generated in stm32f7xx_it.c. Why?
According to the UM1718 (DocID025776 Rev 21) pag. 90, "SysTick_Handler calls osSystickHandler when FreeRTOS is used" and it is exactly what I get with previous CubeMX where i had (stm32f7xx_it.c):
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
osSystickHandler();
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
2019-01-12 10:23 PM
If you chosse one of the TIMs as Timebase Source as CubeMX recommends, then your SysTick_Handler is replaced by xPortSysTickHandler. Check FreeRTOSConfig.h for
#define xPortSysTickHandler SysTickHandler
If not ( if you choose SysTick as Timebase Source), then it should appear somewhere. But it didn't, which is clearly a bug of CubeMX v.5.
However in either cases, I'm wondering if your FreeRTOS actually runs. If not, check this post:
https://community.st.com/s/question/0D50X0000ADCHOVSQ5/freertos-adding-mpu-support-for-tasks
2019-01-14 01:30 AM
Thank you Innomatic.
So having TIMs as Timebase source and the #define xPortSysTickHandler SysTickHandler all is right.
I am at the very beginning but the FreeRTOS seems to work.
In a my previous project I had the TIMs as timebase source.
The #define xPortSysTickHandler SysTickHandler was commented but I had the
void SysTick_Handler(void)
on stm32f7xx_it.c. Also in this case the FreeRTOS works. I don't remember if this structure comes from the previous CUBEMX, but I think so.