Problem on CIR data example

Hi,

I ran the ex_02c_rx_diagnostics example on my device, and printed out the results.
The following are some sample printout including diagnostics data and raw accum_data.
The accum_data I got do not seem to be correct; I thought the amplitude calculated
based on accum_data should be more or less the same as the PathAmps got from diagnostics info.
In other words, how should I make sense of the accum_data? Thanks a lot. Let me know if
you need more info. Jin

frame 1:

firstPath/64 745, firstPathAmp1 2023, firstPathAmp2 2028, firstPathAmp3 1287
maxGrowthCIR 232, rxPreamCount 117, maxNoise 587, stdNoise 24
accum_data :
0: 0
1-4: 251, 255, 10, 0
re 65531, im 10, r 65531,
5-8: 253, 255, 254, 255
re 65533, im 65534, r 65530,
9-12: 245, 255, 14, 0
re 65525, im 14, r 65525,
13-16: 25, 254, 153, 4
re 65049, im 1177, r 65059,
17-20: 135, 252, 26, 7
re 64647, im 1818, r 64672,
21-24: 185, 251, 225, 6
re 64441, im 1761, r 64465,

frame 2:

firstPath/64 746, firstPathAmp1 2063, firstPathAmp2 1973, firstPathAmp3 1630
maxGrowthCIR 283, rxPreamCount 121, maxNoise 786, stdNoise 32
accum_data :
0: 0
1-4: 244, 255, 215, 255
re 65524, im 65495, r 65482,
5-8: 248, 255, 212, 255
re 65528, im 65492, r 65483,
9-12: 219, 255, 170, 255
re 65499, im 65450, r 65412,
13-16: 162, 251, 167, 250
re 64418, im 64167, r 63024,
17-20: 66, 251, 104, 249
re 64322, im 63848, r 62601,
21-24: 241, 251, 227, 248
re 64497, im 63715, r 62645,

The data was printed with

printf(“firstPath/64 %d, firstPathAmp1 %d, firstPathAmp2 %d, firstPathAmp3 %d \n”,
rx_diag.firstPath / 64, rx_diag.firstPathAmp1, rx_diag.firstPathAmp2, rx_diag.firstPathAmp3);
printf(“maxGrowthCIR %d, rxPreamCount %d, maxNoise %d, stdNoise %d\n”,
rx_diag.maxGrowthCIR, rx_diag.rxPreamCount, rx_diag.maxNoise, rx_diag.stdNoise);

and

printf(" accum_data : \n");
printf(" 0: %d \n", accum_data[0]);
for (int i = 0; i < 6; i++) {
printf(" %d-%d: %d, %d, %d, %d \n", 4i + 1, 4i + 4,
accum_data[4 * i + 1], accum_data[4 * i + 2],
accum_data[4 * i + 3], accum_data[4 * i + 4]);
uint32_t re = accum_data[4 * i + 1] | accum_data[4 * i + 2] << 8;
uint32_t im = accum_data[4 * i + 3] | accum_data[4 * i + 4] << 8;
uint32_t r = sqrt(re * re + im * im);
printf(" re %u, im %u, r %u, \n", re, im, r);
}

Update : I need to use 16-bit int instead of 16-bit unsigned int for the real and imaginary values of the taps.

In the following sample data obtained from Example 2c: simple RX with diagnostics, the magnitude of the 3 values below the first path index and 3 values above are 52, 53, 148, 1763, 2185, and 2197. The firstPathAmp1 = 2179. I wonder why firstPathAmp1 is between value 1763 and 2185; I thought firstPathAmp1 is between the 3rd magnitude (148) and the 4th magnitude (1763). Can someone shed some light to the data? Thanks in advance,

firstPath/64 748, firstPathAmp1 2179, firstPathAmp2 2172, firstPathAmp3 1742
maxGrowthCIR 331, rxPreamCount 122, maxNoise 1021, stdNoise 40
accum_data :
0: 0
1-4: 51, 0, 12, 0 <-- raw bytes of index (fp_int - 2)
re 51, im 12, r 52, <-- real, imaginary, magnitude
5-8: 51, 0, 17, 0 <-- raw bytes of index (fp_int - 1)
re 51, im 17, r 53, <-- real, imaginary, magnitude
9-12: 148, 0, 7, 0 <-- raw bytes of index (fp_int )
re 148, im 7, r 148, <-- real, imaginary, magnitude
13-16: 226, 6, 179, 255 <-- raw bytes of index (fp_int + 1)
re 1762, im -77, r 1763, <-- real, imaginary, magnitude
17-20: 135, 8, 144, 255 <-- raw bytes of index (fp_int + 2)
re 2183, im -112, r 2185, <-- real, imaginary, magnitude
21-24: 148, 8, 166, 255 <-- raw bytes of index (fp_int + 3)
re 2196, im -90, r 2197, <-- real, imaginary, magnitude

Hi jinlu8591!
I’m working with TREK1000 kit and I’m retrieving the same results as you with diagnostics.
I was thinking that such as amplitude values are wrong, cause I thought that path amplitudes were about 20k.
What do you think?
Alessio

Hello,
I’ve just started with the Decawave EVK1000 evaluation board.
I’m building the DWM1001 examples, more specifically, the “ex_02c_rx_diagnostics” to get CIR data.
I’ve managed to build the example and flash it on EVK1000 board using CooCox CoIDE via ST-Link. I’ve included the printf functions as in your post to read the real and imaginary values of the CIR data.
How do I see the CIR when one board in transmitting and the other is in receiving diagnostics mode, like your output? Will it be available in the CooCox console or is it log in a file?

Many thanks.