Tutorials

LSM6DSOX ODR vs FIFO Batch Rate: Count the Records You Will Actually Read

Published · Updated

If the accelerometer output rate is 104 Hz but the log contains about 52 accelerometer records per second, inspect the FIFO batching rate before chasing a bus fault.

Put three rates on the same configuration sheet

Artix-7 package on an assembled board.
Artix-7 package on an assembled board. Bench or board context. Photo by S03311251. Photo source · CC BY-SA 4.0

Write down sensor output data rate, FIFO batching rate and host drain rate. The first controls production of sensor output. The second controls which output reaches the FIFO. The third describes what the host removes, usually in bursts. Validate selected BDR values against the exact part and sensor operating mode.

Consider an uncompressed configuration with accelerometer BDR 104 Hz and gyro BDR 52 Hz, with both sensors configured at compatible ODRs. Motion alone contributes about 156 FIFO words/s or 1092 bytes/s at seven bytes per word. Auxiliary entries such as timestamps and configuration changes are additional words. Bus transfer command bytes and storage headers belong in their own budgets.

Read back the registers and count tags

Accelerometer batching: 104 words/s nominal. Gyroscope batching: 52 words/s nominal. Raw motion alone: 156 words/s × 7 = 1092 B/s
Accelerometer batching: 104 words/s nominal. Gyroscope batching: 52 words/s nominal. Raw motion alone: 156 words/s × 7 = 1092 B/s.

Capture the sensor control and FIFO control registers after the last initialization write. Over a sufficiently long stable acquisition interval, count accel, gyro and auxiliary tags separately. A ten-second nominal window gives roughly 1040 accel and 520 gyro records. Tolerate window boundary phase and actual device clock error, and report any startup discard separately.

If only one stream is absent, check its enable and BDR fields before changing the common transport. If both rates change after a power transition, compare configuration readback by session. When the counts are correct but pairs appear mismatched, inspect the slot/timestamp association. Repeated sequential `accel, gyro` pairing is only one possible observed sequence.

Set acceptance criteria in words per stream and time spent in the stable window. Preserve the denominator when reporting gaps. A packet count can change merely because the transport packs more records into each packet.

Can you infer gyro sample loss from a 2:1 accel-to-gyro record count?

Check the configured rates and interval first. The ratio is expected for 104 Hz versus 52 Hz batching.

Show the three-step exampleAccelerometer batching: 104 words/s nominal. Gyroscope batching: 52 words/s nominal. Raw motion alone: 156 words/s × 7 = 1092 B/s

Accelerometer batching: 104 words/s nominal. Gyroscope batching: 52 words/s nominal. Raw motion alone: 156 words/s × 7 = 1092 B/s.

LSM6DSOX device documentation · nRF52840 host documentation · FIFO watermark and service-time budget · Motion logger project and storage worksheet · Budget data-path throughput and latency

Bring the exact ODR and BDR readback plus a count of each tag over a timed stable interval. Prepare an engineering review.

References

ST AN5272 Rev 5, FIFO registers and batched sensors.

Back to Tutorials

Related evidence and next tasks

Continue the task with the relevant source scope. These reading paths do not establish interchangeability or current supply.

Source addresses and citation trail

Full source addresses are retained below. Read each citation with its document revision, page, table and applicability conditions above.

  1. https://commons.wikimedia.org/wiki/File:Xilinx_Artix7_XC7A100T_FGG484_on_PCB.jpg
  2. https://creativecommons.org/licenses/by-sa/4.0/
  3. https://www.st.com/resource/en/application_note/an5272-lsm6dsox-alwayson-3d-accelerometer-and-3d-gyroscope-stmicroelectronics.pdf