Tool/software: TI-RTOS
Hi Team,
I have a few questions about the execution of an RF command:
1.RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRxSniff, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
When executing commands with runcmd, will the task block in this API?
2.Is the interrupt executed first or the status first?
/* Log RX_SNIFF status */ switch(RF_cmdPropRxSniff.status) { case PROP_DONE_IDLE: /* Idle based on RSSI */ worStatistics.doneIdle++; break; case PROP_DONE_IDLETIMEOUT: /* Idle based on PQT */ worStatistics.doneIdleTimeout++; break; case PROP_DONE_RXTIMEOUT: /* Got valid preamble on the air, but did not find sync word */ worStatistics.doneRxTimeout++; break; case PROP_DONE_OK: /* Received packet */ worStatistics.doneOk++; break; default: /* Unhandled status */ break; }; /* Called for every received packet and command done */ void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e) { /* If we've received a new packet and it's available to read out */ if (e & RF_EventRxEntryDone) { do { /* Toggle LED on RX */ PIN_setOutputValue(ledPinHandle, Board_PIN_LED1, !PIN_getOutputValue(Board_PIN_LED1)); /* Get current unhandled data entry */ currentDataEntry = RFQueue_getDataEntry(); /* Handle the packet data, located at ¤tDataEntry->data: * - Length is the first byte with the current configuration * - Data starts from the second byte */ packetLength = *(uint8_t*)(¤tDataEntry->data); packetDataPointer = (uint8_t*)(¤tDataEntry->data + 1); /* This code block is added to avoid a compiler warning. * Normally, an application will reference these variables for * useful data. */ dummy = packetLength + packetDataPointer[0]; } while(RFQueue_nextEntry() == DATA_ENTRY_FINISHED); } }