I've been trying to use the 'MPU6000_DMP6' example with an mbed board to program utilise the DPU on the MPU-6050, but have run into problems with reading the FIFO count.
The program runs through the initialisation fine, until it gets to the point where it reads the FIFO count until it is greater than 2. At this point, the MPU6050::getFIFOCount() function repeatedly returns 0. Sometimes this will eventually (after up to minutes) return a large value, which will sometimes be 65535 (i.e. a full FIFO). At this point the program will continue to the next instance of waiting for FIFO count > 2, then sometimes continue to the main loop, where there will be a very long (again up to minutes) delay between samples being returned while it waits for the FIFO count, and the values returned will always be the same.
I've tried the 'MPU6050_raw' example on the mbed, and that seems to work fine, so it looks like my port of the library is ok.
Does anyone have any suggestions as to why the FIFO count registers are not returning correct values?
Thanks