cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030R8T6 I2C2 doesnt work

Shashank TS
Associate II
Posted on June 12, 2018 at 10:54

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-clock
5 REPLIES 5
Amel NASRI
ST Employee
Posted on June 12, 2018 at 13:54

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.

Posted on June 12, 2018 at 16:57

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.

Posted on June 13, 2018 at 11:07

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.

Posted on June 13, 2018 at 12:00

Great! I shall check these parameters and update. Thank you

Posted on June 14, 2018 at 14:30

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