cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a known issue with I2C2 on the STM32F301C8T6TR using PF0 (SDA) and PF1 (SCL), the I2C1 on PB8 and PB9 is working fine. It looks like the SDA is floating regardless the 3K3 pullup, the driver is returning with a Arbitration lost.

CRime.1
Associate II

I have tried with 3 different STM32F301C8T6 with the same result. Purchased from Mouser!

9 REPLIES 9
Mike_ST
ST Employee
Foued_KH
ST Employee

Hello @CRime.1​ ,

Try to use an Oscilloscope to see the SDA and SCL behavior.

If nothings appears, please check the error flags set in the status register, so try to get the error (HAL_I2C_GetError)

Foued

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.

PF0/PF1 are HSE oscillator pins. If HSE is enabled in RCC, it overrides the GPIO settings. Thus, read out and check/post content of RCC registers.

JW

No the HSE is not enabled! Have been there!

So you've read out content of the RCC registers? Show.

Similarly, read out and check/post GPIOF registers content.

JW

On the oscilloscope is the clock OK HI LO but the data is not, looks like some kind of conflict. I have results that differ one where data just stay HI and the driver is terminating with arbitration lost, another where the level is low enough to be accepted as a low start flag but when the first data bit (1) is set the process is terminated, another test I have 3 clock before the data is wrong and the driver is terminating with arbitration lost, the data is in no way looking correct in any of my tests. The last test is on a test board where I can test the I2C1 that work correct using the same code but I2C2 is not, using 3k3 pullup in this test.

> On the oscilloscope is the clock OK HI LO but the data is not, looks like some kind of conflict.

Then you have a short on your board to a different signal.

> I have results that differ

Why do they differ? Are you talking about different boards?

JW

Yes I have, 1 the PCB made for the project and 2 a test board where only the I2Cx are tested, Have tried with different size pullup and that might make the different results because the SDA is moving around in the not defined zone between Hi and Lo.

Yes the RCC register is checked and both the HSE and the LSE are both internal. The GPIOF and the I2C2 registers have been checked. I am using the CubeIDE to setup the environment there could be an issue there but I didn't find anything examine the registers.