DWM3000EVB Raw CIR Capture Issues

Thanks for the reply, and the insights about the speed of different code pieces in the system. I connect to the device through the USB port on the Nordic board, and as far as I understand, I can either listen to the packages through UART, or the aforementioned JLink- which I’m using the latter.

I have tried to modify the code to find the bottleneck, it appears there are two issues. One is trying to read too many samples at once from the accmulator, and the second seems to be the speed during printing.Here are my findings:

  • If I try to read more than 33 symbols of CIR at once, reading to the memory fails, and the device only prints zeros. This seems to be related to the issue below. They talk about the SPI buffer possibly being too small, but I did not find any explicit solution. Incorrect reading CIR value from register
  • If I only print the index in the for loop (without any bit shifting/writing to memory etc., a very simple for loop), some of the indices are lost randomly. The device cannot even print (or maybe the serial link cannot capture) all of the data. However, if I add a Sleep(1) -1ms pause- within the for loop, I can print all indices successfully (1 to 992).
  • Likewise, if I read the data in chunks (smaller than 33), I can read the entire cir. On the other hand, I managed to make this work with 50ms Sleep in between each dwt_readaccdata. If I make this Sleep duration shorter, I start to miss the CIR packages again (maybe b/c of the print issue, or b/c of reading acc being slow, or data loss). On the other hand, CIR values do not seem to be meaningful, and the values jump abruptly in a periodic fashion. I have attached two figures, one is the absolute value (fig1), and the other one is the value difference between two packages (fig2) for full cir. I feel there might be a bit shift, that is corrupting all of the numbers but I’m not sure. Total number of samples captured to be as expected, so it should not be an issue with the printf command.The location of this shifting (or change), seems to happen randomly. I have tried to print a subset of the values (fig3: 640 samples, 300 before the peak location, fig4: 288 samples, 60 before the peak location) by extracting the peak, and printing nearby values, but they do not reveal anything either.

Thanks again
fig1_absolute_value_full_cir
fig2_diff_cir_packages
fig3_640tap_subset_cir
fig4_288tap_subset_cir