Hi
I can get the current time from the server using the time service characteristic. Which function should I use to set the RTC clock on the nrf 51 to the current time obtained from the server so that the timer starts from that point.
Hi
I can get the current time from the server using the time service characteristic. Which function should I use to set the RTC clock on the nrf 51 to the current time obtained from the server so that the timer starts from that point.
There is no clock on the nrf51 which has a notion of 'current time'. The RTC is just a counter. if you want to use it as a clock you have to get it to call you at regular time intervals (eg one second) and then you count ticks and turn that into a time.
So when you get the current time from the server, you set your count to that time and start counting from there.
But the COUNTER register is read only for the RTC right? Thats what I had read. Please correct me If I am wrong here
But the COUNTER register is read only for the RTC right? Thats what I had read. Please correct me If I am wrong here