Skip to main content
CRime.1
Associate
March 27, 2023
Question

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.

  • March 27, 2023
  • 4 replies
  • 1768 views

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

This topic has been closed for replies.

4 replies

Mike_ST
Technical Moderator
March 27, 2023
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
Foued_KH
ST Employee
March 27, 2023

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.
CRime.1
CRime.1Author
Associate
March 27, 2023

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.

waclawek.jan
Super User
March 27, 2023

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

CRime.1
CRime.1Author
Associate
March 27, 2023

No the HSE is not enabled! Have been there!

waclawek.jan
Super User
March 27, 2023

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

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

JW

waclawek.jan
Super User
March 27, 2023

> 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

CRime.1
CRime.1Author
Associate
March 27, 2023

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.