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.

Timekeeping on CC2540

Other Parts Discussed in Thread: CC2540

Hello,

We're trying to build an application with the CC2540 where the accuracy of the time is very important. We're using the OSAL_ClockBLE.c functions to set and get the time. However, the difference with a reference clock get quite high over the course of 24 hours. In our case we communicate every second over BLE and in 24 hours the CC2540 time was around 10 minutes off. 

Any ideas how we can make this more reliable? We've been testing on the CC2540MINIDK_EM device and a ConnectBlue module with the CC2540 chip on board.

Thanks a lot in advance!

Tijn

  • What is your clock source?  Is it systematic drift, or temperature-induced drift? You could calibrate each clock with your external reference based on a temperature table and adjust accordingly.

  • The OSAL RTC in the CC2540 SDK should be using the 32.768 kHz crystal I suppose. The CC2540MiniDK keyfob that I use has an Epson MC-306 crystal. This should be quite stable, definitely not giving me a 1 minute deviation on 24 hours. The OSAL_clockBLE library is implemented as part of the TI BLE sdk and therefore I'm surprised that I get such a big RTC deviation.