zephyr software timer cannot trigger periodically.

I am using the NRF54L05.When I was using the timer function of the Zephyr software, I created a timer with a 10ms cycle. After my system had been running for a long time (for example, 12 hours), after executing sys_reboot(SYS_REBOOT_COLD);, there was a probability of encountering a timer anomaly. It did not trigger as I expected; it only triggered once, and the next trigger time was much later;
相关代码使用:   
FRAME_INTVAL_UINT 10  // 毫秒

  k_timer_init (& delay_timer ,delay_timer_handler ,NULL );

  k_timer_start (& delay_timer ,K_MSEC ((uint32_t )FRAME_INTVAL_UINT ),

                K_MSEC ((uint32_t )FRAME_INTVAL_UINT ));

I obtained the trigger count and the next time from the delay_timer through k_timer_status_get(&delay_timer) and k_timer_remaining_get(&delay_timer) respectively.The results I got were 1 and 11814496;

I can confirm that my clocks are all functioning properly, and my delay_work and threads are also running normally. I have no idea how to proceed to identify the problem;

Thank you very much for your help;
Parents
  • Thanks. Do you have to wait exactly 12 hours? Try doing the soft reset sooner to see if it changes anything. Also, a soft reset doesn’t clear the GRTC register, but a watchdog timer reset does. Can you check if the issue still occurs after a watchdog timer reset? It would also be helpful if you print the timer values right before and after the resets.

Reply
  • Thanks. Do you have to wait exactly 12 hours? Try doing the soft reset sooner to see if it changes anything. Also, a soft reset doesn’t clear the GRTC register, but a watchdog timer reset does. Can you check if the issue still occurs after a watchdog timer reset? It would also be helpful if you print the timer values right before and after the resets.

Children
Related