07-22-2020 02:15 PM
I have a lot of issues with respect to the BMX160.
I'll start with the data sheet. From what I see there is no reference to the BMM150 although it appears to integrated into the package but there is no references as to how. The forums when people have asked about the BMX160 the response is related to the BMI160 and I suspect with the BMM150 attached to it auxiliary I2C port. Looking at the Page 25 and 26 there are steps to communicate with the magnetometer (BMM150) using the Indirect Read and Write protocol except the documentation is misleading. What I eventually discovered was that:
I have issues with the static reading from the magnetometer. I compared it with the NXPFXOS8700 and FXAS21002 sensor I'm currently using and there is a significant variation. trying to calibrate using the PJRC (of Teensy fame) tool and a version that I adapted from NXP c
I have attached 2 files:
From my observations reading the documents the TFM should trigger a sample (sequence) and the return to sleep.
07-22-2020 06:13 PM
Hi,
Thanks for your inquiry.
It is true that inside BMX160 the BMM150 magnetometer is connected to BMI160 IMU auxiliary interface. It works the same way as BMI160 shuttle board that is avaialble to purchase at https://www.digikey.com/product-detail/en/bosch-sensortec/BMI160-SHUTL/828-1052-ND/6136295.
We have API source code for BMX160 = BMI160 + BMM150 avaialble online at https://github.com/BoschSensortec/BMI160_driver. You don't need to do everything from scratch. There are also examples on the Github. You only need to define three functions on your platform such as I2C read, I2C write and delay. Then you can use the API calls right away.
Thanks.
11-19-2020 12:07 PM - edited 11-19-2020 12:08 PM
Hi,
This might be the case but your drivers are not suitable for DMA triggered reading and writing .Therefore, I need to implement the driver for myself.Polling the SPI is far to slow. And it would be good to tell the user that there are trim values. In the entire datasheet of the BMX160 it is not mentioned. Nor the compensation is explained. Is there a specific reason for it?
Further, I am only guessing that I need to read the trim values via mag_if[2] and mag_if[3]. But is bulk read possible? Or do I need to pick up each trim value manually?
Kind regards,
Constantin
11-23-2020 05:59 PM
Hi,
On page 26 of BMX160 datasheet, it says that please refer to API/driver from Bosch for the BMM150 magnetometer. This is to make it easy for developers to use BMM150 without the need to know the formula behind. You can read the trimmed values from the magnetometer manually and then apply the formula to calculate the magnetic field uT based on the raw data of x/y/z axes. Please see the attached two PDF files for more information.
Thanks.