Datasheet

USI Operation
www.ti.com
14.2.4.7 Releasing SCL
Setting the USISCLREL bit will release SCL if it is being held low by the USI module without requiring
USIIFG to be cleared. The USISCLREL bit will be cleared automatically if a START condition is received
and the SCL line will be held low on the next clock.
In slave operation this bit should be used to prevent SCL from being held low when the slave has detected
that it was not addressed by the master. On the next START condition USISCLREL will be cleared and
the USISTTIFG will be set.
14.2.4.8 Arbitration
The USI module can detect a lost arbitration condition in multi-master I
2
C systems. The I
2
C arbitration
procedure uses the data presented on SDA by the competing transmitters. The first master transmitter
that generates a logic high loses arbitration to the opposing master generating a logic low. The loss of
arbitration is detected in the USI module by comparing the value presented to the bus and the value read
from the bus. If the values are not equal arbitration is lost and the arbitration lost flag, USIAL, is set. This
also clears the output enable bit USIOE and the USI module no longer drives the bus. In this case, user
software must check the USIAL flag together with USIIFG and configure the USI to slave receiver when
arbitration is lost. The USIAL flag must be cleared by software.
To prevent other faster masters from generating clocks during the arbitration procedure SCL is held low if
another master on the bus drives SCL low and USIIFG or USISTTIFG is set, or if USICNTx = 0.
14.2.4.9 I
2
C Interrupts
There is one interrupt vector associated with the USI module with two interrupt flags relevant for I
2
C
operation, USIIFG and USISTTIFG. Each interrupt flag has its own interrupt enable bit, USIIE and
USISTTIE. When an interrupt is enabled, and the GIE bit is set, a set interrupt flag will generate an
interrupt request.
USIIFG is set when USICNTx becomes zero, either by counting or by directly writing 0 to the USICNTx
bits. USIIFG is cleared by writing a value > 0 to the USICNTx bits when USIIFGCC = 0, or directly by
software.
USISTTIFG is set when a START condition is detected. The USISTTIFG flag must be cleared by software.
The reception of a STOP condition is indicated with the USISTP flag but there is no interrupt function
associated with the USISTP flag. USISTP is cleared by writing a value > 0 to the USICNTx bits when
USIIFGCC = 0 or directly by software.
404
Universal Serial Interface (USI) SLAU144JDecember 2004Revised July 2013
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated