This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Use DMP of MPU9250

my code is below. git_mpu9250_dmp.zip

Hello.

I use nRF52 & MPU9250. I want to use DMP, but I can't read data with DMP. Because it have failed that writting firmware.

I want to check connect sensor between nRF, I made a code for reading register of "WHO_AM_I". At first time, read "WHO_AM_I", return 0x71. After faild writting firmware, read "WHO_AM_I",return 0x0d.

I wrote firmware below, 16,0,0,70,0,0,0,0,24,0,0,0,2,0,3,0,0... read mem below, 0,83,5a,44,9,46,10,6,0,0,15,bb,48,79,c1,3c...

What was happened?

Parents
  • Thank you.

    So you get -5 returned from mpu_write_mem(). That occurs when an error is propagated down the path from mpu_write_mem()->i2c_write()->call_mpu9250_write()->mpu9250_write(). In other words, 501 characters leftadd commentcancelsomething appears to go wrong in mpu9250_write(). You should try to debug your code to figure out exactly what goes on inside this function, which function returns the error, and what the error is.

Reply
  • Thank you.

    So you get -5 returned from mpu_write_mem(). That occurs when an error is propagated down the path from mpu_write_mem()->i2c_write()->call_mpu9250_write()->mpu9250_write(). In other words, 501 characters leftadd commentcancelsomething appears to go wrong in mpu9250_write(). You should try to debug your code to figure out exactly what goes on inside this function, which function returns the error, and what the error is.

Children
No Data
Related