I try to build system based on 3 DW1000 components, two tags and one anchor.
Tags send data in about 6Hz and as I understand, Anchor should receive all messages without missing because of double buffer.
In reality, I get something like:
1 BlinkN 1
2 BlinkN 1
1 BlinkN 2
2 BlinkN 2
1 BlinkN 3
2 BlinkN 3
1 BlinkN 4
1 BlinkN 5
1 BlinkN 6
1 BlinkN 7
2 BlinkN 6
2 BlinkN 7
2 BlinkN 8
2 BlinkN 9
1 BlinkN 10
2 BlinkN 10
1 BlinkN 11
2 BlinkN 11
Where 1 means the data from first tag and 2 from second.
If I print timestamp for each interrupt, I see that the missing start when the difference between tag 1 and tag 2 becomes less than 4 seconds (The clocks of tags are drifting, so the difference .goes up and down).
What could be the problem?
And am I right that one anchor in double buffer mode should not miss almost any data from two tags?
IC… toggles from 0 to 1.
Assuming you have a high efficient implementation and you have read aps021, how can you guarantee that your blinks would not overlap with a timep? If you have blinks, which starts overlapping, then the receiver would stick to either from them. Then after certain amount of time, blinks would stop overlapping and you will receive both again.
Double buffer with auto re-enable is working perfectly for streaming of the data. But unfortunately it has an isue for timestamp generation in one very special case, which does not looks like yours. Decawave has confirmed that they are using DB with manual re-enable only in all high throughput applications.
thank you for your answer.
Yes, I carefully read about overlapping, but does it makes sense the overlapping when the difference is 4 MILI second? It sounds to me too much time, doesn’t it?
Have you implemented sending of blinks from different tags such, that they are sending blinks using TDMA, I.e. each in its time slot?
Other words, what makes you think that the time difference in between sending of blinks from independent tags keep stays constant over a time?
I think to debug the issue and for beter understanding, you need to use the debugging technique, described in the Aps021.
thank you for your help!
No, I don’t use TDMA because I don’t want to synchronize one tag with another.
I’m sure that time difference doesn’t keep constant.
Evermore, I checked it and found that I start miss blinks when the time difference of arrival is less than 4 ms.
It means, I wrote simple code that prints the following data:
Device ID, Blink N, time of arrival (I tried both - using timestamp of UWB and micros() of Arduino)
The result is the same. It works fine, switches the receive registers, but when the time difference between two tags’ blinks is less than 4 ms I miss blink till the difference drifts again to be 4 ms.
I debt if 4 ms is not too long? The sending/reception time should be less than 1ms, shouldn’t it?