cancel
Showing results for 
Search instead for 
Did you mean: 

What is the bug in STM32 hardware I2C?

Ethan1
Associate III

I am from China,I was told that STM32 hardware I2C has bug.So I always use software simulation I2C with two ordinary GPIO Pins. I was wondering what is the bug exactly?Is it a rumor ,or is it true?I hope get opinion from abroad website,because you speak English ,you may get more infomation first hand. Thank you.

6 REPLIES 6
Bruno_ST
ST Employee

Hello @贲 志强​ ,

Software simulation of I2C is not optimized and of course the HW I2C on STM32 is working ! Most of our customers use it ! There could be some limitations, so depending of your STM32 device/family, i would recommend to check the corresponding errasheet to know the potential HW bugs and the WA if any.

BR,

Bruno

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.

I download stm32f407 errasheet and try to read it,I need to improve English.I never come across the problems listed in the errasheet.So I`m not sure whether it has big influence or not.

What do you mean by WA..​

With WA i mean : (Sotware/Hardware) Work Around, in order to avoid or fix the HW issue.

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.

Nikita91
Lead II

There is some bugs reported in the errata sheets .

There is also some design flaws not mentioned in the errata sheets but but there are hints in the F1 and F4 reference manuals.

One thing that bothered me a lot: the timing of the last bytes of the messages. A special case is needed for each of the last 3 characters. And it is necessary to inhibit the interruptions during certain operations because the hardware did not foresee certain cases.

Another subtlety. On the H7, for example, there are 2 block transmission end interrupts depending on whether it is the last block or not (TC and TCR). This complicates the software considerably in some cases.

It's true that I2C works, but you have to study the reference manuals carefully.

The STM32 has the most complicated I2C I've ever seen.

@贲 志强​ ",I was told that STM32 hardware I2C has bug"

Who told you that? Have you asked them why they thought this?

ST has Application Notes on how to properly use the I2C hardware - check on the Product Page for the particular chip(s) that you're using.

Also 3rd-party resources; eg,

0693W00000Nq5sdQAB.png