problem about reading channel impulse response(CIR)

Hey guys,

I need to access CIR data, but it came out with all zero value. I have already set AMCE, FACE and LDELOAD to 1, and RXCLKS to 10, but still all zero value. Does anyone know how to read correct CIR data?

my code:
byte cir[4064];
DW1000.readBytes(0x25, 0x00, cir, 4064);
for (int i = 0; i < 4064; i++) {
Serial.print(“cir:”);Serial.print(i);Serial.print(" ");Serial.println(cir[i],HEX);
}

Regards,
Yao

the ex_02c_rx_diagnostics example that comes with API&simple examples package reads the CIR data, please have a look there,

you need to read it after RX has finished and before re-enabling RX again.

Z

Hi Zoran,

Thank you very much. By referring to that library, I have successfully read cir data, but another problem here is reading the threshold of cir which LDE algorithm use to find first peak index:

  1. The APS006 user manual said that the threshold is NTM*NOISE_STD, but no matter how we change the value of NTM, the LDE_THRESH is always about 26 times of NOISE_STD. Do you know how to set the register to define threshold by myself?

  2. Further more, we found that NOISE_STD value decrease in NLOS circumstance(a person stand between tag and anchor) compare to LOS circumstance. Do you know how DW1000 calculate NOISE_STD?

Best Regards,

Yao

Hi Zoran,

I have meet the similar issue when calculating the Leup value which is mentioned in APS006 part3.
Example ex_02c_rx_diagnostics gives the method to get the CIR data, but it doesn’t show how the digital amplitude is calculated.
Can I calculate the amplitude value with following code?

float realAcc = (float)ACC_MEM[4*i] + ((float)ACC_MEM[4*i+1]) * 256.0; float imagAcc = (float)ACC_MEM[4*i+2] + ((float)ACC_MEM[4*i+3]) * 256.0; diagnostics->amp[i] = sqrt(realAcc * realAcc + imagAcc * imagAcc);

[color=#333333]Thanks very much.[/color]

[color=#333333]Best Regards,[/color]
Kang