nRF54L15 GRTC SYSCOUNTER resets after system soft reset

After upgrading my NCS version from 3.1.1 to 3.2.0 for the nRF54L15, I found that the GRTC resets after a sys_reboot(), whereas it didn't in the previous version. What changes were made in version 3.2.0? How can I keep the GRTC counter from resetting after a software reboot, just like before?

Parents
  • Hi,

    Looking further into the issue, sys_clock_disable() was implemented or nRF Connect SDK v3.2.0, and that is what has changed. Previously, the call to sys_clock_disable() from within sys_reboot() did not actually disable the GRTC. Now it does.

    Adding a switch for keeping syscounter initialized (for the purpose of having GRTC running through the reboot) is on our roadmap, and so we do expect a fix in the not too distant future.

    In the mean time, you could try disabling CONFIG_SYSTEM_TIMER_HAS_DISABLE_SUPPORT, although that might require you to do changes to driver code in nrfx.

    Regards,
    Terje

  • Hi Terje,

    Thank you for you support.

    Under the current NCS v3.2.0 version, entering Power Off mode still resets the GRTC SYSCOUNTER. However, according to the nRF54L15 specification, these reset behaviors (https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/chapters/power-and-clock/reset/doc/reset.html) should not affect the GRTC SYSCOUNTER time.

    In the sys_clock_disable function within nrf_grtc_timer, if I replace nrfx_grtc_uninit() with something similar to nrfx_grtc_uninit_no_counter_reset() from MCUboot, it works fine. What would be the impact on other functionalities if I implement this change temporarily?

    Best Regards,

    Bill Zhou

  • Hi,

    You are correct that a soft reset should not reset the GRTC. The issue is that the GRTC is reset by the OS, as part of the reboot procedure. That is, in code called from sys_reboot().

    Your proposed workaround should work, yes. The nrfx_grtc_uninit_no_counter_reset() function was made for this purpose exactly; it solves the same issue in the bootloader, and will be used there as a workaround until the underlying issue is fixed.

    Regards,
    Terje

Reply
  • Hi,

    You are correct that a soft reset should not reset the GRTC. The issue is that the GRTC is reset by the OS, as part of the reboot procedure. That is, in code called from sys_reboot().

    Your proposed workaround should work, yes. The nrfx_grtc_uninit_no_counter_reset() function was made for this purpose exactly; it solves the same issue in the bootloader, and will be used there as a workaround until the underlying issue is fixed.

    Regards,
    Terje

Children
Related