USCI Operation: I2C Mode
21-23
Universal Serial Communication Interface, I2C Mode
21.3.7 USCI Interrupts in I
2
C Mode
Their are two interrupt vectors for the USCI module in I
2
C mode. One interrupt
vector is associated with the transmit and receive interrupt flags. The other
interrupt vector is associated with the four state change interrupt flags. Each
interrupt flag has its own interrupt enable bit. When an interrupt is enabled, and
the GIE bit is set, the interrupt flag will generate an interrupt request. DMA
transfers are controlled by the UCBxTXIFG and UCBxRXIFG flags on devices
with a DMA controller.
I
2
C Transmit Interrupt Operation
The UCBxTXIFG interrupt flag is set by the transmitter to indicate that
UCBxTXBUF is ready to accept another character. An interrupt request is
generated if UCBxTXIE and GIE are also set. UCBxTXIFG is automatically
reset if a character is written to UCBxTXBUF or if a NACK is received.
UCBxTXIFG is set when UCSWRST = 1 and the I
2
C mode is selected.
UCBxTXIE is reset after a PUC or when UCSWRST = 1.
I
2
C Receive Interrupt Operation
The UCBxRXIFG interrupt flag is set when a character is received and loaded
into UCBxRXBUF. An interrupt request is generated if UCBxRXIE and GIE are
also set. UCBxRXIFG and UCBxRXIE are reset after a PUC signal or when
UCSWRST = 1. UCxRXIFG is automatically reset when UCxRXBUF is read.
I
2
C State Change Interrupt Operation.
2
C state change interrupt flags.
Table 21−1.I
2
C State Change Interrupt Flags
Interrupt Flag
Interrupt Condition
UCALIFG
Arbitration-lost. Arbitration can be lost when two or more
transmitters start a transmission simultaneously, or when the
USCI operates as master but is addressed as a slave by another
master in the system. The UCALIFG flag is set when arbitration is
lost. When UCALIFG is set the UCMST bit is cleared and the I
2
C
controller becomes a slave.
UCNACKIFG
Not-acknowledge interrupt. This flag is set when an acknowledge
is expected but is not received. UCNACKIFG is automatically
cleared when a START condition is received.
UCSTTIFG
Start condition detected interrupt. This flag is set when the I
2
C
module detects a START condition together with its own address
while in slave mode. UCSTTIFG is used in slave mode only and
is automatically cleared when a STOP condition is received.
UCSTPIFG
Stop condition detected interrupt. This flag is set when the I
2
C
module detects a STOP condition while in slave mode.
UCSTPIFG is used in slave mode only and is automatically
cleared when a START condition is received.
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...