2022-05-16 11:31 PM
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.
2022-05-17 12:13 AM
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.
2022-05-17 12:21 AM
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..
2022-05-17 12:27 AM
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.
2022-05-17 02:22 AM
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.
2022-05-17 02:53 AM
@贲 志强 ",I was told that STM32 hardware I2C has bug"
Who told you that? Have you asked them why they thought this?
2022-05-17 03:38 AM
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,