Error Conditions - STMicroelectronics STM32F05 series Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Inter-integrated circuit (I
HSI is then used for the address reception.
In case of an address match, the I2C stretches SCL low during MCU wakeup time. The
stretch is released when ADDR flag is cleared by software, and the transfer goes on
normally.
If the address does not match, the HSI is switched off again and the MCU is not woken up.
Note:
If the I2C clock is the system clock, or if WUPEN = 0, the HSI oscillator is not switched on
after a START is received.
Only an ADDR interrupt can wakeup the MCU. Therefore do not enter STOP mode when the
I2C is performing a transfer as a master, or as an addressed slave after the ADDR flag is
set. This can be managed by clearing SLEEPDEEP bit in the ADDR interrupt routine and
setting it again only after the STOPF flag is set.
Caution:
The digital filter is not compatible with the wakeup from STOP feature. If the DNF bit is not
equal to 0, setting the WUPEN bit has no effect.
Caution:
This feature is available only when the I2C clock source is the HSI oscillator.
Caution:
Clock stretching must be enabled (NOSTRETCH=0) to ensure proper operation of the
wakeup from STOP feature.
23.4.16

Error conditions

The following are the error conditions which may cause communication to fail.
Bus error (BERR)
A bus error is detected when a START or a STOP condition is detected and is not located
after a multiple of 9 SCL clock pulses. A START or a STOP condition is detected when a
SDA edge occurs while SCL is high.
The bus error flag is set only if the I2C is involved in the transfer as master or addressed
slave (i.e not during the address phase in slave mode).
In case of a misplaced START or RESTART detection in slave mode, the I2C enters address
recognition state like for a correct START condition.
When a bus error is detected, the BERR flag is set in the I2Cx_ISR register, and an interrupt
is generated if the ERRIE bit is set in the I2Cx_CR1 register.
Arbitration lost (ARLO)
An arbitration loss is detected when a high level is sent on the SDA line, but a low level is
sampled on the SCL rising edge.
In master mode, arbitration loss is detected during the address phase, data phase and
data acknowledge phase. In this case, the SDA and SCL lines are released, the START
control bit is cleared by hardware and the master switches automatically to slave mode.
In slave mode, arbitration loss is detected during data phase and data acknowledge
phase. In this case, the transfer is stopped, and the SCL and SDA lines are released.
When an arbitration loss is detected, the ARLO flag is set in the I2Cx_ISR register, and an
interrupt is generated if the ERRIE bit is set in the I2Cx_CR1 register.
514/742
2
C) interface
Doc ID 018940 Rev 1
RM0091

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F05 series and is the answer not in the manual?

Questions and answers

Table of Contents