I follow the guide from: DW1000 : Wrong CIR value from Accumulator to read CIR data (it is really helpful by the way), however, my refresh rate reduce significantly when I add below code. The distance update update almost once a second.
My code basically read diagnostic information and CIR data.
rx_diag.firstPath = 0;
rx_diag.firstPathAmp1 = 0;
rx_diag.firstPathAmp2 = 0;
rx_diag.firstPathAmp3 = 0;
rx_diag.maxGrowthCIR = 0;
rx_diag.rxPreamCount = 0;
rx_diag.maxNoise = 0;
rx_diag.stdNoise = 0;
dwt_readdiagnostics(&rx_diag);
printf(“Count of preamble symbols accumulated: %d \r\n”,rx_diag.rxPreamCount);
printf(“Index of first path is %d \r\n”, rx_diag.firstPath / 64);
printf(“CIR max growth CIR: % d \r\n”,rx_diag.maxGrowthCIR);
printf(“LDE max value of noise: %d \r\n”, rx_diag.maxNoise);
printf(“Std of noise is %d \r\n”,rx_diag.stdNoise);
Also, here is my idea and hope it can help you guys understand.
I want to reproduce one paper: Chorus: UWB Concurrent Transmissions for GPS-like Passive Localization of Countless Targets - IEEE Conference Publication, which use CIR data.
Specially, it first reorder CIR data (as you may know, the first path is always on index 750) and then separate multiple pulses, which can be used to process concurrent transmission.
So what I need is reading the data from CIR rapidly so I can do more jobs of it.
Hi Lixing,
my guess is that printing the CIR is causing the reduced update rate. If you want to print the whole CIR thats more than 4K Byte of data and if you print them in ASCII the amount of data to be transmitted to your PC will explode.
From my experience, reading the CIR from the Decawave IC does not cause such a huge delay, it should not take longer than a few milli seconds (depending of your clock rate)
Can you disable printing the CIR to verify if this is causing the problem?
What you can do to speed up the process:
Use a high speed transmission protocol, like Segger RTT with 80MHz clock
Only print/send the relevant parts of the CIR
Do not print the CIR at all, rather print the results of your calculation
Hi Thorbjoern
I disable printing the CIR, the update rate increase a lot. Although it is not as fast as before, your suggestion is reasonable!
And your 3 ideas are pretty cool, I will try them later. Thanks
I also ran into similar problem before and found printing to terminal takes a considerable amount of time. So thanks for pointing out Segger RTT! After briefly googling about it, most of the use cases I saw were using RTT to print to a host PC terminal. Currently I’m using UART on DWM1001-DEV and exchange data with host PC via virtual COM, whose speed I’d like to make faster. Does Segger RTT also allow data exchange with host PC similar as UART?
Hi Jleng,
yes with RTT you can exchange data with a PC just like with UART.
You do not have to use the J-Link RTT Viewer or Client to receive the data.
You rather can use J-Link Commander to open a telnet port which you can use to send/receive data from your microcontroller. So the only difference is that the data is not provided via COM but via TCP.
Let me know if you need more help with that.