Interrupts - NXP Semiconductors MKL27Z128VFM4 Reference Manual

Table of Contents

Advertisement

Functional description

36.5.6 Interrupts

The I2C module generates an interrupt when any of the events in the table found here
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. The SMBus timeouts interrupt is driven by SLTF
and masked with the IICIE bit. The SLTF 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.
In master receive mode, the FACK bit must be set to zero
before the last byte transfer.
Interrupt source
Complete 1-byte transfer
Match of received calling address
Arbitration lost
2
I
C bus stop detection
2
I
C bus start detection
SMBus SCL low timeout
SMBus SCL high SDA low timeout
Wakeup from stop or wait mode
36.5.6.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. When FACK is enabled,
TCF is then set at the falling edge of eighth clock to indicate the completion of byte.
36.5.6.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.
638
NOTE
Table 36-5. Interrupt summary
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Status
Flag
TCF
IICIF
IAAS
IICIF
ARBL
IICIF
STOPF
IICIF
STARTF
IICIF
SLTF
IICIF
SHTF2
IICIF
IAAS
IICIF
Local enable
IICIE
IICIE
IICIE
IICIE & SSIE
IICIE & SSIE
IICIE
IICIE & SHTF2IE
IICIE & WUEN
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents