cancel
Showing results for 
Search instead for 
Did you mean: 

MPU6050 driver on the STM32F746-DISCO board

Barbra_Gitonga
Visitor

Hello, My name is Barbra, and I am working on a project using the STM32F746-DISCO board, and I need to help to debug an issue. I have written an I2C driver for the MPU6050 board, and I can't fetch any data from it. the accelerometer, gyroscope and temperature registers all seem to be at 0 always when i run the script in debug mode. I can see that the sensor gets identified through its WHO_AM_I register and gets the right readings, 0x68, but I can't get the data from the chip. i am using the STM32 HAL.

i would appreciate any help presented. Thank you.

Attatched are the files to my script.


1 REPLY 1

@Barbra_Gitonga wrote:

I can see that the sensor gets identified through its WHO_AM_I register and gets the right readings, 0x68,


Suggests that physical connections are OK, but please attach your schematic anyhow - to be sure.

 


@Barbra_Gitonga wrote:

I can't fetch any data from it. the accelerometer, gyroscope and temperature registers all seem to be at 0 always


Have you used an oscilloscope and/or analyser on the I2C lines to see what's actually happening in the hardware?