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

Need real time clock for interfacing sx1272 module with nrf51dk

Hi all , hi NORDIC team , I'm currently developping a multiprotocol adapter LORA/BLE . I'm using the sd130 . Semtech's third party says that it's "recommended " to have an RTC for developping the software. In fact i need to keep track of the TIME AND CALENDAR . After looking in the forum . I've found that i could implement a Software RTC using nrf51422 real time counter "RTC" which is not accurate enough . In the other hand , I'm thinking of a hardware solution which consists of an external RTC .

Parents
  • Great. There is no "time and calendar" RTC example in Nordic nRF5 SDK, however there is example how to work with RTC hardware peripheral on various levels (you can choose which one is the best for your needs, I would go with as low level implementation as possible = directly on top of HAL register header files and IRQ handler) and the rest is unfortunately on you. I believe there are some generic C source code examples how to generate time&date format from simple RTC "tick" through various counters and periodic corrections (to recover differences between 1000/60/60/24 time formatting and basic RTC time unit which is typically something between 1us and 100ms). In the end you will indeed need to synchronize the timer after each boot + periodically depending on your LF clock source drift and precision you want to achieve.

Reply
  • Great. There is no "time and calendar" RTC example in Nordic nRF5 SDK, however there is example how to work with RTC hardware peripheral on various levels (you can choose which one is the best for your needs, I would go with as low level implementation as possible = directly on top of HAL register header files and IRQ handler) and the rest is unfortunately on you. I believe there are some generic C source code examples how to generate time&date format from simple RTC "tick" through various counters and periodic corrections (to recover differences between 1000/60/60/24 time formatting and basic RTC time unit which is typically something between 1us and 100ms). In the end you will indeed need to synchronize the timer after each boot + periodically depending on your LF clock source drift and precision you want to achieve.

Children
No Data
Related