Dw1000_api example project

Hi,

In API example project(dw1000_api_rev2p14_stsw), there is a constant defined as UUS_TO_DWT_TIME 65536. Explanation in the comment section not describing this. How this value is derived?

/* UWB microsecond (uus) to device time unit (dtu, around 15.65 ps) conversion factor. 1 uus = 512 / 499.2 µs and 1 µs = 499.2 * 128 dtu. */

#define UUS_TO_DWT_TIME 65536

Regards,
Shijo Thomas

maybe you need glasses :slight_smile:

the comment says:

1uus = 512/499.2 micro seconds … this gives 1.0256 micro seconds, and when you convert this to device time units (in DW1000 clock units), you have 1.0256e-6/15.65e-12 = 65536