Can someone please ELI5 what "Half Period Delay Warning" is?

Hi, I’m trying to implement this 1 way (1 round trip instead of the more complicated 2) ranging scheme, and my responder seems to consistently fail to send back response to the ranging initiator.

A read on the 0x2F register shows that I’m having HPW issue. I looked it up in the user manual of DWM1001 and it says it’s about “Half Period Delay Warning”.

Then I’m pretty much lost there. I couldn’t tell if its because the delay was too long? too Short? Or not the right value???

Cans someone please help? The register polling result is shown in pic below:


BTW, switching transmission from delayed to immediate seem to drastically improve, if not altogether eliminate this problem

The decawave chip uses a 40 bit long internal clock running with a period of ~16ps.
This means that the internal clocks wrap around roughly every 16 seconds.

The half period delay warning indicates that you have scheduled something to happen at a time more than half of this period away (i.e. 8 seconds in the future or more)

The most common cause of this is trying to schedule something for a time which has just happened because your processing took longer than expected and you’ve just missed the time you wanted.

I’ve also seen it caused by attempting to schedule a Tx a fixed time after an invalid Rx timestamp.

Sometimes the leading edge detection and correction goes wrong and you get what looks like a valid Rx but the corrected time is junk. If you then schedule a Tx for a fixed time after this reception you end up locking up for up to 16 seconds waiting for the correct time to roll around. One sanity check I found handy was to compare the Rx Timestamp with the raw Rx timestamp. They should be roughly the same but when this happens the two times are completely different.

Very detailed! You clarified at least 3 of my confusions up. Thanks a lot.

Apparently you can’t schedule a Tx event too far into the future or the prized feature of DWM1001 - precision timestamping will no longer be so precise because it surpasses the time-range of the clock: 16 seconds, or at least, significantly increases the chance of that happening.

I have learned. Thank you!