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.

cc1310 go to standby and wake up by interrupt I/O

Other Parts Discussed in Thread: CC1310

Dear all,

I am using Ti RTOS for my project.

I want to transmit RF then when transmit RF is competed ,it goes to standby mode by function "Power_sleep(PowerCC26XX_STANDBY);"

it will wake up when there is an interrupt event  on I/O in Low level

but when it went to standby and an interrupt event occurs ,it did not wake up

can anyone help me ?

Thanks,

Thanh.

  • Have you looked if you can use parts of the pinStandby example in TI-RTOS?
  • Dear TER,

    Thank you for reply

    Yes, I have looked Pinstandby example in Ti RTOS.

    But in my project, I wanted cc1310 goes into standby until it is woken up by I/O interrupt. it means that cc1310 wake up independent time.

    at the moment, I made it go into standby with current 1uA when I used Power_sleep(PowerCC26XX_STANDBY) .

    But my problem is that I did not wake up it

    Thanks,

    Thanh

  • Hi Thanh,

    please have a look at this thread. I guess you misunderstand TI-RTOS power management. Do not use Power_sleep() manually, but let the scheduler figure out when to go to standby.

  • Hi Richard,

    I have looked that thread and I tried to used it but its is too high

    could you give me some example about low power mode of CC1310?

    Best regards,

    Thanh.

  • Dear Thanh,

    your question is too unspecific. In the referenced thread, I have compressed what application developers need to know about power management, especially in this answer. If you want to understand the power management, have a look into the official documentation. It may take some time and effort to understand, but please invest it. If you have a specific question, for example to understand a piece of code or a concept, then I can help you.

  • Hi Richard.

    Thank you for reply!

    I tried to use " Power_setDependency(PERIPHERAL);
    Power_releaseDependency(PERIPHERAL);"
    and
    "Power_setConstraint(POWERCC26XX_SB_DISALLOW);
    Power_releaseConstraint(POWERCC26XX_SB_DISALLOW);"

    but current is still too high about 5mA when I transmit RF data.

    blow, This is my code

    /***** Function definitions *****/
    void TxTask_init(void)
    {

    Task_Params_init(&txTaskParams);
    txTaskParams.stackSize = TX_TASK_STACK_SIZE;
    txTaskParams.priority = TX_TASK_PRIORITY;
    txTaskParams.stack = &txTaskStack;
    txTaskParams.arg0 = (UInt)1000000;

    Task_construct(&txTask, txTaskFunction, &txTaskParams, NULL);


    }

    static void txTaskFunction(UArg arg0, UArg arg1)
    {


    if (PIN_registerIntCb( buttonPinHandle , &buttonCallbackFxn) != 0) {
    System_abort("Error registering button callback function");
    }

    RF_Params_init(&rfParams);

    RF_cmdPropTx.pktLen = PAYLOAD_LENGTH;
    RF_cmdPropTx.pPkt = packet;
    RF_cmdPropTx.startTrigger.triggerType = TRIG_ABSTIME;
    RF_cmdPropTx.startTrigger.pastTrig = 1;
    RF_cmdPropTx.startTime = 0;

    /* Request access to the radio */
    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);

    /* Set the frequency */
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);

    /* Get current time */
    time = RF_getCurrentTime();


    while(1)
    {
    if(status==1)
    {

    Power_setConstraint(PowerCC26XX_SB_DISALLOW);
    Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);

    /* Create packet with incrementing sequence number and random payload */
    packet[0] = (uint8_t)(seqNumber >> 8);
    packet[1] = (uint8_t)(seqNumber++);
    uint8_t i;
    for (i = 2; i < PAYLOAD_LENGTH; i++)
    {
    packet[i] = rand();
    }

    /* Set absolute TX time to utilize automatic power management */
    time += PACKET_INTERVAL;
    RF_cmdPropTx.startTime = time;

    /* Send packet */
    RF_EventMask result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
    if (!(result & RF_EventLastCmdDone))
    {
    /* Error */
    while(1);
    }
    status=0;

    Power_releaseConstraint(PowerCC26XX_SB_DISALLOW);
    Power_releaseConstraint(PowerCC26XX_IDLE_PD_DISALLOW);

    }

    }
    }
    void buttonCallbackFxn(PIN_Handle handle, PIN_Id pinId)
    {

    if (!PIN_getInputValue(IOID_11)) {
    status=1;
    }

    }

    /*
    * ======== main ========
    */
    int main(void)
    {

    PIN_init(PinTable);
    /* Construct heartBeat Task thread *
    IOCPortConfigureSet(IOID_11,IOC_PORT_GPIO ,0x30054000);
    /* Open LED pins */

    buttonPinHandle = PIN_open(&buttonPinStatus, buttonPinTable);

    TxTask_init();

    System_printf("Starting the example\nSystem provider is set to SysMin. "
    "Halt the target to view any SysMin contents in ROV.\n");
    /* SysMin will only print to the console when you call flush or exit */
    System_flush();

    /* Start BIOS */
    BIOS_start();

    return (0);
    }

    in my code, if I did not used
    Power_setConstraint(PowerCC26XX_SB_DISALLOW);
    Power_setConstraint(PowerCC26XX_IDLE_PD_DISALLOW);
    its current is low about 10uA ,that I wanted to achieve. But it goes to standby and when an interrupt to wake up , its RF did not occur again

    I want to achieve that my project has a lower 10uA current and use RFcore.

    Do you understand my problem?

    Thanks and best regards,

    Thanh
  • Hi Thanh,

    a few remarks regarding your code:

    • Please use syntax highlighting when posting code. It's a button in the rich text editor. This makes code much more readable. Thanks.
    • What do you want to achieve with the power constraints in your example? They are not needed. Even worse: You do not allow the controller to enter standby while waiting for the RF command to be started. Just remove them.
    • Do not use shared variables (status in your case) between HWI/SWI and tasks or at least, declare them volatile if you can guarantee atomic access. This is a very common programming mistake when dealing with concurrency. Instead, use TI-RTOS synchronization data types like Semaphore or Event. This is explained in the kernel user guide chapter 4.
    • What is the purpose of IOCPortConfigureSet(IOID_11,IOC_PORT_GPIO ,0x30054000); ?

    If you solve the last 3 problems, then your program will work. Have a look at this post in the above mentioned thread. It implements almost completely your use-case. You just need to add the RF part and you probably need to adjust the timing. If you want to send a packet everytime you click on a button, then you must use TRIG_NOW as a start trigger instead.

  • Hi Richard,

    Thank you for your help.

    now, I only want my project goes to standby whith 1uA and wake up .

    My project has used spi, RF, I/O interrupt.

    Best Regards,

    Thanh.