www
.mcu.com.cn
190
/
239
Rev.
1.00
CMS80F731x Reference Manual
21.5 I2C Interrupt
The interrupt number for I2C is 21, where the interrupt vector is 0x00AB. The Enable I2C interrupt must set its enable bit
I2CIE to 1 and the global interrupt enable bit EA to 1.
If the I2C-related interrupt enables are turned on,the CPU will enter the interrupt service program when the I2C global
interrupt indicator bit I2CIF=1 is turned on. The I2CIF operation properties are read-only and independent of the state of the
I2CIE.
I2C Master Mode Interrupt Flag Bit I2CMIF, Slave mode Transmit Operation Completion Flag Bit SENDFIN, Slave mode
Ready to Send Flag Bit TREQ, Slave mode Receive Completion Flag Bit RREQ Any one is 1,I2C Global interrupt Indicator Bit
I2CIF will be set to 1. I2CIF automatically clears 0 only if all four flag bits are 0.
21.5.1
Interrupt Mask Register EIE2
0xAA
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
EIE2
SPIIE
I2CIE
WDTIE
ADCIE
PWMIE
--
ET4
ET3
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset value
0
0
0
0
0
0
0
0
Bit7
SPIIE:
SPI interrupt enable bit;
1=
Enable SPI interrupts;
0=
Disable SPI Interrupt.
Bit6
I2CIE:
I2Cinterrupt enable bit;
1=
Enable I2C interrupts;
0=
Forbidden I2C Interrupt.
Bit5
WDTIE:
WDT interrupt enable bit;
1=
Enable WDT overflow interrupts;
0=
Disable WDT overflow interrupts.
Bit4
ADCIE:
ADC interrupt enable bit;
1=
Enable ADC interrupts;
0=
Disable ADC interrupts.
Bit3
PWMIE:
PWM global interrupt enable bit;
1=
Enable all PWM interrupts;
0=
Disable all PWM interrupts.
Bit2
--
Reserved, must be 0.
Bit1
ET4:
Timer4 interrupt enable bit;
1=
Enable Timer4 interrupts;
0=
Forbidden Timer4 Interrupt.
Bit0
ET3:
Timer3 interrupt enable bit;
1=
Enable Timer3 interrupts;
0=
Forbidden Timer3 Interrupt.