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
  • I’d like to forward this to someone who can provide a more detailed answer. Please confirm that I’ve understood your issue correctly.

    You’re using a custom board with the nRF54L05. After the device has been running for about 12 hours and performs a sys_reboot(), the timer no longer fires as expected. When you call k_timer_remaining_get() after the issue occurs, it returns an abnormally large remaining time.

    After this issue has occurred, can you fix it by power cycling or reflashing the firmware?
    Also, have you been able to reproduce this issue on a DK (nrf54l15dk/nrf54l05)?

    Regards,
    Benjamin

  • Hi,

    Thank you very much. This problem has been bothering us for a long time.

    Yes, you are absolutely correct. After this issue occurred, I was unable to fix it by restarting or refreshing the firmware. However, I tried powering off the device, using the recover board, and performing DFU upgrade. All these operations were able to fix the problem. I also attempted to reproduce it on the DK, but it didn't work.

Reply
  • Hi,

    Thank you very much. This problem has been bothering us for a long time.

    Yes, you are absolutely correct. After this issue occurred, I was unable to fix it by restarting or refreshing the firmware. However, I tried powering off the device, using the recover board, and performing DFU upgrade. All these operations were able to fix the problem. I also attempted to reproduce it on the DK, but it didn't work.

Children
No Data
Related