Skip to content

nRF54L: uptime does not reset across reboots #89147

Closed
@JordanYates

Description

@JordanYates

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

  1. 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;
}
  1. west build -b nrf54l15dk/nrf54l15/cpuapp zephyr/samples/hello_world/
  2. west flash
  3. Wait several seconds
  4. nrfutil device reset
  5. 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

Image

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

Labels

area: TimerTimerbugThe issue is a bug, or the PR is fixing a bugplatform: nRFNordic nRFxpriority: mediumMedium impact/importance bug

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions