Hello Amar,
1) For reading MAG data or even BMM150 Chip_id also, Finally we get data from SPI only because it is the bmi160 primary interface. right?
- Right 🙂
2) Eventhough if you call " bmm_init();" API, still it will use spi_read/spi_write of bmi160 driver via aux_interface of bmi160 like below
bmm150_init(&bmm); ---> bmm150_get_regs ----->dev->intf_rslt = dev->read(reg_addr, reg_data, len, dev->intf_ptr); ---->bmm150_aux_read() ---- -------->bmi160_aux_read. right?
- The SPI communcation between host MCU and BMX160 is running via primary interface, not AUX interface. AUX interface is for BMM150 and BMI160 internally.
3) How do we know bmi160 aux_interface working fine or not?
- when you call bmm150_init function, and get -2 error, it means communcation failure.
4) Can i change bmi160 aux_interface to SPI from I2C?
- No.
5) Can i read MAG data directly form bmm150(without using bmm150 driver), if yes can you please suggest me how to implement it.
- You can only read mag data thru primary interface.
Thanks 🙂
... View more