Tool/software: TI-RTOS
Hi,
I have try to add the exemple rfPacketTx in my embeded software :
static void txTaskFunction(UArg arg0, UArg arg1) { uint32_t time; RF_Params rfParams; 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) { /* 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); } PIN_setOutputValue(pinHandle, Board_LED1,!PIN_getOutputValue(Board_LED1)); } }
But after RF_runCmd, my software go to while(1) -> Error... !
Do you know where the problem may come from?