Hi,
I am using an external low speed clock driven rtc to implement the perpetual calendar feature, but when setting the time, I find that the COUNTER is not modifiable. May I ask how to reflect the time modification on the COUNTER?
Thanks,
Soloman
Hi,
I am using an external low speed clock driven rtc to implement the perpetual calendar feature, but when setting the time, I find that the COUNTER is not modifiable. May I ask how to reflect the time modification on the COUNTER?
Thanks,
Soloman
Hi,
Please note that the RTC peripheral on the nRF52833, just as for our other SoCs, is a Real Time Counter, and not a Real Time Clock. The peripheral is, for most intents and purposes, a timer peripheral running on the low frequency clock.
The COUNTER register is read only, that is correct. From what I understand, you want to synchronize the RTC counter with an external clock source. In order to do so, you must trigger a reset of the counter at the right instant. (In other words: The only way to manipulate the value of COUNTER is for it to reset (to 0), so you have to trigger a reset at a point in time where it should get reset to 0.)
What this means for your implementation is a bit hard to tell without any implementation specific details. (E.g. how do you intend to use the COUNTER value, what is it a measure of, what is the frequency, etc.)
For reference of a calendar implementation, you can have a look at the nrf-calendar-example from NordicPlayground, which was made for nRF5 SDK v16.
Regards,
Terje