DSH-201010p2 Conexant 87
2/4/09 Preliminary Information/Conexant Proprietary and Confidential
CX23885 Data Sheet Registers
3.10 Memory Mapped Registers: I2C Master
The I2C protocol defines a method to send and receive a variable number of bytes via
a serial bus that interconnects several IC's. Corona contains an I2C master than can
drive this bus, and the registers below provide the programmable interface to three
I2C masters. There are three sets of registers, one for each I2C master.
First, some background is useful on the basic I2C protocol. The basic I2C protocol for
writes:
1. Send Start sequence (SDA falls while SCL is high)
2. Send 7-bit Device Address
3. Send R/W bit, set to 0
4. Check for Slave Ack, and if received, continue
5. Send variable number of bytes, checking for Ack after each byte
6. Optionally send Stop (SDA rises while SCL is high)
The basic I2C protocol for reads:
1. Send Start (SDA falls while SCL is high)
2. Send 7-bit Device Address
3. Send R/W bit, set to 1
4. Check for Slave Ack, and if received, turnaround bus to let slave drive bus
5. Receive variable number of bytes, send Ack after each byte until done
6. Optionally send stop (SDA rises while SCL is high)
The Stop condition is not important for most slaves, since the next Start (or repeated
Start) will re-initialize its state the same as a Stop would. The Stop is important for
multi-master systems, and as it's a way for a master to relinquish control of the bus.
But while I2C defines only this simple mechanism of transmitting or receiving a
variable number of bytes to/from a specific device address, it is customary for devices
to define the first N bytes of a write (one to three bytes have been observed) as a
subaddress. This subaddress typically functions as an index into a register map. Also,
it is typical for slave devices to support the concept that the byte transmitted after this
subaddress goes to the location specified by that subaddress, and each subsequent
byte goes to an auto incrementing address from the initial point. Reads work in a
similar manner, but since reads cycles do not have a means to send a subaddress, the
convention is that reads come from the last subaddress sent on a write transaction.
Thus, a read of a specific subaddress is often accomplished by transmitting the
subaddress bytes through a write, followed by a read transaction. Each byte from the
read is assumed to come from auto incrementing addresses, starting at the
subaddress sent by the write.
The idea of the programmable register interface described in the following sections is
to allow software to flexibly execute the basic I2C protocol, while providing some
convenience features for devices that conform to a typical subaddress model. The
hardware provides three methods for software to interface to the I2C bus:
1. Software Mode. Directly toggle the SCL and SDA lines, thereby implementing the
protocol through software. (All other modes are hardware mode.)
2. Simple Mode. For writes, specify the Device Address, the number of bytes to send
(0 to 4), and the data bytes themselves. For reads, specify the Device Address,
the number of bytes to receive, and read the received bytes from a register.
I2C_SADDR_LEN is set to 0 for this mode. The I2C_DATA_LEN specifies the
number of bytes to send or receive.
3. Subaddress Mode. This supports directly the subaddress model. For writes, the
hardware automatically inserts a subaddress before the data bytes. The number
of subaddress bytes to insert is controlled by I2C_SADDR_LEN, which can be 1
to 3. For reads, the hardware will automatically insert a subaddress write before
receiving data bytes. This mode provides a couple of features for software. First,
because the subaddress field has an auto increment feature, software need not