This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: RTC reliability in CC2640R2F

Part Number: CC2640R2F

Hi all,

Im using RTC to keep track of time in my CC2640R2F device. Im working on OTA code and i need to update the firmware at a particular time in a week or a month. 

How reliable and accurate is the RTC in it and how much drift I get when I run for weeks without calibrating the time?  I set the device time once using Seconds_set module.

I don't have an external (LFXOSC) crystal oscillator in my circuit and Im not using internal LF RC oscillator(RCOSC_LF) either. 

My clock configuration is like this in ccfg.c file,

#ifndef SET_CCFG_MODE_CONF_SCLK_LF_OPTION
// #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x0 // LF clock derived from High Frequency XOSC
// #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x1 // External LF clock
#define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x2 // LF XOSC
// #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x3 // LF RCOSC
#endif

But there is no external oscillator in circuit. What frequency or which oscillator will the RTC use in this case? And how reliable is it?

I have read the datasheet in which it is stated to use external LF oscillator or calibrate internal LF oscillator but in my case its not the both.

I have read the following documents and threads but I dont find particular answer to my question.

http://www.ti.com/lit/an/swra499b/swra499b.pdf

http://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/587863

http://www.ti.com/lit/ug/swru393e/swru393e.pdf

Note:

Im using CCS and sdk 1.50

Thanks,

radha.

  • Roni,

    The accuracy of internal low frequency RC oscillator is approximately 1% with a 50ppm/C temperature coefficient and typically not good enough to keep time. So therefore we recommend waking up periodically to calibrate the internal RC oscillator against the main 48MHz RF XTAL (which is required for any design). In our BLE stack we use this approach to ensure a performance of the 32KHz reference of better than 500ppm.

    Regards,
    /TA
  • Hi,

    Thanks for your response. Im not sure that I use internal low frequency RC oscillator because my configuration is like this.
    #define SET_CCFG_MODE_CONF_SCLK_LF_OPTION 0x2 // LF XOSC
    Also there is no external crystal. So will the RTC run with internal RC oscillator by default?
    And my device is in sleep most of the time. So how often should I calibrate?

    Thanks,
    radha.
  • Yes, if the devices is not able to start up the external 32KHz XTAL it will not try to use it and therefore it will use the internal 32KHz RC instead.

    Regards,
    /TA
  • You should calibrate more often than every 10 seconds, but exactly how often depends on your expected temperature variation. You will need to experiment with this to gain experience in the RC oscillators performance in your environment.

    Regards,
    /TA
  • Thanks for you response. That helped a lot.

  • Hi Radha,

    Note that if the device is configured to use the 32 kHz XOSC, but that does not start up, it will use the 48 MHz RC oscillator as SCLK_LF source instead. This will prevent the device from entering Standby. There is also no way to calibrate the RCOSC-HF similarly to the RCOSC-LF.

    You need to make sure your CCFG configuration matches the actual HW.

    Regards,
    Fredrik
  • Thanks for the note