cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103RC - I2C2 works but I2C1 doesnt work with the same sensor

domanski0karol
Associate III
Posted on September 01, 2016 at 14:56

Hi,

I have a strange problem with stm32f103RC. If I connect mpu-6050 to PB.10, PB.11 (I2C2) it works perfectly, but when I connect the same mpu-6050 to PB.6, PB.7 (I2C1) it doesnt work. The code is the same, I add RCC_APB1Periph_I2C1 to clock enable, replace all I2C2 with I2C1, configure pins also as GPIO_Mode_AF_OD. Any idea what go wrong?
1 REPLY 1
Posted on September 01, 2016 at 21:22

Show the code, especially the stuff for the clocks, pins and peripheral.

Check the pin tables in the Data Sheet.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..