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.

cc2541 and RTC

Other Parts Discussed in Thread: CC2541

hey,

We want to get real timestamp for our application and need to use rtc for that. we have cc2541 sensor tag and it has rtc. how do we start with it? what functions can be used to get the rtc output?

thank you.

  • Try to refer OSAL_ClockBLE.c

  • hey. we did refer to it but couldn't get much information. this is our first project and we are not able to realize where to start from. could you please give a little more detail.

  • Hello Vandita,

    As YiKai pointed out, the main constructs for setting the time is in the OSAL_ClockBLE.c file. If this is your first foray into RTC, then you should do an internet search on just how RTCs work. If not, then it works the same way as all other RTC configurations you will find for any other MCU. Time is recorded in microseconds then converted to milliseconds and finally converted to UTC. There is too much detail and configuration options to be covered here.

    You can use the timerApp to get an idea of what needs to be called before setting or getting the time. If you want to add milliseconds, calendars or alarms, you could do this in OSAL_ClockBLE.c.

    I strongly advise that you make a copy of the ClockBLE files and folders before making any changes to it. You call the set and get functions in your main application.

    Thanks,