I am using the BMX160 sensor. I am able to get the accelerometer and gyro to work just fine so I am working on getting the magnetometer. I am using the same setup that is on the datasheet, page 25, Table 16. I monitor the PMU after each step to see where the issue is and the PMU goes to 0 after starting to send data to go from setup mode to data mode. In the order of operations, I do the following: Write CMD to put MAG_IF into normal mode (0x19 to CMD Register) Put the magnetometer into setup mode (0x80 to IF[0]) Put the magnetometer into sleep mode (0x01 to IF[3], 0x4B to IF[2]) Set the REPXY to low power (0x01 to IF[3], 0x51 to IF[2]) Set the REPZ to high accuracy (0x0E to IF[3], 0x52 to IF[2]) Prepare for data mode (0x02 to IF[3], 0x4C to IF[2], 0x42 to IF[1]) Write ODR (0x05 to MAG_CONF) Enter data mode (0x00 to IF[0]) Write CMD to put MAG_IF into low power mode (0x1A to CMD) PMU is good up until step 6. The data mode setup causes everything to shut off. Also, monitoring the IF registers after the function above, I have the following: IF[0] = 0x80 IF[1] = 0x42 IF[2] = 0x4C IF[3] = 0x00 So we can see something along the way does cause the write to fail. I have tried 100k and 400k data rates over I2C. I can still talk to the chip, I can still ping the ID and read it, no issues. The status has just the NVM_rdy. The PMU is 0x00. The error is 0x00. As mentioned, the I2C is still up and working. If I comment out the magnetometer section, back to working no issue. Any thoughts?
... View more