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 lower the voltage in cc1310 deepsleep mode?

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

Tool/software:

int main(void)
{
// Initialize the board
Board_init();

// Initialize task parameters
Task_Params taskParams;

#ifdef ONE_TASK_CREATE
Task_Params testTaskParams;
#endif

#ifndef USE_DEFAULT_USER_CFG
// Use custom user configuration for board settings
macUser0Cfg[0].pAssertFP = macHalAssertHandler;
#endif

#if ((CONFIG_RANGE_EXT_MODE == APIMAC_HIGH_GAIN_MODE) && \
defined(DeviceFamily_CC13X0) && !defined(FREQ_2_4G))
// Initialize PALNA if range extension mode is enabled for specific device family and frequency
macUser0Cfg[0].pSetRE = Board_Palna_initialize;
#endif

// Initialize board-related tasks such as LEDs following TI-RTOS convention
PIN_init(BoardGpioInitTable);

#ifdef FEATURE_BLE_OAD
// Check for left button press on reset if FEATURE_BLE_OAD is enabled
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)
// Initialize SPI if BLE OAD or Native OAD is enabled
SPI_init();
#endif

#if 1
// Set up input variable and initial welcome message
char input;
const char echoPrompt[] = "AXM500 Device Starting \r\n";
UART_Handle uart;
#endif

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

#ifdef TASK_COMMAND

// Configure UART parameters
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudRate = 115200;

// Open UART and handle error
hUart = UART_open(Board_UART0, &uartParams);
if (hUart == NULL)
{
System_abort("Error opening the UART");
}

#else
// Configure and initialize UART parameters
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

// Print system output and version/release information
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");

#ifdef OSAL_PORT2TIRTOS
// Initialize MAC task by converting OSAL to SYS/BIOS
_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
// Configure debug SW trace settings
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

// Set up and create main thread
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)
;
}

// Enable interrupts and start SYS/BIOS
BIOS_start();

return (0);
}

---------------------------------------------------------------------------------------------

Thanks for the reply.
Currently, when I use “Power_sleep(PowerCC26XX_STANDBY)” to enter sleep mode, 0.25mA is output. I think there are some devices alive in standby mode, so I'm looking for them. When I use UART_close() function to enter sleep mode, the value of sleep current drops to 0.22mA when I close the UART. I'm wondering if there are more things I can shut down in the main loop? Also, when shutting down the uart, the pin of the uart used in the cc1310 is also pulldown, is that the setting I need to do to enter sleep mode?
And I was wondering, is it a problem to use threads or tasks to turn off other devices after entering sleep mode?

  • Please provide info on what HW you are running on (LP or custom HW) and what SW you are running (SDK version and example code) so we can try to understand what you are doing.

    There are comments regarding 2.4 GHz and BLE in your code example (none of which is supported by the CC1310) so I am confused as to what SW you run.

    I would strongly recommend that you start by verifying the correct standby current by running a simple example that you know will put the device in Standby (pinStandby (ti.com)). From there you can add more drivers and functionality to try to figure out where the extra current comes from.

    Siri

  • Thanks for the reply.
    I am using the Simplink CC13x0 SDK -4.20.02.07.
    I am currently developing with the sensor example of the CC1310.
    I am currently writing the code to send the data to the collector when there is an interrupt on GPIO 14 PIN, I have currently written the code to send the data to the collector and now I want to add deepsleep so that whenever I send the data, it will briefly come out of deepsleep state, send the data and go back into deepsleep state. So currently I am using “Power_shutdown(NULL, 0)”, “Power_sleep(PowerCC26XX_STANDBY)” After running the code in the main loop to enter deepsleep mode, I measured the current and it is measuring 0.25mA. According to the cc1310 datasheet, the current value in standby is around 0.7uA. I think I have a device that is energized after entering the deepsleep command. And my question is: 1. Is “Power_shutdown(NULL, 0)”, “Power_sleep(PowerCC26XX_STANDBY)” the code to enter deepsleep mode or is there another command?
    2. if the above code is correct to enter deepsleep command, is it correct to pulldown the pins of the devices I used such as uart, I2S, RF core, etc. to disable them if I want to reduce the current?
    3. cc1310 datasheet says that “Active. MCU running CoreMark at 48 MHz” state takes about 2.5mA current, so now I entered “Power_shutdown(NULL, 0)”, “Power_sleep(PowerCC26XX_STANDBY)” command, is it active state?

  • What HW are you using?

    Siri

  • I am using cc1310 LAUNCHXL as HW.

  • You have already posted a thresad regarding this topic, and should use that one to follow up instead of assigning a new one:

    (36) LAUNCHXL-CC1310: How to use and maintain cc1310 deepsleep mode? - Power management forum - Power management - TI E2E support forums

    I will close this thread and then you should continue on the thread that you have already posted.

    SIri