I2C not working with MPU6050
- August 3, 2023
- 1 reply
- 2676 views
Hello
I've been trying to shift over to STM32CubeIDE from the Arduino IDE and I have written the code for MPU6050 in CubeIDE using the HAL Libraries. However when I Debug the code and observe the values, its clear that the connection isnt established properly. To verify that nothing is wrong with my board, I used my old code in the arduino ide and it works there. Can someone help me with this? I am using stm32f401ccu6 blackpill with stlink v2. I am able to run simple blink codes in CubeIDE with this setup, but the I2C interfacing is not working. Any help would be appreciated. I have attached my code here as well for others to verify. Please let me know if there might be any configuration I might be missing out in the ioc file.
Thanks,
Sivan Sriman
