2023-03-27 02:40 AM
I have tried with 3 different STM32F301C8T6 with the same result. Purchased from Mouser!
2023-03-27 02:52 AM
Hello,
all known issues with STM32F301 are listed here:
2023-03-27 02:54 AM
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.
2023-03-27 02:57 AM
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
2023-03-27 03:04 AM
No the HSE is not enabled! Have been there!
2023-03-27 03:10 AM
So you've read out content of the RCC registers? Show.
Similarly, read out and check/post GPIOF registers content.
JW
2023-03-27 03:16 AM
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.
2023-03-27 03:28 AM
> 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
2023-03-27 03:35 AM
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.
2023-03-27 03:40 AM
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.