Sleep and timestamps

Hi all,
I’m using a set of EVK1000 board to develop a symmetric two way ranging algorithm. To get the lowest power consumption possible I would like to put in sleep mode the devices during the turn around period which is about 50 ms for other project constraints reasons. If I put in sleep mode the devices the rx and tx timestamp get inconsistent. It seems that they get zeroed at each wakeup so I can’t measure the turn around time. Am I right? How can I get correct timestamp after waking up from a low power mode?

What API are you using. We have example code for for TX and RX going to sleep.
Probably the reason why no time stamps is because you did not load the LDE.

See note 3 of the main.c

  1. In this example, LDE microcode is not loaded upon calling dwt_initialise(). This will prevent the IC from generating an RX timestamp. If
  • time-stamping is required, DWT_LOADUCODE parameter should be used. See two-way ranging examples (e.g. examples 5a/5b).
1 Like

Hi Leo,
thanks for reply. I’m using a quite old version of the API, the 2.16.01, because I started from the EVB1000 demo source code. When I call the dwt_initialise() function I set the DWT_LOADUCODE flag like the example.
My issue starts if I compare the timestamps read before and after sleeping. If I read the system timestamp, sleep for a while and then read again I would like to get a measure of the sleep time but it’s not what I get. After wakeup the timestamp is somehow resetted. Is this true? How can I estimate the sleep duration using decawave’s internal clocks?
Thank you very much

Hi Mirco,

yes, of course the timestamps are zeroed. When the DW1000 goes into sleep mode the clock is turned off. If you are doing ranging the device cannot go into sleep mode in the middle of ranging exchange. If you want low-power, you should finish the ranging in as quick time as possible (having 6.81 data rate, fastest SPI rate, fast MCU speed etc.) and then put the DW1000 into sleep, before next ranging attempt. This is how the Decawave’s example applications work (e.g. TREK, EVK, and simple examples). Also if you employ delayed RX/TX then the DW1000 will be in RX only when needed and IDLE otherwise which will also improve power consumption.


Thank you Zoran,