Get no data from compass MPU9150

By tito_brazil , 10 July 2014

Hello,

we are a group of students with a project that is really annoying.
We have to get all data from the MPU 9150 to our Stellaris LM3S8962 Board. So far the gyro and the accelerometer is working, but we can´t get anything from the compass. I think we tried the most stuff we found in the forum, but nothing works for us. we can read the device ID so far.
This is what we are doing so far:

I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x6B,0x40); //Power Managment 1
I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x6B,0x04);
I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x19,0x1); //sample rate


I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x1A, 0x3); //config
I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x6A,0x01); //user contrl
I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x37,0x02); // BYPass Config
I2C_SetReg(I2C0_MASTER_BASE,SLAVE_ADDRESS,0x38,0x1);

I2C_SetReg(I2C0_MASTER_BASE,0xC,0xA,0x01); //Set Single Measurement Mode
I2C_ReadData(I2C0_MASTER_BASE,0xC,0x3,6); //Read data from Magnetometer


I read something about 10hz. do we have to read the compass so slow?
I hope you can help us.

phpbb Topic ID
16353