I2C1 works absolutely fine. When I went through the datasheet found out that I2C2 doesnt support Independent clock.
Could anyone throw some light on how to configure I2C2. I am using STM32 CubeMX.
Hi Shashank TS,
Could you please explain with more details how "I2C2 doesnt work" on STM32F030R8T6?
Are there some error flags set for I2C2?
When I say it doesn't work. What I mean is :
There are two exact same sensors having same slave addresses connected on two of the I2C bus I2C1 and I2C2. I am using HAL library. I2C1 works fine. I2C2 doesn't show any value on watch window. It is configured the same exact way for both i2c1 and I2C2.
Datasheet says there is no independent clock for I2C2 will that be a problem. I really appreciate your response.
I don't think that the root cause of your problem is the availability or not of the independent clock.
What I recommend is to do following checks:
1- check your hardware connections (mainly for I2C2 pins)
2- output signals of SCL and SDA lines to check what is going on your I2C2
3- check the status flags on I2C2 registers using debug interface: this should help you to identify the cause of any error flag
Great! I shall check these parameters and update. Thank you
I have verified I2C line on a logic analyser. It seems like the SCL is giving out clock signals at 500KHz.
May I know if you could let me know how to change the clock frequency to 100KHz.
Retrieving data ...