Tool/software: Code Composer Studio
I have an application which is based on a modified version of the rfSynchronizedPacketTx/rfSynchrinizedPacketRx example. I have the RF_cmdPrpTx to transmit a packet exactly every 2 seconds. What happens is that transmission goes on steadily at ever 2 seconds for about 6 minutes after which it starts transmitting a packet after every 18 minutes. Could you kindly explain to me how i can rectifiy such a situation.
settings:
...
/******************************* Prepare the packet *********************************/
RF_cmdPropTx.pktLen = sizeof(beacon);
RF_cmdPropTx.pPkt = (uint8_t*)&beacon;
RF_cmdPropTx.startTrigger.triggerType = TRIG_ABSTIME;
RF_cmdFs.startTrigger.triggerType = TRIG_ABSTIME;
RF_cmdFs.startTrigger.pastTrig = 1;
RF_cmdPropTx.startTime = 0;
beacon.beaconInterval = RF_convertMsToRatTicks(BEACON_INTERVAL_MS);
...
RF_Params rfParams;
RF_Params_init(&rfParams);
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
assert(rfHandle != NULL);
uint32_t swiPriority = 1;
RF_control(rfHandle, RF_CTRL_SET_SWI_PRIORITY, &swiPriority);
RF_EventMask result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
assert((result == RF_EventLastCmdDone) && ((volatile RF_Op*)&RF_cmdFs)->status == DONE_OK);
RF_cmdPropTx.startTime = RF_getCurrentTime();
ntime = RF_cmdPropTx.startTime;
RF_cmdPropTx.startTrigger.pastTrig = 1;
PINCC26XX_setMux(pinHandle, Board_LED2, PINCC26XX_MUX_RFC_GPO1);
StateMachine_setNextState(&stateMachine, PeriodicBeaconState);
}
execution
void PeriodicBeaconState_function()
{
RF_cmdPropTx.startTime += RF_convertMsToRatTicks(BEACON_INTERVAL_MS);
//vTime = RF_getCurrentTime();
beacon.txTime = RF_cmdPropTx.startTime;
beacon.ledState = PIN_getInputValue(Board_LED1);
RF_EventMask result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0); =================>>>( after 6 minutes it gets stuck here, and transmission then becomes ever 18mins)
assert((result == RF_EventLastCmdDone) && ((volatile RF_Op*)&RF_cmdPropTx)->status == PROP_DONE_OK);
PIN_setOutputValue(pinHandle, Board_LED1,!PIN_getOutputValue(Board_LED1));
StateMachine_setNextState(&stateMachine, PeriodicBeaconState); //always the case if its the sensor node
...
Thank you very much