Question on DX_TIME register and dwt_setdelayedtrxtime()

Hi everyone,

I’m new to DW1000 and was having this question when studying the example ex_05a_ds_twr_init in DW1000 driver API. It’s mainly about this line

/* Compute final message transmission time. See NOTE 10 below. */
final_tx_time = (resp_rx_ts + (RESP_RX_TO_FINAL_TX_DLY_UUS * UUS_TO_DWT_TIME)) >> 8;

According to the API document, it says that dwt_setdelayedtrxtime() writes to the high 32 bits to DX_TIME register (0x0A), which agrees with shifting by 8 bits above.

Also, in NOTE 10 it says the delay resolution is 512 dtu and hence the lower 9 bits need to be zeroed, which confirms that DX_TIME ignores the lower 9 bits.

So my questions are the followings:

  1. When writing a 32-bit word to DX_TIME, it doesn’t matter if the lowest bit of that word is 0 or 1, does it?
  2. If the lowest bit of that 32-bit word is 1, it’s actually treated as 0 and correspondingly the TX/RX delay is set at 0b…0 (it seems so from later of that code).

Thank you,

I think you correct.

1 Like