I have a custom board with a BMD-300 (nRF52832), a BMI270 (accelerometer, gyroscope) and BMM150 (magnetometer), where the BMM150 is connected via the auxiliary connections on the BMI270.
From what I can tell, the only examples that exist for programming this use the Bosch drivers from https://github.com/BoschSensortec/
There also exists a Zephyr driver for both sensors, but from what I can tell there's no aux support in the BMI270 driver. My firmware is using the nRF Connect SDK and Zephyr (not the legacy nRF52 SDK). I'm able to get the BMI270 sample code running without any issues: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sensor/bmi270
What's the recommended approach for interfacing with the auxiliary BMM150? Should I use the Zephyr driver and read/write to i2c directly, or is that not supported by my setup? If the Zephyr driver doesn't support the auxiliary sensor, do the Bosch drivers work with a Zephyr setup? Are there any novice-friendly examples of how to accomplish this?
Thank you for any help you can give.
In BMI270 reference hardware board shuttle 3.0 https://www.bosch-sensortec.com/media/boschsensortec/downloads/shuttle_board_flyer/application_board..., BMM150 was connected to BMI270 through Aux interface, run with this example https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/read_aux_data_mode/r... to get BMM150 through BMI270.
If your hardware have same connection with BMI270 shuttle 3.0 for BMM150, you could run reference example to get BMM150 data.
Thank you for your reply. Unfortunately, I can't use your example because it doesn't work with the Zephyr RTOS. Bosch provides a driver for this RTOS (here: https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/sensor/bmi270 ), but it doesn't support the auxiliary interface.
Is Bosch planning on adding support for the auxiliary interface to this driver? I have submitted a ticket on GitHub and tagged the Bosch GitHub account responsible for making the driver here: https://github.com/zephyrproject-rtos/zephyr/issues/57252
If Bosch doesn't plan on adding support in the near future, is there another approach you would recommend for interfacing with these sensors using Zephyr? Or, would we need to drop Zephyr RTOS and use the drivers here, along with your example? https://github.com/BoschSensortec/BMI270-Sensor-API
This is time-sensitive for our organization, so any help you could provide would be greatly appreciated. Thank you.
The github sensor API and example code can be used on Zephyr RTOS because they are all written in C language. The example code is used on the Application board of Bosch Sensortec, and you need to migrate the hardware related interface content with the code implementation of your platform.