Description
Describe the bug
On the nRF54L, resetting the application without removing power does not result in the internal counters starting again from 0.
To Reproduce
- Update
zephyr/samples/hello_world
to:
#include <stdio.h>
#include <zephyr/kernel.h>
int main(void)
{
while(1) {
printf("Hello World! %s %6d\n", CONFIG_BOARD_TARGET, k_uptime_seconds());
k_sleep(K_SECONDS(1));
}
return 0;
}
west build -b nrf54l15dk/nrf54l15/cpuapp zephyr/samples/hello_world/
west flash
- Wait several seconds
nrfutil device reset
- Observe the serial output
Expected behavior
Application should start counting from 0 on each reset.
Impact
Application thinks it's been running for much longer than it has been.
Absolute timestamps not constructed without reference to the current uptime will be broken.
i.e. K_TIMEOUT_ABS_MS(5000)
will expire immediately upon reboot.
Logs and console output
Environment (please complete the following information):
- Zephyr v4.1 and main
Additional context
k_uptime_seconds()
is not special in any way, it simply retrieves the system tick counter and does a division.
This implies that the system tick counter is not being reset across reboots.
The nRF54L series does not use the same system tick source as previous nRF SoCs, it uses the GRTC (nrf_grtc_timer
).
Metadata
Metadata
Assignees
Type
Projects
Status