Tool/software: Code Composer Studio
Hello, I use CC2652P, SimpleLink SDK v4.20, TI15.4 stack.
in ApiMac_mcpsDataCnf_t, there is timestamp and timestamp2. I use equations below in https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread/f/158/t/736993 :
For 2.4G application, one symbol is 16us, RF timer unit is 0.25us, so, timer ticks per symbol is 16/0.25=64.
So, txTime = timestamp * 64 + timestamp2. This txTime should be the actual time when the data sent.
On the other hand, I can get RF timer tick with RF_getCurrentTime().
In my application, I calculate txTime with the equation above in dataCnfCb, and then I read current RF tick with RF_getCurrentTime().
I need to know how long has passed from when the data sent(txTime) to when I call RF_getCurrentTime(). By the way, I use tx options with no ack.(In code : dataReq.txOptions.ack = false)
I think this passed time should be some us or ms.
I tried to calculate this passed time with RF_getCurrentTime() - txTime, but I found this calculation is wrong.
So, my question is how to get the correct passed time from when the data sent to when I call RF_getCurrentTime() in dataCnfCb?
Or, is there any other way to get the correct passed time from when the data sent to when my code enter dataCnfCb?







