Hello everyone,
I hope you are all doing well. I am writing to seek your assistance after days of persistent efforts to extract accurate Channel Impulse Response (CIR) data from Accumulator Memory using DWM1000 modules. Unfortunately, I have yet to achieve the desired results. I have been working with the ss_TWR examples for CIR data extraction in a Line-of-Sight (LOS) environment. To test the modules, I’ve placed them in an unfurnished room at various distances (1m, 2m, 3m, and 5m).
My primary headache right now is that I’m unable to read more than 254 samples from the Accumulator Memory. Any attempt to read 255 samples results in the memory returning zeros. Moreover, when I attempt to read 1016 samples (64MHz Pulse Repetition Frequency), it causes a complete system freeze. Even when I read just 254 values, the amplitude fluctuates dramatically, sometimes falling below 500 or spiking above 6000.
Furthermore, even when I manage to read the first 254 samples, I notice that the “firstPath” index (from diagnostics) appears at around 740 to 750 index, indicating that I might only be reading noise from the memory. It’s worth noting that I’ve come across research papers mentioning similar issues with the “firstPath” index around 740. Photo is taken from one of paper.
I have a few questions that I hope you can help me address:
- How can I successfully read all 1016 samples with accuracy?
- How can I leverage the dwt_readdiagnostics fields to improve my CIR data extraction code?
Here is my current implementation, which includes reading the receiver frame quality diagnostic values and processing the data:
// Read the receiver frame quality diagnostic values
dwt_readdiagnostics(&rx_diag);
// Print the diagnostic values
printf("maxNoise: %u\n", rx_diag.maxNoise);
printf("firstPathAmp1: %u\n", rx_diag.firstPathAmp1);
printf("firstPathAmp2: %u\n", rx_diag.firstPathAmp2);
printf("firstPathAmp3: %u\n", rx_diag.firstPathAmp3);
printf("stdNoise: %u\n", rx_diag.stdNoise);
printf("maxGrowthCIR: %u\n", rx_diag.maxGrowthCIR);
printf("rxPreamCount: %u\n", rx_diag.rxPreamCount);
// Calculate the fractional and integer part of firstPath
// ... (code for firstPath calculation)
uint16_t ACCUM_DATA_LEN = 253;
uint8 accumulator_data[ACCUM_DATA_LEN];
uint16 bufferOffset = 0;
dwt_readaccdata(accumulator_data, ACCUM_DATA_LEN, bufferOffset);
int i = 1;
for (i = 1; i < ACCUM_DATA_LEN; i += 4) {
// ... (code for processing and printing complex values)
nrf_delay_ms(1);
}
free(accumulator_data);
I would greatly appreciate any insights, suggestions, or guidance you can offer.
Best regards,
Jalal
PS: I have went through FAQ but could not found answer!