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.

CC2652R7: how set RTC in run application

Part Number: CC2652R7


I have my own BLE application for CC2652R7, which I created based on a multi-purpose example from SDK version 6. I use FreeRTOS. When setting up the system, I want to set my value to the RTC register. While studying this issue, I had several questions.
1. My main problem is that there are some "magic numbers" that break the BLE stack. For example, if I write SEC 0 or some current time in the register, I will most likely be able to find my device when scanning the ether. But when recording the "magic" number, the device appears on the air for a second, I can notice it in the list on the phone in the message "nRF connect", but after a short time the device disappears from the air and I can no longer find it. If you restart the device, the situation will repeat. The message will appear on the air for a second and disappear forever. If you run an on-air scan on a device in an idle state (my application is based on multirole), then the main BLE stream does not receive promotional events from other devices from the environment.
2. Why does the AON driver have a SecGet function, but no SecSet? What is the reason for this?

Can you help me with advice on which way to dig? I want to change this particular register or find out the exact reason why I can't do it. Maybe libraries use this register and they don't like something? Because I don't have the source code of the Ble stack, and I have no idea what it does inside (I think this is classified information?). I have read the technical documentation and found no information that any special actions are being taken to record before using the SEC registry. I have been reading the forums and have not found any information on this issue. Links to migration or background information in other questions are slightly different from what I have.
Perhaps writing to the RTC register can be done only after something important? Something like just after setting up the cache or something else?

  • Hello Nick,

    Just so you are aware, FreeRTOS is not supported on every wireless stack in the SimpleLink SDK, including the CC2652R7 BLE stack.

    If you are looking for information regarding the use of RTC, I would recommend first looking at the RTC documentation in Chapter 16 of the TRM and our resources available in our SDK, specifically located in the DriverLib aon_rct.h reference. For some slightly deeper information look at the aon_rtc register descriptions found hereIf you need more information or help, could you provide how you want to use the RTC. Also, there are other E2E threads available that mention the use of RTC. You can also view the RTC in register view in CCS when in debug mode to see what it is doing. 

    For your second question, there is no SecSet function as the RTC is governed by the TI-RTOS and nothing except the TI-RTOS should typically configure it. 

    Thanks,

    Luke

  • Just so you are aware, FreeRTOS is not supported on every wireless stack in the SimpleLink SDK, including the CC2652R7 BLE stack.

    In this case, as I wrote above, the BLE stack works as it should under almost all conditions (except those that I described above). I do not rule out that the case is also in FreeRTOS, but then this is a very specific behavior that I have no confirmation of

    I've read the documentation and other topics, but I haven't found any useful information. Most of the answers tend to use TI-RTOS and AON libraries, or write some user-defined value to non-volatile memory and use it as a static offset. But no one writes about the problem with writing to the register. The documentation on the chip also does not indicate any limitations.

    For your second question, there is no SecSet function as the RTC is governed by the TI-RTOS and nothing except the TI-RTOS should typically configure it.

    Is there any information about how TI-RTOS does this? Is it possible to see the code somewhere?

    Update:

    I tried to run the simple peripheral example from the latest SDK and set my "wrong value" to 0x6502B33F. It works in the example, but if during the whole example I change the register value to another one or write 0x6502B33F again as at the start, everything will break. Why?

  • Nick,

    My first recommendation would be to try to use the RTC driver rather than directly doing register reads/writes. Given what you are trying to do, it may be useful to additionally check out the timer led example if you have not done so yet. 

    I would also recommend you use the following drivers if you are not currently:

    https://dev.ti.com/tirex/content/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/docs/drivers/doxygen/html/_timer_8h.html

    https://dev.ti.com/tirex/content/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/docs/drivers/doxygen/html/_g_p_timer_c_c26_x_x_8h.html

    Let me know once you have had time to look through these resources.

    Thanks,

    Luke

  • Nick,

    Checking in to see if you were able to look through the provided resources and resolve the issues you were facing. Let me know if the solution provided was helpful or share if you found a solution yourself!

    Thanks,

    Luke