Post Go back to editing

Setting reading speed on ESP32

Category: Software
Product Number: ADXL372

Hi,

I have difficulty to change the sample rate of the ADXL372 at startup of my ESP32.

The ADXL372-z board is powered by the ESP directly, when I power up the device, the board is powered at the same time (no separate supply).

I use the github.com/.../ADXL372 library.

At random intervals, when I power up ESP and set the configuration to 6400Hz, I got error in the self test function, and in the configuration. If I change the desired sample per second configuration to 3200 / 1600 / ... it's always working.

I think I overlooked something in the documentation.

Here is my configuration function
accelerometre.setOperatingMode(OperatingMode::STANDBY);
delay(50);
accelerometre.disableLowPassFilter(false);
delay(50);
accelerometre.printDevice();
Serial.println(accelerometre.selfTest());
delay(50);
accelerometre.setOdr(ODR_6400);
delay(50);
accelerometre.setBandwidth(BW_3200);
accelerometre.disableHighPassFilter(parametre_persistant.hp_filter);
accelerometre.disableLowPassFilter(parametre_persistant.lp_filter);
delay(100);
accelerometre.setOperatingMode(OperatingMode::FULL_BANDWIDTH);

And the results shows that the self test is not passed,

DEVID_AD: 0x0
DEVID_MST: 0x0
PARTID: 0x0
REVID: 0x3
STATUS: 0x20
Self Test was not finished
0
WARNING: Bandwidth must be no greater than half the ODR, to not violate the Nyquist criteria. Otherwise signal integrity will not be maintained
Disable LowPassFilter
Disable HighPassFilter

Readings per second : 3166

Thanks a lot for your help.