This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does nrf51822 have a clock?

Hi,

I wonder if nrf51822 has a clock inside it. It doesn't need to be real clock

but It's important to me. I store datas on flash and send it to the phone when it's ready to send.

But there is no guarantee that device is alive. so I store its time together when they are stored. so that I could send it with time difference from now.

but I have to need a clock for the case that battery is gone.

So is there a clock like?

  • The nRF51 has an internal 16 MHz RC oscillator.

    However, if you want to use the RADIO peripheral (you want to use BLE or ANT etc...) then you MUST include an external high frequency clock (see nordic's reference designs).

    Also an external low frequency 32.768 kHz crystal is optional (reduces current when using BLE and other timers) but the interal RC oscillator can generate this signal. See this post: devzone.nordicsemi.com/.../

    But if you are talking about a real time clock - a clock that stores the time in hours and minutes (i.e. 12:48) then you will need to implement this yourself using the TIMER peripheral.

    -Mike

  • Hi, Thanks. What I need is to know difference of time between before and now even if device is turned off. I don't want to know what the time is.

  • Then You need external RTC with independent power source to keep the time counting when nrf51 is not powered.

  • @Wojtek do you mean I can't do what I want with just nrf51822?

  • Maybe you could do something hackish/clever:

    1.) Device sends a flag right before it turns off - the phone now starts keeping track of time. 2.) Device starts keeping track of time once it turns on. After the device connects to the phone it sends the phone a flag with the time elapsed since it turned on. Now the phone knows (almost exactly) how long the device has been off. 3.) This time can then be passed back to the device if needed.

    • Downfall - any time the device is powered off the phone will need to be keeping track of time - this means that the app will have to run in the background or you will need to do some type of service on the app side.

    But this might allow you to avoid another separate clock/power source. There could be other solutions as well

Related