30.4.4 Resets
The I2C module is disabled after a reset. The I2C module cannot cause a core reset.
30.4.5 Interrupts
The I2C module generates an interrupt when any of the events in the following table
occur, provided that the IICIE bit is set. The interrupt is driven by the IICIF bit (of the
I2C Status Register) and masked with the IICIE bit (of the I2C Control Register 1). The
IICIF bit must be cleared (by software) by writing 1 to it in the interrupt routine. You can
determine the interrupt type by reading the Status Register.
Table 30-32. Interrupt summary
Interrupt source
Status
Flag
Local enable
Complete 1-byte transfer
TCF
IICIF
IICIE
Match of received calling address
IAAS
IICIF
IICIE
Arbitration lost
ARBL
IICIF
IICIE
I
2
C bus stop detection
STOPF
IICIF
IICIE & STOPIE
Wakeup from stop or wait mode
IAAS
IICIF
IICIE & WUEN
30.4.5.1 Byte transfer interrupt
The Transfer Complete Flag (TCF) bit is set at the falling edge of the ninth clock to
indicate the completion of a byte and acknowledgement transfer.
30.4.5.2 Address detect interrupt
When the calling address matches the programmed slave address (I2C Address Register)
or when the GCAEN bit is set and a general call is received, the IAAS bit in the Status
Register is set. The CPU is interrupted, provided the IICIE bit is set. The CPU must
check the SRW bit and set its Tx mode accordingly.
30.4.5.3 Stop Detect Interrupt
When the stop status is detected on the I
2
C bus, the STOPF bit is set to 1. The CPU is
interrupted, provided the IICIE and STOPIE bits are both set to 1.
Functional description
KL02 Sub-Family Reference Manual, Rev. 2.1, July 2013
490
Freescale Semiconductor, Inc.