MPU6050 library

Dependents:   CSSE4011_BLE_IMU_Project_rev2 Seeed_Tiny_BLE_Get_Started nrf51822_fix_i2c_spi_conflict balanceboard ... more

printf output in mbed_i2c_clear is problematic

There seems to be some race condition between the mpu6050 and the softdevice whereby over time the device will receive BLE callbacks but never be woken up in its main loop to read the fifo or wait for more BLE events. The device can only recover through a hard reset.

When the dmp fifo read returns an error, I use mbed_i2c_clear() to help restore to a clean state. But in a long running test I still run into the race condition about once every hour and require a hard reset. The printf's in mbed_i2c_clear exacerbate the problem. After removing these printfs, I did not hit the race condition even once in a 36 hour test of continuously sending motion data over a ble connection.

fork of the Seeed Studio port of the InvenSense MPU6050 driver