Inter-integrated circuit (I2C) interface
RM0365
817/1080
DocID025202 Rev 7
Depending on the product implementation, all these interrupts events can either share the
same interrupt vector (I2C global interrupt), or be grouped into 2 interrupt vectors (I2C event
interrupt and I2C error interrupt). Refer to
Section: Interrupt and exception vectors
for
details.
In order to enable the I2C interrupts, the following sequence is required:
1.
Configure and enable the I2C IRQ channel in the NVIC.
2. Configure the I2C to generate interrupts.
The I2C wakeup event is connected to the EXTI controller (refer to
interrupts and events controller (EXTI)
Figure 314. I2C interrupt mapping diagram
Bus error
BERR
Write BERRCF=1
ERRIE
Arbitration loss
ARLO
Write ARLOCF=1
Overrun/Underrun
OVR
Write OVRCF=1
PEC error
PECERR
Write PECERRCF=1
Timeout/t
LOW
error
TIMEOUT
Write TIMEOUTCF=1
SMBus Alert
ALERT
Write ALERTCF=1
Table 150. I2C Interrupt requests (continued)
Interrupt event
Event flag
Event flag/Interrupt
clearing method
Interrupt enable
control bit
06Y9
7&5
7;,6
7;,(
5;1(
5;,(
6723)
6723,(
$''5
$''5,(
1$&.)
1$&.,(
,&JOREDOLQWHUUXSW
%(55
295
$5/2
7,0(287
$/(57
3(&(55
7&,(
(55,(
7&
,&HUURULQWHUUXSW
,&HYHQWLQWHUUXSW