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

How to call Time() function in Nordic nrf518222(Milliseconds) ??

Hello,

Please tell me, How to call Time() in milliseconds in Nordic nrf51822 ??

Parents
  • Hello Rakesh,

    there is app_timer library and examples in nRF5 SDK, these can make any time-related async calls. It depends what your magic Time() function should do, you will need to code it yourself.

    Cheers Jan

  • What do you mean by printing time? If you want to track date and day-time you need to implement it on top of simple timer. Start with choosing right prescaler (depends on what resolution you want to track and what overflow period), then implement conversion functions from native RTC units to milliseconds/seconds/minutes/hours/days and finally you need to start the RTC after start of your board and "seed" the algorithm with some external time (if you want to have it in sync). This is quite general problem/method so you probably can find many open source examples on the internet...

Reply
  • What do you mean by printing time? If you want to track date and day-time you need to implement it on top of simple timer. Start with choosing right prescaler (depends on what resolution you want to track and what overflow period), then implement conversion functions from native RTC units to milliseconds/seconds/minutes/hours/days and finally you need to start the RTC after start of your board and "seed" the algorithm with some external time (if you want to have it in sync). This is quite general problem/method so you probably can find many open source examples on the internet...

Children
No Data
Related