I want to use the api function “dwt_setpreambledetecttimeout” to check whether there is a response. my code is listed below:
dwt_starttx(DWT_START_TX_IMMEDIATE | DWT_RESPONSE_EXPECTED);
Then i record the dw1000 timestamp of TxTime and PtoTime(Preamble Timeout), I suppose “PtoTime - TxTime” should be equal to “(4+1)*pacsize” which is about 40us, however, in my arm system, the result is 352us, where is the mistake?
How are you capturing the PTO time?
The TX time is captured at end of SFD - RMARKER, not end of frame. The receiver will turn on after TX is done, as long there is no RX on delay dwt_setrxaftertxdelay(0)
I Read dw1000 system time in PTO interrupt routine.
you are right, considering the length of payload is 13 bytes, it will takes 40+ extra us to complete the packet transmissioin, but still can’t explain why PTO takes 352us.
What do you set PTO to? And what PAC size do you use?