Need help on STM32F207 errata position 2.3.2 (I2C)
Hello,
we are using STM32F207ZGT6J with rev code X and we are in trouble with I2C communication. It runs fine for hours with tens of messages per second and then suddenly it doesn't generate a start condition anymore. After hours of testing I finally came to take a look at errata sheet and found this: .ExternalClassD82D6804970A46C480A13D14A722393F {;} .ExternalClassD82D6804970A46C480A13D14A722393F li {list-style:none;margin:0;} .ExternalClassD82D6804970A46C480A13D14A722393F p {margin:0;} .ExternalClassD82D6804970A46C480A13D14A722393F span.foldopened, .ExternalClassD82D6804970A46C480A13D14A722393F span.foldclosed {font-size:xx-small;border-width:1;font-family:monospace;padding:0em 0.25em 0em 0.25em;background:#e0e0e0;cursor:pointer;} .ExternalClassD82D6804970A46C480A13D14A722393F span.foldopened {color:white;visibility:visible;} .ExternalClassD82D6804970A46C480A13D14A722393F span.foldclosed {color:#666666;visibility:hidden;} .ExternalClassD82D6804970A46C480A13D14A722393F span.foldspecial {color:#666666;font-size:xx-small;border-style:none solid solid none;border-color:#CCCCCC;border-width:1;font-family:sans-serif;padding:0em 0.1em 0em 0.1em;background:#e0e0e0;cursor:pointer;} .ExternalClassD82D6804970A46C480A13D14A722393F span.l {color:red;font-weight:bold;} .ExternalClassD82D6804970A46C480A13D14A722393F a.mapnode:link, .ExternalClassD82D6804970A46C480A13D14A722393F a.mapnode:visited, .ExternalClassD82D6804970A46C480A13D14A722393F a.mapnode:active, .ExternalClassD82D6804970A46C480A13D14A722393F a.mapnode:hover {text-decoration:none;color:black;} .ExternalClassD82D6804970A46C480A13D14A722393F a.mapnode:hover {background:#eeeee0;} 2.3.2 Start cannot be generated after a misplaced StopDescription
If a master generates a misplaced Stop on the bus (bus error), the peripheral cannot generate a Start anymore.
Workaround
In the I²C standard, it is allowed to send a Stop only at the end of the full byte (8 bits + acknowledge), so this scenario is not allowed. Other derived protocols like CBUS allow it, but they are not supported by the I²C peripheral.
A software workaround consists in asserting the software reset using the SWRST bit in the I2C_CR1 control register.
For me there are a number of questions on this text: - How can there be a misplaced stop condition in master mode? Stop conditions are placed by hardware so they should be in place always or never. (We have a single master system with this F207 being the master) - How can I determine that this situation occured? - What exactly is reset when using SWRST? Is it the same effect as using RCC_APB1RSTR_I2C1RST ? - Are there more recent revisions that don't have this error? Or other STM32-controllers that are pin compatible to STM32F207? Thanks a lot for any help Martin