2019-10-27 03:09 PM
I'm just getting started with doing RTOS programming but I can't see this being anything but a CubeMX bug. My target MCU is an STM32H750 running at 400MHz. I wanted the FreeRTOS tick to be 100Hz. I set that parameter in CubeMX, but noticed that all my osDelay functions were about 1/10th of what they should be. If I set the RTOS tick to 1000Hz, all is good, but for a 100Hz period the Systick period is still programmed to 399,999. So, looks like the RTOS code is being correctly set to assume a 100Hz tick, but the actual SysTick is hard coded to 1KHz? I've poked around a bit and don't see the SysTick programming, (I used the debugger to look at the SysTick period register).
It is easy to override and need to do it in user code anyway. Is the best place in between HAL_Init() and osKernelStart()?
will
2019-10-27 03:28 PM
OK, not sure how or why, but now it works fine. The correct Timer Tick value is being programmed for an RTOS period of 100Hz. I'll blame user error somehow, but not sure how.
will