Change inital tick count to simulate running freertos for 49 days

Hi everyone, 

Is it possible to change the initial tick count to simulate running freertos for 49 days insteed to wait this time in real ? 

I work with the SDK15.3 and freertos v10.0.0. Softdevice S140 v6.1.1 on NFR52840.

I configure FreeRTOS to use the RTC as tick source. I saw that the RTC1 counter is coded on 24 bits.

I don't think that is the issue because the tick count is not a relefction of rtc counter. rtc counter is used to know the missing tick during sleep if I understand well.

I tried to change the value of configINITIAL_TICK_COUNT in FreeRTOS.h at 0xFFF00000 but this does not work as expected. 

I don't know if there is a better way to make this simulation of running system for a long time. 

If anyone have already do this, I will appreciate very much his answer. 

Best regards, 

Etienne

Parents Reply
  • It looks like our implementation has broken the use of configINITIAL_TICK_COUNT.

    If you look in the external\freertos\portable\CMSIS\nrf52\port_cmsis_systick.c, we have created a dependency for the value got from nrf_rtc_counter_get to be same (lower 24 bits) as xTaskGetTickCount. If it is not then we inrement the internal kernel counter to match the RTC and that could be the reason you are seeing this behavior.

Children
Related