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); | ||||||||||||||||||
printf(“First Path AMP2: %d \r\n”,rx_diag.firstPathAmp2); | ||||||||||||||||||
printf(“First Path AMP3: %d \r\n”,rx_diag.firstPathAmp3); | ||||||||||||||||||
printf(“First Path AMP1: %d \r\n”,rx_diag.firstPathAmp1); | ||||||||||||||||||
dwNLOS_ExtractAndPrintCIR(); |
The result seems good, but I wonder why the code influence the speed so much.
I appreciate any help, thanks in advance.
Lixing He