79415351

Date: 2025-02-05 15:56:10
Score: 2
Natty:
Report link

You may use rtc_get_time function. Here is the code to sample: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/drivers/rtc/src/main.c

In general Zephyr needs a date-time source it fetches at startup to be able to provide absolute time. The realtive timestamp could be aquired by reading systicks for example.

Mor on time utilities could be found here: https://docs.zephyrproject.org/latest/kernel/timeutil.html#

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Alexander Kozhinov