Hi minhwan, Thank you for your replay, Till now i am getting acc and gyro raw data in x,y,z co-ordinates with my source code of BMX160. How can i convert it into pitch,roll, yaw? I should use your suggested code for my magnetometer config. 1) I am confusing about BMX160 device because for mag config your using bmm150.c/.h, In BMX160 DATASHEET in(pg:14) block diagram shows within the IC. 2) Actually i am SPI interface for ACC & GYRO data reading, but MAG interface (bmm150) your using I2C in like below static void init_bmm150_sensor_driver_interface(void)
{
/* I2C setup */
/* link read/write/delay function of host system to appropriate
* bmi160 function call prototypes */
i2c_bus = BMM150_DEFAULT_I2C_ADDRESS;
bmm150dev.intf_ptr = &i2c_bus;
bmm150dev.intf = BMM150_I2C_INTF;
bmm150dev.read = bmm150_aux_read;
bmm150dev.write = bmm150_aux_write;
bmm150dev.delay_us = bmm150_delay_usec;
} How can i change from I2C to SPI? If i change it, but how it will work means how BMX160 can communicate with bmm150(mag) using SPI or I2C? 3) Is my external SPI is same as internal SPI of bmm150? Pl suggest me to to overcome these doubts,like by showing web links or any pdf files. Thank you, regards, amarr
... View more