Hi, I know that there are many topics on this arguments, I have read them all but i can't find an answer so I hope someone can help me. I am trying to read measurements from magnetometer BMM150 connected as secondary I2C device to BMI160; in particular those sensors are included in the Texas Instruments BOOSTXL-SENSORS expansion and i'm using the Texas Instruments C2000 TMS320F28379D Delfino Launchpad. I am able to succesfully read values from accelerometer and gyroscope, but I can not figure out how to read the magnetometer and, since I am programming the board with Simulink which generates its own C code, I cannot use the libraries. What i would like to know are the logic passages (i.e. register to write and mode to set) in order to make the BMM150 work as secondary device. Here is what I have done after reading the datasheets and discussions on this forum: - Set I2C address = 105 (0x69) - Set normal modes for: Accelerometer (write 0x11 on register CMD 0x7E),gyro (0x15 on CMD 0x7E), magnetometer (0x19 on CMD 0x7E) - Enable auxiliary I2C device (write 0x20 on IF_CONF 0x6B); set I2C address of auxiliary device (0x10 on MAG_IF 0x4B); enter setup mode and reading with 8 byte bursts (0b10000011 on MAG_IF 0x4C); set first read address for auxiliary device (0x42 on MAG_IF 0x4D); trigger first measure (0x06 on MAG_CONF 0x44); enter data mode (0b00000011 on MAG_IF 0x4C) - Read magnetometer data registers through BMI160 data registers (from 0x04) But what i get is always zero values. I think that the problem is the magnetometer which is not setting in normal mode, as I can understand by reading the status register 0x03 from which i get 010100 (i.e. normal mode for accell, gyro but suspend mode for magnetometer).
... View more