beagleboard / librobotcontrol

Robotics Focused library for embedded Linux computers. Mirror of https://git.beagleboard.org/beagleboard/librobotcontrol
https://beagleboard.org/librobotcontrol
MIT License
196 stars 158 forks source link

MPU6050 DMP initialization fails and mpu returns zeroes for all axis #141

Closed 74ls04 closed 5 years ago

74ls04 commented 5 years ago

Describe the bug The MPU6050 is not working on a BeagleBone Black (direct connection without cape). It's returning 0 values for accel and gyro and failing to initialize DMP. All rc_test_drivers tests pass.

To Reproduce Connect MPU6050 (GIY-521 board) to BeagleBone Black P9_19 (SCL), P9_20 (SDA), P9_25 (INT) and run either the rc_test_mpu or rc_test_dmp applications. Tested with and without 4.7k pullup resistors on the I2C lines. The result is the same for the python IMU demo using rcpy.

Expected behavior Changing accel and gyro values. DMP initialization and values.

I am able to access and manipulate the registers directly from the command line as shown in the screenshots below.

Jeff Rowberg's AVR code works for the same device. I haven't been able to do a diff on the firmware but it looks to be different at a quick glance. I'm not sure if there are firmware differences between the 3 MPU models.

Screenshots dmp_test mpu_test Command Line I2C tests i2c_dump_after_reset

Platform information `root@beaglebone:/home/debian# rc_test_drivers

Kernel: 4.14.71-ti-r80 BeagleBoard.org Debian Image 2018-10-07 Debian: 9.6

PASSED: gpio 0 PASSED: gpio 1 PASSED: gpio 2 PASSED: gpio 3 PASSED: pwm0 PASSED: pwm1 PASSED: pwm2 PASSED: eqep0 PASSED: eqep1 PASSED: eqep2 PASSED: pru-rproc PASSED: uart1 PASSED: uart2 PASSED: uart4 PASSED: uart5 PASSED: i2c1 PASSED: i2c2 PASSED: spi PASSED: LED PASSED: ADC iio

Currently running on a: MODEL_BB_BLACK_RC Robot Control library Version: 1.0.4 `

StrawsonDesign commented 5 years ago

Sorry to have forgotten about this, I've not looked at github for a long time. You appear to have a hardware problem, I2C bus is bad based on your i2cdump result