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.

CC1312R: How to set SysBios to exit from STANDBY on RTC CH1 compare match?

Part Number: CC1312R
Other Parts Discussed in Thread: SYSBIOS

Hi,

In my project, based on a CC1312R with SysBios, I need to maintain time synchronization to a network time. 

As synchroization is based on RTC I want to use RTC CH1 in compare mode. I am familiar with the way to enable RTC CH1 hook.

The problem is that the system will not wake-up from standby by RTC CH1 compate match, so my question is:

Is there any way to set SysBios to take into account RTC CH1 compare (if it is enabled) before to enter in standby in order to wakeup by its event?

The idea is not just to disable entering in standby.

Regards,

Dimitar Devedzhiev

  • We have this documentation:

    https://dev.ti.com/tirex/explore/node?node=AOFmdaK8impnxmEqGU3jkg__pTTHBmu__LATEST

    and this example:

    https://dev.ti.com/tirex/explore/node?node=AK.gxLPMgeYmt5xR94orBA__pTTHBmu__LATEST

    on how to do over the air synchronization. Would you be able to use this as a starting point?  

  • Hi Ter,

    My question was not how to do time synchronization over the air. I have done it and it looks like to work.

    The question is more or less related with Sysbios exiting from standby by RTC CH1 event. As in Sysbios there is capabilities to enable use of RTC CH1 and CH2 by enabling their hooks, the question was is there a way Sysbios to take into account the fack that hook are enabled and to put in calculation of wakeup from standby not only the clock objects but also the RTH CH1 or CH2 compare values?   

    Regards,

    Dimitar Devedzhiev

  • Are you using TI-RTOS? 

    Could you elaborate a bit on why you want to do this and what you want to gain? 

  • Yes, I am using TI-RTOS (I just call it SYSBIOS).

    About what I want to achieve: 

    I need to check if my synchronization works fine, so I do a pulse on every timeslot from my FHSS RF protocol. To generate this test point pulse as the all time synchroization is based to CC1312R RTC I use RTC CH1 in compare mode and GPTimer. The RTC CH1 compare event is set to a some time in advance of real timeslot start and in RTC CH1 hook I set the GPtimer in order to rise the front slope ot the pulse at exact moment. 

    All this works when I am connected to the debugger, but i stops when I am not. It looks like that the problem is that when my system (TI-RTOS) going to standby the RTC CH1 compare event is not taken in account by TI-RTOS and not set to wakeup according to it. And here came my question that I have already asked.

  • sysbios is the kernel TI-RTOS uses, hence I needed to check if you actually used TI-RTOS or something else. 

    To rule out a common issue when things doesn't work with the debugger disconnected: A typical issue is if the 32 kHz xtal is selected as clock source but a 32 kHz xtal is not mounted on the board. I assume that the empty example runs without problems on your board?  

    Are you using AONEventMcuWakeUpSet to setup the event? This is not something we have tested in this context. 

  • I don't lose my time synchronization without debugger, so I think that there is no issue with 32kHz xtal.

    About AONEventMcuWakeUpSet - I have not use it. 

  • If you are not using this API, how do you setup the RTC clock event etc? 

  • I use TI-RTOS and enable RTC CH1 hook as it documented in CC26xx Timer Peripheral Manager. There is a statement inside:

    "Note that if a hook function is configured for Channel 1 or Channel 2, the corresponding events will be configured automatically when Channel 0 is started. In other words, there is no need for the application to explicitly configure events for Channel 1 or Channel 2 by calling AONRTCCombinedEventConfig()."

    so I do nothing about events.

  • In the Timer module you can find this call: AONEventMcuWakeUpSet(AON_EVENT_MCU_WU0, AON_EVENT_RTC0); This is what configures the RTC0 timer event to wake up the MCU. If the other RTC events are configured, they are enabled (as you correctly identified), but they are not set as wakeup sources and there is no configuration option for this today.

    You can call AONEventMcuWakeUpSet(AON_EVENT_MCU_WU1, AON_EVENT_RTC1); in your application code if you want RTC1 to wake up the MCU.

    You will need to include these headers:

    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(driverlib/aon_event.h)
  • Hi James,

    Can I be sure that AON_EVENT_MCU_WU1 is not set (used) from TI-RTOS, TI drivers or sensor controller, for some other event source for the event AON fabric?

  • I can't see a reference to WU1 in the codebase, but the Temperature driver indicates it is used for some GPIO wakeup events (and Temperature itself uses WU2). So it is perhaps best to use WU3 or higher. You can check with AONEventMcuWakeUpGet() whether the value has been configured by some other source, but I don't think anything uses those higher triggers.

  • Hi James,

    Just in case that someone other on this forum search for information:

    According to one TI document WU3 is used for Sensor Controller  (AUX_SWEV1)