Hi,Team,
I'm currently using the nrf54l15-dk. I want to set the rtc of the nrf54l15-dk to obtain the timestamp. How should I configure the rtc? Which examples should I refer to?
My ncs version is v2.8.0.
Thanks.
Hi,Team,
I'm currently using the nrf54l15-dk. I want to set the rtc of the nrf54l15-dk to obtain the timestamp. How should I configure the rtc? Which examples should I refer to?
My ncs version is v2.8.0.
Thanks.
Hi,
Thank you for your reply.
As you said, calling k_msleep(1000) indeed adds 1 second.
But how can I achieve adding 1 second to the timestamp? As I mentioned:
"The app will send 8 bytes to my device: 0x10, 0xDB, 0x4D, 0xEE, 0x98, 0x01, 0x00, 0x00. Converting these to 13-digit decimal gives 1756344736528. This represents a Unix millisecond-level timestamp format. Converting it again to UTC format results in 20-09-27 21:32:16.528." Currently, I can only calculate the 13-digit decimal number: 1756344736528. If I add 1 second to 1756344736528, converting it to UTC results in 2025-09-27 19:02:18.305, and the time is incorrect.
Could you please tell me how to add 1 second to the value of 1756344736528 to achieve the addition of year, month, day, hour, minute, second, and millisecond?
Thanks.
The GRTC measures time in microseconds, not milliseconds. You need to convert between them.