Problem with extract CIR data from DWM1001 using SES

Hi, everyone.
Recently I’m trying extracting CIR data from the DWM1001 using Segger Embedded Stdio(SES), but I meet some problems.
I use the DWM1001-exampls as the software for DWM1001 hardware and try to get the CIR data in the tx device after tx-rx transmission is successful. The CIR data is transmitted through a USB data cable to the computer.
I added the dwt_readaccdata() into the int ss_init_run(void) to get CIR data from the register and try to export the whole CIR data of 4064 octets using printf(), but the result are confusing.
For each round of tx-rx transmission, the first 80 to 100 sets of 16-bit complex integer CIR data can be exported correctly with printf(), then the rest data output are in disarray.
I added a ‘success’ string after the CIR data export using printf() and made some tests, but I never see the ‘success’ string successfully displayed before the next tx-rx transmission begins. I doubt that the CIR data export using printf() is interrupted by the tx-rx transmission loop, but I’m not sure about this.
So does anyone have an idea on this problem? Can a huge data be transmitted through USB cable before the start of the next tx-rx transmission loop?
Best regards!

It usually has to do with the size of the buffer (256 by default). you can use fflush to purge the transmission and / or increase the buffer size


hi,Fdiaz, thanks for your reply.
I try the latter solution, it helps solve the problem a little but it seems transferring 1016 16-bit integer within 0.125s is still a problem. For now I have to transmit these data correctly by delaying a period for relatively small mount of bit of data.
So may I ask you to provide a little more information about the fflush? I’m a beginner and a bit confused on the fflush function you mentioned.
Thank you.
best regards.

Hi yp-whu,
You mentioned you have get the CIR data successful in DWM1001. We want to do it too. But I don’t know how to do? Could you please share how you got these data? I really need some help. PLZ~
Thank you!

Hi yzdll,
You can download the “dwm1001-examples-master” from GitHub, this example provides a solution example on ranging, data acquisition and contains a lot of useful APIs.
Then you can read the document “DW1000 user manual” as a reference. The section 7.2.38 details where the CIR data is in the hardware register. So you can modify the example solution and use API to get the CIR data.
Besides you can refer the related topics on the forum, they are also very helpful.
Hope it help.
Best regard.

1 Like

Hi yp-whu,
Thank you for your reply. I will try it!!!
Best regards~

Dear yp-whu,
Thanks a lot. follow your instruct, I get the CIR data from dwm1001. I find the same problem as you. I add ‘acc data:’ string before the CIR data. Like this:
printf(“Acc Data: “);

dwt_readaccdata(acc, data_len + 1, j);

printf(”%02x”, acc[k]);
But in the test data, I find many 'Acc Data: '. And I plot the data in matlab, the results appear as shown below.

Is it the same as yours?
Best regard.

Hello, yzdll
I’m not sure about your result.
In my opinion, the CIR data for one range measurement under LOS conditions has a significant peak.
Here is one of my result:

Hi yp-whu,
Could you tell me how you solve your problem that a huge data be transmitted through the USB cable?
I review the “dwm1001-examples-master” from GitHub but have not an idea.

Now I get the CIR data in the memory. Once I send them to USB, the DWM chip would stop working.

Thank you
Best regards

Can you please help me on how to extract/output the CIR data via USB after flashing the “ex_02c_rx_diagnostics” example .bin file on the board?