Accumulator CIR memory


I tried to plot the CIR data -sqrt(Imag^2 + Real^2). TX and RX are connected through a SMA cable with a 50dB attenuation.
I cannot understand the results i’m getting. can anyone explain or share any documents related to accumulation of preamble symbols to estimate CIR ?

My TX/RX configuration is as below. the result plot is attached !

4, /* Channel number. /
DWT_PRF_16M, /
Pulse repetition frequency. /
DWT_PLEN_1024, /
Preamble length. Used in TX only. /
DWT_PAC32, /
Preamble acquisition chunk size. Used in RX only. /
7, /
TX preamble code. Used in TX only. /
7, /
RX preamble code. Used in RX only. /
1, /
0 to use standard SFD, 1 to use non-standard SFD. /
DWT_BR_110K, /
Data rate. /
PHY header mode. /
(1025 + 64 - 32) /
SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */

Did you read the accumulator immediately after receiving a valid frame?

The leading edge algorithm can hardly work right on this kind of impulse response.


Are the two boards able to communicate with each other? Are you running the standard TWR program for ranging?
You have too many peaks for this to be correct. Somehow your accumulator is getting polluted. Are you reading the real and the complex part separately, then calculating the magnitude?



Yes I’m reading the accumulator immediately as i receive a valid frame. my confusion is why there are many peaks in the CIR data when i only have a single path from TX to RX ?

Best Regards


Which attenuator are you using?


The boards are able to communicate with each other successfully. I’m not using the standard TWR program, instead sending a blink frame and receiving.

I modified the example code ex_02c_rx_diagnostics (main function attached) to get the CIR data to my PC to plot it in matlab.
(dwt_readaccdata function is called to read the accumulator memory. Then calculating and sending the magnitude of each CIR sample for plotting)

I’m using SMA attenuators. i tried without the attenuator as well. the results are the same !

Hi Guys,

I figured out a mistake. I was calculating the imaginary and real parts as unsigned 16 bit integer. but it’s signed 16 bit integer.
Now my plot seems reasonable. Thanks for the help !

Best Regards

R. Anojhkumarn

Hello Rajendra,
I am trying to output the CIR data via USB as well, but there are some compilation issues when when using your main.c (BTW thanks for providing).
Can you give me a hint on your compilation environment to get it started?

Thanks and Best Regards,


Was anyone able to figure out a way to get the accumulator CIR values?

I’m a beginner to the whole system, and I was wondering if there are any tutorials about how to go about with this.

why does my CIR data show this?

Topic closed …please see here