Sensors · Real time

IMU sensor unit at 2 kHz

An STM32G0-based board that reads a precision motion sensor and streams the data to the navigation computer 2000 times a second, without losing a single measurement.

Background

The system's navigation computer needs precise motion data at a constant, high rate. The data comes from a precision Analog Devices IMU (ADIS16465) connected to a dedicated board.

The challenge

At 2000 Hz, each cycle has 500 microseconds: read the sensor, build a message with a CRC and transmit it. Any delay breaks the rate. In addition, during board bring-up the sensor didn't respond at all.

What we built

  • DMA chain: the sensor's "data ready" interrupt triggers an SPI read on DMA, and when it completes a DMA transmission starts. All stages run at the same priority, so no critical sections are needed.
  • Protocol: an 84-byte message in the format the client defined, with CRC-16.
  • Debugging: two problems that looked identical from the code side. Wrong default SPI settings, and a connector wired backwards because of a datasheet drawing that shows the part from below. One was in the firmware and one in the hardware, and finding both required looking at both.

The result

Stable streaming of 2000 messages a second, at about 84% channel load, with not a single lost message.

Have a project on the table?

A free 30-minute intro call, no obligation.

Book an intro call