This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using Timestamp in nRF9160

I want to read timestamp in my nRF9160 device and found that "z_tsc_read()" function in Zephyr RTOS will do that. However, I am not able to include the main library of the timestamp in the code and so I get the "undefined reference to `z_tsc_read'" error. I tried to include "<tc_util.h>" to resolve the problem but it seems compiler is not able to locate this library too. Can anyone please help me to solve the problem to use the "z_tsc_read()" function?

Parents Reply Children
  • According to the doc:

    This routine returns the elapsed time since the system booted, in milliseconds.

    Event though it's fine we can use this it is not an ideal solution since it means computing the datetime manually. 

    The battery consumption and power mode are also important factors. On a non embedded context I could simply ask for the time via IP but I'd rather have a real clock that runs even during low power modes.

    Is the problem with de AT+CCLK commands something that you know about? Will it be fixed?

Related