06-07-2023 09:03 AM
I have done the following configuration as per the datasheet of BMI160 for secondary interface
uint8_t configData3[2] = {0x7E, 0x19};
uint8_t BMX160_MAGN_IF_0_ADDR[2]= {0x4c,0x80};
uint8_t BMX160_MAGN_IF_1_ADDR[2]= {0x4F,0x01};
uint8_t BMX160_MAGN_IF_2_ADDR[2]= {0x4E,0x4B};
uint8_t BMX160_MAGN_IF_3_ADDR[2]= {0x4F,0x01};
uint8_t BMX160_MAGN_IF_4_ADDR[2]= {0x4E,0x51};
uint8_t BMI160_MAGN_IF_ADDR[2] = {0x4F,0x0E};
uint8_t BMX160_MAGN_IF_5_ADDR[2]= {0x4E,0x52};
uint8_t BMX160_MAGN_IF_6_ADDR[2]= {0x4F,0x02};
uint8_t BMX160_MAGN_IF_7_ADDR[2]= {0x4E,0x4C};
uint8_t BMX160_MAGN_IF_8_ADDR[2]= {0x4D,0x42};
uint8_t BMX160_MAGN_IF_9_ADDR[2]= {0x44,0x05};
uint8_t BMX160_MAGN_IF_10_ADDR[2]= {0x4C,0x00};
and tried to read magneto data using 0x04 register of BMI160, Magneto values are coming as zero.
I'm using STM32CUBE IDE and STM32l433 Nucleo board
06-07-2023 03:44 PM
Hi Mathi123,
There are sensor APIs & example code for BMM150 and BMI160 on Github, which can accelerate your software development.
https://github.com/boschsensortec/BMI160_driver
https://github.com/boschsensortec/BMM150-Sensor-API
I also uploaed example on STM32 for your reference. I hope it will be helpful for you.
BMI160 was not recommended for new design, you choose other part by referring product selector guide https://www.bosch-sensortec.com/media/boschsensortec/downloads/promotion_material/product-selector-e...
06-07-2023 05:39 PM
Hii Robin
thanks for your reply.
i have already tried with the API library. I can't able to get the magneto value, can you please provide the stm code which get BMM150 data through BMI160
07-05-2023 04:16 PM
Hi Mathi123,
Do you mean you need full STM32 project code?