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
  • I see the problem very simple: there is some embedded sensor module/chip which has defined some wired (serial) interface over TWI/I2C/SPI/QSPI/UART/whatever. You should attach logical analyzer to the wires and simply compare what you see (= what you send from nRF5x chip as master) with what is written and shown on examples in specification of that sensor. I bet you will see the problem straight away. If you want us to do this comparison job for you then at least provide us with these traces from wired interface (sorry but "I verified and it was right" doesn't look very convincing here if it doesn't work;).

Reply
  • I see the problem very simple: there is some embedded sensor module/chip which has defined some wired (serial) interface over TWI/I2C/SPI/QSPI/UART/whatever. You should attach logical analyzer to the wires and simply compare what you see (= what you send from nRF5x chip as master) with what is written and shown on examples in specification of that sensor. I bet you will see the problem straight away. If you want us to do this comparison job for you then at least provide us with these traces from wired interface (sorry but "I verified and it was right" doesn't look very convincing here if it doesn't work;).

Children
No Data
Related