cancel
Showing results for 
Search instead for 
Did you mean: 

What is the risk if the data update timing of the accelerometer and the data acquisition timing of the microcontroller overlap

ggob
Associate III

The microcontroller acquires data via SPI communication with the accelerometer. What is the risk if the data update timing of the accelerometer and the data acquisition timing of the microcontroller overlap?

1 REPLY 1
Federica Bossi
ST Employee

Hi @ggob ,

If the accelerometer updates its output registers at the same time the microcontroller is reading them over SPI, the main risk is that you get an inconsistent sample, not physical damage.

To mitigate this effect you could:

  1. Enable BDU in the accelerometer configuration.
  2. Use the data‑ready interrupt/flag to trigger the SPI read.
  3. Always read all the data registers belonging to one sample in a single burst transfer.
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.