Hello Suraj,
Could you please check the attached file.
This example to get accel and gyro data from bmi160 in bmx160, and mag data from bmm150 in bmx160.
You can use SPI interface as your communcation method between host MCU and bmx160.
The BMM150 I2C interface in my code is for internal communication purpose.
My code is kind of update version of below url.
https://github.com/BoschSensortec/BMI160_driver/wiki/How-to-use-an-auxiliary-sensor-or-magnetometer-with-the-BMI160.
Please let me know if you have further questions.
Thank you.
... View more