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

Can we set current date and time on NRF51422? Is there any example?

I want to set the Device's current date and time as I have to check time after certain interval. I don't want to use RTC where we have to look for ticks.

My questions are

  1. Is it possible to set date and time on NRF51422?
  2. If Yes, do you know any library or example which does that?

Thanks.

Parents
  • Hi 

    I wrote a simple example a while back to integrate the time.h library in the SDK, so you could keep track of time and date in the nRF device, but unfortunately it does use the RTC, and I only have project files included for the nRF52 devices:

    https://github.com/NordicPlayground/nrf5-calendar-example

    It should be possible to run on the nRF51 also, if you just include the nrf_calendard.c/h files without using the full projects.  

    I don't want to use RTC where we have to look for ticks.

    Can you elaborate a bit more? 

    There is no good way to keep track of time in the nRF devices without using the RTC, unless you use an external RTC chip of some kind, or use the TIMER module instead (which will greatly increase sleep currents).  

    Best regards
    Torbjørn 

Reply
  • Hi 

    I wrote a simple example a while back to integrate the time.h library in the SDK, so you could keep track of time and date in the nRF device, but unfortunately it does use the RTC, and I only have project files included for the nRF52 devices:

    https://github.com/NordicPlayground/nrf5-calendar-example

    It should be possible to run on the nRF51 also, if you just include the nrf_calendard.c/h files without using the full projects.  

    I don't want to use RTC where we have to look for ticks.

    Can you elaborate a bit more? 

    There is no good way to keep track of time in the nRF devices without using the RTC, unless you use an external RTC chip of some kind, or use the TIMER module instead (which will greatly increase sleep currents).  

    Best regards
    Torbjørn 

Children
Related