
97
L2166_A
I2C Register Denitions
I2C Slave Module Software Interface
Bt2166
Graphics/Video Controller
I2C Slave Control
Write Register
name:
GRP_I2C_SCTRLW
index:
4Ch, write only
size:
8 bits
function:
The GRP_I2C_SCTRLR register controls the operation of the I2C
slave module. Writing to this register initializes the DONE and BITS
elds in the GRP_I2C_SCTRLR register. Initializing the BITS eld in
the GRP_I2C_SCTRLR register would destroy any I2C bus transaction
in progress, so this register must not be written to while the I2C slave
module is busy. It is the responsibility of the system software to ensure
that this register is never written to except when the I2C master module
is idle (indicated by DONE = 1 in the GRP_I2C_SCTRLR register).
All the bits in this register except for TACK are set to zero upon re-
set. This reset initialization places the I2C slave module in an idle state
immediately after reset. The TACK value of “1” is transmits an ACK
bit of “1,” which indicates a “not acknowledge” state. With these reset
values in the GRP_I2C_SCTRLW register, the I2C slave module will
receive data from the I2C bus as it appears but it will never transmit any
I2C acknowledge bits and it will never generate an interrupt.
A break (BSTO, BSTA, BRCV, or BACK) must be enabled so that
the slave state machine operates properly. A break acts as an interrupt
causing the slave to hold SCLK low, stretching the cycles until re-
leased. The next start or stop will reset the slave.
The bit contents of the GRP_I2C_SCTRLW register are shown in
Table 73.
Table 73. I2C Slave Write Control Register GRP_I2C_SCTRLW[7:0] Bit Descriptions
(1 of 2)
Bit
Function
Detail
7:6
Reserved
These bits are currently unused in the I2C slave module, however the system software
must always write “00” here to allow for possible future expansions.
Must write 0’s here.
5
BSTO
Break on stop. When set to “1,” this control bit causes this module to generate a DONE
bit/interrupt after the next stop token reception on the I2C bus.
0 = no break after receive stop
1 = break after receive stop
4
BSTA
Break on start. When set to “1,” this control bit causes this module to generate a DONE
bit/interrupt after the next start token reception on the I2C bus.
0 = no break after receive start
1 = break after receive start
3
INTE
Interrupt enable. When set to “1,” this control bit causes the interrupt output from the I2C
slave module to go to “1” whenever the contents of the DONE eld goes to “1.” If this bit
is set to “0,” the system software must service this module by means of software polling.
This process will not result in the loss of any data but may cause the I2C bus idle until the
system software next polls this module and sets up the next request. Note that the actual
interrupt is generated by ANDing this bit with the DONE bit of the CTRLR read register.
0 = disable interrupt (software polling)
1 = interrupt enable