This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

mpu9250 magnetometer zero readings

hi,

10040 nrf52dk softdevice 132 v2. keil ide I am trying to read magnetometer values so that i can calibrate it using this method. For this to happen, i need magnetometer, accelerometer and magnetometer values. However, im not able to obtain the correct magnetometer values. I'm getting 0000 as values in all directions. here is my code. Also i have used the nrf5 mpu magnetometer example code as the basis.

any help will be greatly appreciated.

edit: From trail and error, i understoood that the issue is with err_code/ret_code. But i have no idea on how to solve it.

Parents
  • So then put logical analyzer or oscilloscope to these wires and check what exactly you read. Assuming you will see that lines are not performing clock and data as expected (no real values read) you should consult general I2C/TXI tutorials and spec sheet of your sensor chip to see what is exactly wrong.

Reply
  • So then put logical analyzer or oscilloscope to these wires and check what exactly you read. Assuming you will see that lines are not performing clock and data as expected (no real values read) you should consult general I2C/TXI tutorials and spec sheet of your sensor chip to see what is exactly wrong.

Children
No Data
Related