Hello,
I have 2 DWM3000EVB boards, attached to nRF52840 development kits, and I’m trying to capture raw channel impulse response. I have run into some issues while doing so, and I need some help. Here is the procedure -if anyone else is also interested-
-
I have compiled and run the simple TX code in one of the boards. I set the inter-delay period to 1s, so that I can capture the frame fully. I have also experimented with other periods, and my issue does not seem to be related to this period.
-
I am running rx with diagnostics example on the second device, and I have modified the diagnostics code as follows to output real/imaginary part of the channel impulse response. This is based on some other code snippets in the forum, but modified for the DWM3000EVB board based on the API documentation.
int8_t *cir;
int8_t cir_len = 992 * 6 + 1;
cir = (int8_t *)malloc(cir_len * sizeof(int8_t));
int32_t real = 0;
int32_t imag = 0;
dwt_readaccdata(cir, cir_len, 0);
int8_t cidx = 0;
for (int ijk = 0; ijk < 992; ijk++)
{
cidx = 6 * ijk;
real = (int32_t)cir[cidx+3] << 16 | (int32_t)cir[cidx+2] << 8 | (int32_t)cir[cidx+1]; /*printf("%i,",real);*/
imag = (int32_t)cir[cidx+6] << 16 | (int32_t)cir[cidx+5] << 8 | (int32_t)cir[cidx+4]; /*printf("%u\n",imag);*/
//amp = max(abs(real), abs(imag)) + min(abs(real), abs(imag)) / 4;
//printf("idx %d:", ijk);
printf("%d ", real);
printf("%d ", imag);
//printf("%f,,,,,,,,,\n", amp);
//printf("\r \n");
}
free(cir);
- I’m reading the output through JLink RTT Viewer, and I can see the CIR values displayed on the screen, save the output as a log file.
The issues and questions are as follows:
When I print the CIR, I can only see roughly 400 samples, instead of 992. I tried printing out the indices in the above script, and realized that some random indices are missing. E.g. it jumps from 55 to 105, and the jumps seem to be random. Instead of reading all data at once from accumulator (992*6+1 samples), I tried reading them one-by-one in the for loop, but this also gives a similar result.
Q1: How can I read the CIR without any package loss? Is there a better way to capture the CIR, instead of printing the values?
Q2: How can I read the output of the display without JLink RTT viewer, and what are good sources to read about that part further?
Q3: I’ve seen people verifying the CIR information by displaying, and checking values for DWM1000. Since the data format is different here (each sample is 3 bytes, instead of 2), how can I check if the CIR is corrupted or not? E.g. I have seen some discussions about the CIR values being less than 30,000 etc, which may not be applicable here due to 18-bit samples.
Q4: My application requires high sampling rate, and eventually I’d like to reduce the inter-frame periodicity. At this point, what would be the practical limits on the device?
Thanks!