Skip to content

[driver] Bosch Sensortec BMI270 IMU#1340

Merged
salkinium merged 3 commits into
modm-io:developfrom
hshose:feature/bmi270
Mar 22, 2026
Merged

[driver] Bosch Sensortec BMI270 IMU#1340
salkinium merged 3 commits into
modm-io:developfrom
hshose:feature/bmi270

Conversation

@hshose

@hshose hshose commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

BMI270 IMU driver.

  • example with interrupts i2c
  • example with interrupts spi
  • fifo buffer example
  • component retrim ("CRT") calibration example. There is a bug when writing to the devices non-volatile memory (only 14-ish write cycles per datasheet anyways), so the example is set up to allow for the stm32 to retrieve the retrim values, e.g., to store them in the flash_reserved section. @joelsa has more experience with the calibration. I messed around with the vendors offset calibration routine (this calibrates for constant bias and is called "FOC") and applying in the imu's registers, but this was pretty buggy. I therefore recommend to do bias calibration in software (e.g., from an average over motionless values).

Also thanks and credits to @joelsa for explaining the CRT issues to me and building the breakout board I used for testing 🎉

@hshose hshose marked this pull request as draft March 5, 2026 19:36
@hshose

hshose commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

rebased fixup commits.

All I2C examples tested in hardware. Unfortunately, I don't have a breakout board to test the SPI example.

@hshose hshose marked this pull request as ready for review March 6, 2026 11:59
Comment thread examples/nucleo_h723zg/bmi270/i2c/main.cpp Outdated
Comment thread examples/nucleo_h723zg/bmi270/i2c/main.cpp Outdated
Comment thread examples/nucleo_h723zg/bmi270/i2c/main.cpp
Comment thread examples/nucleo_h723zg/bmi270/i2c_fifo/main.cpp Outdated
Comment thread examples/nucleo_h723zg/bmi270/i2c_fifo/main.cpp
Comment thread src/modm/driver/inertial/bmi270_calibration_impl.hpp
Comment thread src/modm/driver/inertial/bmi270_transport_impl.hpp Outdated
Comment thread src/modm/driver/inertial/bmi270_transport_impl.hpp Outdated
Comment thread src/modm/driver/inertial/bmi270_transport_impl.hpp Outdated
Comment thread src/modm/driver/inertial/bmi270_transport_impl.hpp Outdated
@hshose

hshose commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

@salkinium thank you for the review :-)

@hshose hshose force-pushed the feature/bmi270 branch 3 times, most recently from e0a6e76 to 6d3fa62 Compare March 16, 2026 10:49
@hshose hshose force-pushed the feature/bmi270 branch 2 times, most recently from 6908b10 to 4adbef9 Compare March 16, 2026 14:21

@salkinium salkinium left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@salkinium salkinium merged commit cf1ad9c into modm-io:develop Mar 22, 2026
12 checks passed
@salkinium salkinium added this to the 2026q1 milestone Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants