LAUNCHXL-CC1310: How to lower the voltage in cc1310 sleep mode?

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Tool/software:

hi.
I am currently developing with “CC1310 LAUNCHXL KIT” and I have a question while I am developing. In CC1310 I enter Sleep Mode and I used to plug in the debug wire and measure the current and 2.5mA was measured, but when I remove the debug wire and measure the current, 0.4mA was measured. But when I look at the TI CC1310 DATA SHEET, it says that 0.7 uA should be measured when in sleep mode. My question is that currently I am using “Power_releaseConstraint(PowerCC26XX_SB_DISALLOW)” as the code to enter sleep mode;
Power_setConstraint(PowerCC26XX_RETAIN_VIMS_CACHE_IN_STANDBY);
PowerCC26XX_standbyPolicy();” I wrote this code, but is there a better way? And “Power_sleep(PowerCC26XX_STANDBY);” and “Power_releaseConstraint(PowerCC26XX_SB_DISALLOW);” I want to know the difference between these two codes, and is it okay to use Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW); when I declare to use standby mode like the code above?
Besides the above method, can you tell me if there is any code instruction to decrease the current value of CC1310 close to SLEEP MODE?

  • Hi Susung,

    1. Please note the power driver will keep track of everything going on, and send the device to sleep when there is no active task. Thus there is no direct command to the power driver that will send the device to sleep. Instead you should use Task_sleep, Semaphore_pend or similar to tell the scheduler that there is nothing going on.

    2. We have a large document on the Power driver that will tell you all the details. 

    https://dev.ti.com/tirex/explore/content/simplelink_cc13xx_cc26xx_sdk_7_41_00_17/docs/rflib/html/_r_f_c_c26_x2_8h.html

    3. Can you open a default example, e.g. the drivers empty example, and measure the current? If you look at the code, you will see that the main file specifies a power policy to use, and that's it. No need to set or release constraints at runtime unless you have a specific use case. 

    4. We have an app note on current consumption. Please take a look:

    https://www.ti.com/lit/swra478

    Cheers,

    Marie H

  • Thanks for the reply. After a little more research, I found that there is no other instruction to enter deepsleep mode on TI's CC1310. When I enter “Power_sleep(PowerCC26XX_STANDBY);”, it executes the code sequentially in the “PowerCC26XX.c” file through the constraint mask to enter deepsleep mode, but when I am debugging the code now, the code terminates in the PRCMDeepSleep() function. Currently, my current value is measuring 00.8mA when I measure it. Do you have any suggestions on how I can approach this to solve this problem?

    Translated with DeepL.com (free version)

  • Hi Susung,

    If your device is stuck in PRCMDeepSleep() that's a good sign!

    How are you measuring the power consumption? Can you post a picture of your set up?

    Cheers,

    Marie H

  • I modified the code a bit more and I added the Power_releaseConstraint(PowerCC26XX_SB_DISALLOW) inside the main function of the main.c file
    Power_setConstraint(PowerCC26XX_RETAIN_VIMS_CACHE_IN_STANDBY)
    PowerCC26XX_standbyPolicy()
    If you make this declaration and run debug through CCS, you will see the PowerCC26XX_tirtos. c file, the "PowerCC26XX_standbyPolicy()" function is executed, but since I unlocked the standbymode power limit in the main function, the code is executed from the else statement, and the code is executed from the " if (time > Power_getTransitionLatency(PowerCC26XX_STANDBY, Power_TOTAL))" part, so the condition is not satisfied, so it goes to IDLE mode, and the code is executed sequentially, but the debug stops at the PRCMDeepSleep() function. My questions are
    1. is the flow of this code normal now?
    2. i don't know if the above condition is not satisfied in standby mode.
    3. why am I stuck in the PRCMDeepSleep() function? And what does it mean that it's a good sign that the device is stuck in PRCMDeepSleep()?
    4. is the Power_sleep(PowerCC26XX_STANDBY); function for standby mode and IDLE mode device to enter DEEP SLEEP mode?

    __________________________________________________

    void PowerCC26XX_standbyPolicy(void)
    {
    bool justIdle = true;
    uint32_t constraints;
    uint32_t ticks;
    uint32_t time;

    /* disable interrupts */
    CPUcpsid();

    /* check operating conditions, optimally choose DCDC versus GLDO */
    SysCtrl_DCDC_VoltageConditionalControl();

    /* query the declared constraints */
    constraints = Power_getConstraintMask();

    /* do quick check to see if only WFI allowed; if yes, do it now */
    if ((constraints &
    ((1 << PowerCC26XX_DISALLOW_STANDBY) | (1 << PowerCC26XX_DISALLOW_IDLE))) ==
    ((1 << PowerCC26XX_DISALLOW_STANDBY) | (1 << PowerCC26XX_DISALLOW_IDLE))) {

    PRCMSleep();

    }
    /*
    * check if any sleep modes are allowed for automatic activation
    */
    else {

    /* check if we are allowed to go to standby */
    if ((constraints & (1 << PowerCC26XX_DISALLOW_STANDBY)) == 0) {


    ticks = Clock_getTicksUntilInterrupt();

    /* convert ticks to usec */
    time = ticks * Clock_tickPeriod;

    if (time > Power_getTransitionLatency(PowerCC26XX_STANDBY, Power_TOTAL)) {
    /* schedule the wakeup event */
    ticks -= PowerCC26XX_WAKEDELAYSTANDBY / Clock_tickPeriod;

    if (PowerCC26XX_config.enableMaxStandbyDuration) {
    /* Schedule an early wakeup if requested. */
    if (ticks > PowerCC26XX_config.maxStandbyDuration) {
    ticks = PowerCC26XX_config.maxStandbyDuration;
    }
    }

    Clock_setTimeout(Clock_handle((Clock_Struct *)&PowerCC26XX_module.clockObj), ticks);
    Clock_start(Clock_handle((Clock_Struct *)&PowerCC26XX_module.clockObj));

    /* go to standby mode */
    Power_sleep(PowerCC26XX_STANDBY);
    Clock_stop(Clock_handle((Clock_Struct *)&PowerCC26XX_module.clockObj));
    justIdle = FALSE;
    }
    }

    /* idle if allowed */
    if (justIdle) {


    if ((constraints & (1 << PowerCC26XX_DISALLOW_IDLE)) == 0) {
    uint32_t modeVIMS;
    /* 1. Get the current VIMS mode */
    do {
    modeVIMS = VIMSModeGet(VIMS_BASE);
    } while (modeVIMS == VIMS_MODE_CHANGING);

    /* 2. Configure flash to remain on in IDLE or not and keep VIMS powered on if it is configured as GPRAM */
    if ((constraints & (1 << PowerCC26XX_NEED_FLASH_IN_IDLE)) ||
    (modeVIMS == VIMS_MODE_DISABLED)) {
    HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS) |= PRCM_PDCTL1VIMS_ON;
    }
    else {
    HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS) &= ~PRCM_PDCTL1VIMS_ON;
    }

    /* 3. Always keep cache retention ON in IDLE */
    PRCMCacheRetentionEnable();
    /* 4. Turn off the CPU power domain */
    PRCMPowerDomainOff(PRCM_DOMAIN_CPU);
    /* 5. Ensure any possible outstanding AON writes complete */
    SysCtrlAonSync();

    /* 6. Enter IDLE */
    PRCMDeepSleep();

    /* 7. Make sure MCU and AON are in sync after wakeup */
    SysCtrlAonUpdate();
    }
    else {
    PRCMSleep();
    }
    }
    }


    CPUcpsie();
    }

    ___________________________________________________

  • Hi Susung,

    1. Yes this is normal.

    2. I don't understand this question.

    3. This is the API call for going into deep sleep. Your device is in standby. (Since you have the debugger attached the device is not allowed to go to standby, but this indicates from the device point of view that it is in standby.)

    4. No, it's not necessary to call a power driver api to get the device to standby. The device goes to standby when the idle task is running, i.e. when there are no other running tasks.

    Cheers,

    Marie H