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: Receiver Done flag

Part Number: CC1310

Dear All,

we are working on CC1310 Launchpad, Downloaded code example SimpleLink CC13x0 SDK 1.60.00.21 (version 1.60.00.21).

I am using NORTOS rfEasylinkTx and rfEasyLinkRx examples for my Application.

I have a question from rfEasyLinkRx ,related to the code given below:

while(rxDoneFlag == false){

bool previousHwiState = IntMasterDisable();
/*
* Tricky IntMasterDisable():
* true : Interrupts were already disabled when the function was
* called.
* false : Interrupts were enabled and are now disabled.
*/
IntMasterEnable();
Power_idleFunc();
IntMasterDisable();

if(!previousHwiState)
{
IntMasterEnable();
}

/* Break if timeout flag is set */
if(rxTimeoutFlag == true){
/* Reset the timeout flag */
rxTimeoutFlag = false;
/* RX timed out, abort */
if(EasyLink_abort() == EasyLink_Status_Success)
{
/* Wait for the abort */
while(rxDoneFlag == false){};
}
break;
}
}

In this snippet we used:

IntMasterEnable();
Power_idleFunc();
IntMasterDisable();

if(!previousHwiState)
{
IntMasterEnable();
}

what this functions do, and is it neccessary to use this steps?

  • Hi Riki,

    This is done to allow the device to go into low-power modes while waiting for the flag to be set. As NoRTOS do not feature any kind of idle task that can call the Power_idleFunc (as in TI-RTOS where the idle task will invoke the chosen power policy) it is necessary to perform manually.
  • Hello M-W.

    Okay. Thanks for the reply. So basically it switches the power policy of the controller while it is waiting for an event, in our case, flag setting. So I assume I can safetly remove that section of the code if i do not want to change to low power mode.
    Reason behind this is in the critical section it disables the Master Interrupt.
    Doing this won't record any interrupt which will occur when the Master interrupt is disabled. So in this case the interrupt will get missed right?

    Regards,
    Riki.
  • Hi Riki,

    Yes you could remove this section if you don't want the power saving. Disabling the interrupts should not cause you to miss the interrupt itself, it should still be available and pending when interrupts are turned back on.