HI, I am using RF timer time stamp for calculation of the received packet duration as following:
preamble length : 4 bytes
sync : 4 bytes
length : 1 byte
data : 17 byte
CRC : 2 bytes
#define RADIO_TIME_2_MCS(radioTime) (radioTime /4)
/* Enter RX mode and stay forever in RX */
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRx, RF_PriorityNormal, &callback, IRQ_RX_ENTRY_DONE);
...
void callback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e)
{
if (e & RF_EventRxEntryDone)
{
TxTS = m_rxStatistics.timeStamp;
RxTS = RF_getCurrentTime(); //taken in callback()
Duration = RADIO_TIME_2_MCS(RxTS - TxTS);
....
}
}
Data Rate:50 kb/sec
the result:5040-5060 mcs
packet length = Duration/160 = 31.625
but actual length is 28 bytes
Q: what is the right way to use Rf timer time stamps?