Hello All,
I have a custom board which based on cc1312R. I have RF_Buffer which has1000 byte length (one packet). I am transmitting this buffer to the receiver one time in every 8 second. Rf_buffer contains only fixed number.
I am able to send this buffer during around 4 minute. For one minute 7-8 packet, totally I could send 28-30 packet. But after that there is no more transmission. Because The program doesnt enter inside txtaskfunction anymore.
parameters that I use in the code for tx_task is below.
#define TX_STACK_SIZE 1024
PAYLOAD_LENGTH = 1000
unsigned char RF_Buffer[PAYLOAD_LENGTH+2];
static Task_Params txTaskParams;
Task_Struct txTask;
static uint16_t txTaskStack[TX_STACK_SIZE];
void TxTask_init(PIN_Handle inPinHandle)
{
hPin = inPinHandle;
Task_Params_init(&txTaskParams);
txTaskParams.stackSize = TX_STACK_SIZE;
txTaskParams.priority = TX_PRIORITY;
txTaskParams.stack = &txTaskStack;
txTaskParams.arg0 = (UInt)2;
Task_construct(&txTask, txTaskFunction, &txTaskParams, NULL);
}
void txTaskFunction(UArg arg0, UArg arg1) { uint16_t index_2; uint32_t RFtime; RF_Params rfParams; RF_Params_init(&rfParams); RF_cmdPropTxAdv.pktLen = PAYLOAD_LENGTH+2; RF_cmdPropTxAdv.pPkt = RF_Buffer; RF_cmdPropTxAdv.startTrigger.triggerType = TRIG_ABSTIME; RF_cmdPropTxAdv.startTrigger.pastTrig = 1; if (!rfHandle){ rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams); RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0); } RFtime = RF_getCurrentTime(); while(1) { if(accel_time_flag == 1) { accel_time_flag = 0; RF_Buffer[1]=(uint8_t)(PAYLOAD_LENGTH >> 8); RF_Buffer[0]=(uint8_t)(PAYLOAD_LENGTH); for(index_2 = 2; index_2 < PAYLOAD_LENGTH+2; index_2 ++) { RF_Buffer[index_2] = index_2-2; } RF_Buffer[1000]='\r'; RF_Buffer[1001]='\n'; RFtime += PACKET_INTERVAL; RF_cmdPropTxAdv.startTime = RFtime; RF_EventMask result = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0); if (!(result & RF_EventLastCmdDone)) { while(1);} memset(RF_Buffer, 0, sizeof(RF_Buffer)); PIN_setOutputValue(hPin, STA_LED,!PIN_getOutputValue(STA_LED)); } } }
What do you think about this problem? what can it block to enter inside txtaskfunction after 4 minute.
thank you
BR
Bekir