Menu

#141 Incorrect duration of first tick

v1.0 (example)
closed-invalid
nobody
None
5
2017-02-07
2017-02-06
Andrey
No

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.

Discussion

  • Richard Barry

    Richard Barry - 2017-02-06
    • status: open --> closed-invalid
     
  • Richard Barry

    Richard Barry - 2017-02-06

    Thank you for taking the time to report this. However it has already been fixed.

     
  • Andrey

    Andrey - 2017-02-07

    Hello,
    I'm sorry for bothering you, but what version has the fix?
    Best regards.

     
  • Andrey

    Andrey - 2017-02-07

    Hello,
    Thanks a lot for the help.
    Best regards.

     

Log in to post a comment.