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.

CCS/CC1310: How to set up standby mode and wake up from RTC?

Part Number: CC1310

Tool/software: Code Composer Studio

Hi, I completely don't understand how configure standby mode.

I am trying to develop code that introduces the processor to standby mode so that it wakes up from the RTC clock

Clock_Struct MainClock;


void mainClockFxn(UArg arg0)
{
    GPIO_toggleDio(LED); // Toggle LED


    PowerCC26XX_standbyPolicy();
}


void ClockConfig(void)
{

    uint32_t period = 1000000/Clock_tickPeriod; // 1sec clock config
    Clock_Params clkParams;

    Clock_Params_init(&clkParams);
    clkParams.period = period;
    clkParams.startFlag = TRUE;

    Clock_construct(&MainClock, (Clock_FuncPtr)mainClockFxn, period, &clkParams);

}

void MonitorTaskFunction(UArg arg0, UArg arg1)
{

     ClockConfig();
     Power_enablePolicy();

     PowerCC26XX_standbyPolicy();

     while(1)
     {
        
     }

}

How to correctly implement standby mode?

  • My Power config
    
    /*
     *  =============================== Power ===============================
     */
    #include <ti/drivers/Power.h>
    #include <ti/drivers/power/PowerCC26XX.h>
    
    const PowerCC26XX_Config PowerCC26XX_config = {
        .policyInitFxn      = NULL,
        .policyFxn          = &PowerCC26XX_standbyPolicy,
        .calibrateFxn       = &PowerCC26XX_calibrate,
        .enablePolicy       = true,
        .calibrateRCOSC_LF  = false,
        .calibrateRCOSC_HF  = false,
        .enableMaxStandbyDuration = true
    };
    

  • Michpo,

    Please see the SimpleLink SDK Power Management User's Guide here.

    BR,

    Seong

  • I need to configure the controller so that it goes into standby and wakes up by LP RTC.

    Аs far as I understand it is possible.
    But the controller does not wake up on the LP clock

    Clock_Struct MainClock;
    Clock_Handle ClockHandle;
    
    void mainClockFxn(UArg arg0)
    {
        GPIO_toggleDio(LED_R);
    }

    void TaskFunction(UArg arg0, UArg arg1)
    {
    
          Power_init();
          ClockConfig();
          Power_enablePolicy();
          Power_releaseConstraint(PowerCC26XX_SB_DISALLOW);
          Power_releaseConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
          Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
          //Power_setConstraint(PowerCC26XX_SB_DISALLOW);
    
          while(1)
          {
              GPIO_toggleDio(LED_G);
               sleep(2);
          }
    }
    
    void ClockConfig(void)
    {
    
        uint32_t period = 1000000/Clock_tickPeriod;
        Clock_Params clkParams;
    
        Clock_Params_init(&clkParams);
        clkParams.period = period;
        clkParams.startFlag = TRUE;
    
    
        Clock_construct(&MainClock, (Clock_FuncPtr)mainClockFxn, period, &clkParams);
    
        ClockHandle = Clock_handle(&MainClock);
    
        Clock_start(ClockHandle);
    }
    

    Please pay attention the option is " Wake up on RTC in Standby Mode"

  • To begin with, I am very surprised that there is not a single intelligible example of how to enter the standby mode and wake up on internal or external 32kHz RTC

    Power management documentation does not cover everything. In addition, this example would exclude a lot of questions that I saw on the forum and the time of the developers.
    Now about the essence of the matter. I use TI RTOS in my application.

    How to configure external RTC 32kHz so that the processor can exit the standby and continue running?

    Let me remind you that power consumption of CC1310 in standby mode is about 1ua.

    How to write a code that would switch the processor to the LF OSC and wake up in 1s using the RTC?

  • Slightly on the side: I test the following change to the clock example:

    int main()
    {
        /* Construct BIOS Objects */
        Clock_Params clkParams;
    
        /* Call driver init functions */
        Board_init();
    
        Clock_Params_init(&clkParams);
        clkParams.period = 500000/Clock_tickPeriod;
        clkParams.startFlag = TRUE;
    
        /* Construct a periodic Clock Instance */
        Clock_construct(&clk0Struct, (Clock_FuncPtr)clk0Fxn,
                        500000/Clock_tickPeriod, &clkParams);
    
        clkParams.period = 0;
        clkParams.startFlag = FALSE;
    
    //    /* Construct a one-shot Clock Instance */
    //    Clock_construct(&clk1Struct, (Clock_FuncPtr)clk1Fxn,
    //                    11000/Clock_tickPeriod, &clkParams);
    
        clk1Handle = Clock_handle(&clk0Struct);
    
        Clock_start(clk1Handle);
    
        GPIO_init();
    
        /* Configure the LED pin */
        GPIO_setConfig(Board_GPIO_LED0, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
    
        BIOS_start();    /* does not return */
        return(0);
    }
    
    /*
     *  ======== clk0Fxn =======
     */
    Void clk0Fxn(UArg arg0)
    {
        GPIO_toggle(Board_GPIO_LED0);
    }

    This uses 800 nA when the LED is not on.

    Why do you want a wake-up on 32 kHz, could you elaborate a bit on what you are trying to implement? 

  • I have questions.

    1. How did you measure the current consumption?

    2. What kind of  sleep you got? What the power policies was using?

    Thank you

  • Current is measured according to  using Agilent N6705B

    The power policy is defined in the board file for all examples:

    /*
     *  =============================== Power ===============================
     */
    #include <ti/drivers/Power.h>
    #include <ti/drivers/power/PowerCC26XX.h>
    
    const PowerCC26XX_Config PowerCC26XX_config = {
        .policyInitFxn      = NULL,
        .policyFxn          = &PowerCC26XX_standbyPolicy,
        .calibrateFxn       = &PowerCC26XX_calibrate,
        .enablePolicy       = true,
        .calibrateRCOSC_LF  = true,
        .calibrateRCOSC_HF  = true,
    };