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.

LAUNCHXL-CC1310: How to use and maintain cc1310 deepsleep mode?

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

Tool/software:

I am a developer working with a CC1310.
I am using SimpleLink CC13x0 SDK -4.20.02.07.
I am currently developing with the SENSOR example of the CC1310.
I have written code that when I enter the command “sleep”, the do_sleep() function is called to enter deepsleep mode.
However, I am experiencing a problem that when I type command, deepsleep is executed only while the do_sleep() function is called and executed, causing the voltage to drop to 0.25mA and then rise back up to 0.5mA.
How can I make the do_sleep() function stay in deepsleep mode until I enter another command?
And once I enter deepsleep mode, I want the voltage to go down to at least 0.005mA, so what do I need to add to my code, and what documentation do I need to refer to?

main function

============================

int main(void)
{
Board_init();

Task_Params taskParams;

#ifdef ONE_TASK_CREATE
Task_Params testTaskParams;

#endif

#ifndef USE_DEFAULT_USER_CFG
macUser0Cfg[0].pAssertFP = macHalAssertHandler;
#endif

#if ((CONFIG_RANGE_EXT_MODE == APIMAC_HIGH_GAIN_MODE) && \
defined(DeviceFamily_CC13X0) && !defined(FREQ_2_4G))
macUser0Cfg[0].pSetRE = Board_Palna_initialize;
#endif
/*
Initialization for board related stuff such as LEDs
following TI-RTOS convention
*/
PIN_init(BoardGpioInitTable);

#ifdef FEATURE_BLE_OAD
/* If FEATURE_BLE_OAD is enabled, look for a left button
* press on reset. This indicates to revert to some
* factory image
*/
if(!PIN_getInputValue(Board_PIN_BUTTON0))
{
OAD_markSwitch();
}
#endif /* FEATURE_BLE_OAD */

#if defined(POWER_MEAS)
/* Disable external flash for power measurements */
Board_shutDownExtFlash();
#endif

#if defined(FEATURE_BLE_OAD) || defined(FEATURE_NATIVE_OAD)
SPI_init();
#endif

#if 1
char input;
const char echoPrompt[] = "AXM500 Device Starting \r\n";
UART_Handle uart;
#endif

/* Enable System_printf(..) UART output */
UART_init();
UART_Params_init(&uartParams);

#ifdef TASK_COMMAND

uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudRate = 115200;
hUart = UART_open(Board_UART0, &uartParams);
if (hUart == NULL)
{
System_abort("Error opening the UART");
}


#else
uartParams.readMode = UART_MODE_CALLBACK;
uartParams.readCallback = Uart_ReadCallback;
uartParams.writeMode = UART_MODE_CALLBACK;
uartParams.writeCallback = Uart_WriteCallback;

uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;

uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudRate = 115200;


UartPrintf_init(UART_open(Board_UART0, &uartParams));
UART_write(hUart, echoPrompt, sizeof(echoPrompt));
#endif
System_printf(" \r\n");
System_printf(" ===========================================\r\n");
System_printf(" AXM500 Device Starting \r\n");
System_printf(" SW Version : %d.%d \r\n", VER_MAJOR, VER_PATCH);
System_printf(" Release Date : %s /%s \r\n", __DATE__, __TIME__);
System_printf(" ===========================================\r\n");


//const char echoPrompt[] = "\n Reboot()\n";
//UART_write(hUart, echoPrompt, sizeof(echoPrompt));

#ifdef OSAL_PORT2TIRTOS
_macTaskId = macTaskInit(macUser0Cfg);
#endif

/* Configure task. */
Task_Params_init(&taskParams);
taskParams.stack = appTaskStack;
taskParams.stackSize = APP_TASK_STACK_SIZE;
taskParams.priority = APP_TASK_PRIORITY;
Task_construct(&appTask, appTaskFxn, &taskParams, NULL);

#ifdef DEBUG_SW_TRACE
IOCPortConfigureSet(IOID_8, IOC_PORT_RFC_TRC, IOC_STD_OUTPUT
| IOC_CURRENT_4MA | IOC_SLEW_ENABLE);
#endif /* DEBUG_SW_TRACE */

#ifdef ONE_TASK_CREATE

/* Configure task. */
Task_Params_init(&taskParams);
taskParams.stack = appTasktestStack;
taskParams.stackSize = APP_TASK_STACK_SIZE;
taskParams.priority = APP_TASK_PRIORITY;
Task_construct(&appTasktest, appTasktestFxn, &taskParams, NULL);

#endif


pthread_t thread;
pthread_attr_t attrs;
struct sched_param priParam;
int retc;

pthread_attr_init(&attrs);

priParam.sched_priority = 2;
retc = pthread_attr_setschedparam(&attrs, &priParam);
retc |= pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
retc |= pthread_attr_setstacksize(&attrs, THREADSTACKSIZE);

// Continue even if attribute setting fails
if (retc != 0) {
System_printf("fail thread\r\n: ");
while (1);
}

/* Create the thread for the main application logic */
retc = pthread_create(&thread, &attrs, mainThread, NULL);

/* failed to create thread */
if (retc != 0) {

System_printf("Failed to create thread\r\n: ");
while (1);
}

BIOS_start(); /* enable interrupts and start SYS/BIOS */
return (0);

}

============================

  

  • Hi Susung,

    Since you're using an RTOS, you can let the power driver handle this for you.

    In fact, most of our example projects already use the power driver in this way: Set the required power constraints to allow the device to go to standby (aka sleep). When there is no active task, the power driver will send the device to standby, no API call necessary.

    If you want to know more about the power driver you can read the Power Management guide:

    https://dev.ti.com/tirex/explore/content/simplelink_cc13x0_sdk_4_20_02_07/docs/tidrivers/Power_Management.pdf

    Cheers,

    Marie H

  • 질문에 답변해 주셔야 합니다.
    TI-RTOS의 Power 드라이버를 사용하라는 지시를 내가 do_sleep() 내부에서 선언하는 것처럼 말하는 것을 환영합니다.
    "Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
    Power_setConstraint(PowerCC26XX_SB_DISALLOW);
    Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
    Power_sleep(PowerCC26XX_STANDBY);
    " 내가 나서게 된거야? 내가 공부한 지 얼마 되지 않아서 더 나은 답변을 얻지 못했습니다. 잘못된 사용 방법을 알려줄 수 있었나요?
    그리고 센서 예제의 정의가 사용되지 않았습니까? "POWER_MEAS" 정의는 cc1310의 power를 ON으로 정의한 것입니까?

  • Part Number: LAUNCHXL-CC1310

    Tool/software:

    hi
    I am currently developing using cc1310 LAUNCHXL and the sensor example in resource. I used the TI-RTOS power driver to enter deepsleep mode using the Power_sleep(PowerCC26XX_STANDBY) command to enter deepsleep mode. But when I measure the voltage, the current consumption is still high at ~2.5mA when the device is in deepsleep mode. I want to reduce it to 0.005mA.
    Could there be other modules that are still powered on in hibernation?
    - I did a search and found that “this is because the TSCH scanning thread and scheduler continue to run while keeping the MCU active, preventing the MCU from going into deep sleep.” I saw that TSCH is used in the sensor example in the cc1310 SimpleLink CC13x0 SDK -4.20.02.07 version of the sensor? I know that the cc1310 does not support TSCH, but if it does, how do I turn off TSCH and how do I know if it is being used?
    How can I power them off?

  • Hi Susung,

    If you look in the CC1310 data sheet you will see thay power consumption in standy mode (sleep) is 0.7 uA. If you're measuring 2.5 mA you're device is probably in Active or Idle mode. You can find all the power consumptions numbers in the data sheet:

    https://www.ti.com/lit/ds/symlink/cc1310.pdf

    We have an app note that walks you through the best practice for measuring power consumption:

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

    Please use a standard SDK example, e.g. the pin standby example, follow the steps in the app note, and let me know what kind of numbers you are seeing.

    https://dev.ti.com/tirex/explore/node?node=A__AP-9OkmqXEW6p5a7hRtePg__com.ti.SIMPLELINK_CC13X0_SDK__eCfARaV__LATEST&placeholder=true

    Cheers,

    Marie H