2018-06-12 01:54 AM
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.
#i2c #i2c2 #i2c-clock2018-06-12 04:54 AM
Hi
shashank
,Could you please explain with more details how 'I2C2 doesnt work' onSTM32F030R8T6?
Are there some error flags set for I2C2?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-06-12 09:57 AM
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.
2018-06-13 04:07 AM
Hi
shashankts
,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
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-06-13 05:00 AM
Great! I shall check these parameters and update. Thank you
2018-06-14 07:30 AM
Hi Amel,
I have verified
mailto:I@C
2C 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.
Regards,
Shashank