Hello,
I'm using FreeRTOS 8.2.2 on STM32F070 processor.
I've figured out that reset value of SysTick current value register is some random number and not zero as in STM32F1/F2 series. This causes incorrect duration of the first tick as SysTick interrupt happens when the register counts to zero.
I did not find any place where the RTOS reset the register to zero on scheduler start and I think it should be done in prvSetupTimerInterrupt functin located in port.c file.
In my case instead of 1msec the first tick last for approximately 350 msec. It's not a big issue as it happens only on power up, but in my application it is very critical.
It is easy to fix: reset the register before calling vTaskStartScheduler, but I think the fix should be integrated into FreeRTOS code.
Best regards.
Thank you for taking the time to report this. However it has already been fixed.
Hello,
I'm sorry for bothering you, but what version has the fix?
Best regards.
It has been in SVN for a while. See line 647 (at the time of writing):
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/GCC/ARM_CM3/port.c
This is in V9.0.1 - the Cortex-M files are the only ones not updated to
9.0.1 as there are some tickless idle updates that are not fully tested yet.
Hello,
Thanks a lot for the help.
Best regards.