User's Guide: TMS320C6452 DSP Inter-Integrated Circuit (I2C) Module
User's Guide: TMS320C6452 DSP Inter-Integrated Circuit (I2C) Module
User's Guide
Preface ............................................................................................................................... 6
1 Introduction................................................................................................................ 9
1.1 Purpose of the Peripheral ....................................................................................... 9
1.2 Features ........................................................................................................... 9
1.3 Functional Block Diagram ..................................................................................... 10
1.4 Industry Standard(s) Compliance Statement ............................................................... 10
2 Peripheral Architecture .............................................................................................. 11
2.1 Bus Structure .................................................................................................... 11
2.2 Clock Generation ............................................................................................... 12
2.3 Clock Synchronization ......................................................................................... 13
2.4 Signal Descriptions ............................................................................................. 13
2.5 START and STOP Conditions ................................................................................ 14
2.6 Serial Data Formats ............................................................................................ 15
2.7 Operating Modes ............................................................................................... 16
2.8 NACK Bit Generation .......................................................................................... 17
2.9 Arbitration ........................................................................................................ 18
2.10 Reset Considerations .......................................................................................... 18
2.11 Initialization ...................................................................................................... 19
2.12 Interrupt Support ................................................................................................ 20
2.13 EDMA Events Generated by the I2C Peripheral ........................................................... 20
2.14 Power Management ............................................................................................ 21
2.15 Emulation Considerations ..................................................................................... 21
3 Registers .................................................................................................................. 22
3.1 I2C Own Address Register (ICOAR) ......................................................................... 22
3.2 I2C Interrupt Mask Register (ICIMR) ......................................................................... 23
3.3 I2C Interrupt Status Register (ICSTR) ....................................................................... 24
3.4 I2C Clock Divider Registers (ICCLKL and ICCLKH) ....................................................... 27
3.5 I2C Data Count Register (ICCNT) ............................................................................ 28
3.6 I2C Data Receive Register (ICDRR) ......................................................................... 29
3.7 I2C Slave Address Register (ICSAR) ........................................................................ 29
3.8 I2C Data Transmit Register (ICDXR) ........................................................................ 30
3.9 I2C Mode Register (ICMDR) .................................................................................. 31
3.10 I2C Interrupt Vector Register (ICIVR) ........................................................................ 35
3.11 I2C Extended Mode Register (ICEMDR) .................................................................... 36
3.12 I2C Prescaler Register (ICPSC) .............................................................................. 37
3.13 I2C Peripheral Identification Register (ICPID1) ............................................................. 38
3.14 I2C Peripheral Identification Register (ICPID2) ............................................................ 38
Note: Acronyms 3PSW, CPSW, CPSW_3G, and 3pGSw are interchangeable and all refer to the 3
port gigabit switch.
TMS320C6452 DSP
TMS320C6452 DSP
SPRUF86 — TMS320C6452 Peripheral Component Interconnect (PCI) User's Guide describes the
peripheral component interconnect (PCI) port in the TMS320C6452 Digital Signal Processor (DSP).
The PCI port supports connection of the C642x DSP to a PCI host via the integrated PCI
master/slave bus interface. The PCI port interfaces to the DSP via the enhanced DMA (EDMA)
controller. This architecture allows for both PCI master and slave transactions, while keeping the
EDMA channel resources available for other applications.
SPRUF87 — TMS320C6452 DSP Host Port Interface (UHPI) User's Guide describes the host port
interface (HPI) in the TMS320C6452 Digital Signal Processor (DSP). The HPI is a parallel port
through which a host processor can directly access the CPU memory space. The host device
functions as a master to the interface, which increases ease of access. The host and CPU can
exchange information via internal or external memory. The host also has direct access to
memory-mapped peripherals. Connectivity to the CPU memory space is provided through the
enhanced direct memory access (EDMA) controller.
SPRUF89 — TMS320C6452 DSP VLYNQ Port User's Guide describes the VLYNQ port in the
TMS320C6452 Digital Signal Processor (DSP). The VLYNQ port is a high-speed point-to-point
serial interface for connecting to host processors and other VLYNQ compatible devices. It is a
full-duplex serial bus where transmit and receive operations occur separately and simultaneously
without interference.
SPRUF90 — TMS320C6452 DSP 64-Bit Timer User's Guide describes the operation of the 64-bit timer
in the TMS320C6452 Digital Signal Processor (DSP). The timer can be configured as a
general-purpose 64-bit timer, dual general-purpose 32-bit timers, or a watchdog timer.
SPRUF91 — TTMS320C6452 DSP Multichannel Audio Serial Port (McASP) User's Guide describes
the multichannel audio serial port (McASP) in the TMS320C6452 Digital Signal Processor (DSP).
The McASP functions as a general-purpose audio serial port optimized for the needs of
multichannel audio applications. The McASP is useful for time-division multiplexed (TDM) stream,
Inter-Integrated Sound (I2S) protocols, and intercomponent digital audio interface transmission
(DIT).
SPRUF92 — TMS320C6452 DSP Serial Port Interface (SPI) User's Guide discusses the Serial Port
Interface (SPI) in the TMS320C6452 Digital Signal Processor (DSP). This reference guide provides
the specifications for a 16-bit configurable, synchronous serial peripheral interface. The SPI is a
programmable-length shift register, used for high speed communication between external
peripherals or other DSPs.
SPRUF93 — TMS320C6452 DSP Universal Asynchronous Receiver/Transmitter (UART) User's
Guide describes the universal asynchronous receiver/transmitter (UART) peripheral in the
TMS320C6452 Digital Signal Processor (DSP). The UART peripheral performs serial-to-parallel
conversion on data received from a peripheral device, and parallel-to-serial conversion on data
received from the CPU.
SPRUF94 — TMS320C6452 DSP Inter-Integrated Circuit (I2C) Module User's Guide describes the
inter-integrated circuit (I2C) peripheral in the TMS320C6452 Digital Signal Processor (DSP). The
I2C peripheral provides an interface between the DSP and other devices compliant with the
I2C-bus specification and connected by way of an I2C-bus. External components attached to this
2-wire serial bus can transmit and receive up to 8-bit wide data to and from the DSP through the
I2C peripheral. This document assumes the reader is familiar with the I2C-bus specification.
SPRUF95 — TMS320C6452 DSP General-Purpose Input/Output (GPIO) User's Guide describes the
general-purpose input/output (GPIO) peripheral in the TMS320C6452 Digital Signal Processor
(DSP). The GPIO peripheral provides dedicated general-purpose pins that can be configured as
either inputs or outputs. When configured as an input, you can detect the state of the input by
reading the state of an internal register. When configured as an output, you can write to an internal
register to control the state driven on the output pin.
TMS320C6452 DSP
SPRUF96 — TMS320C6452 DSP Telecom Serial Interface Port (TSIP) User's Guide is a multi-link
serial interface consisting of a maximum of two transmit data signals (or links), two receive data
signals (or links), two frame sync input signals, and two serial clock inputs. Internally the TSIP
offers single channel of timeslot data management and single DMA capability that allow individual
timeslots to be selectively processed.
SPRUF97 — TMS320C6452 DSP 3 Port Switch (3PSW) Ethernet Subsystem User's Guide describes
the operation of the 3 port switch (3PSW) ethernet subsystem in the TMS320C6452 Digital Signal
Processor (DSP). The 3 port switch gigabit ethernet subsystem provides ethernet packet
communication and can be configured as an ethernet switch. It provides the serial gigabit media
independent interface (SGMII), the management data input output (MDIO) for physical layer device
(PHY) management.
1 Introduction
This document describes the operation of the inter-integrated circuit (I2C) peripheral in the TMS320C6452
Digital Signal Processor (DSP). The scope of this document assumes that you are familiar with the Philips
Semiconductors Inter-IC bus (I2C-bus) specification version 2.1.
1.2 Features
The I2C peripheral has the following features:
• Compliance with the Philips Semiconductors I2C-bus specification (version 2.1):
– Support for byte format transfer
– 7-bit and 10-bit addressing modes
– General call
– START byte mode
– Support for multiple master-transmitters and slave-receivers mode
– Support for multiple slave-transmitters and master-receivers mode
– Combined master transmit/receive and receive/transmit mode
– I2C data transfer rate of from 10 kbps up to 400 kbps (Philips I2C rate)
• 2 to 7 bit format transfer
• Free data format mode
• One read EDMA event and one write EDMA event that the EDMA can use
• Seven interrupts that the CPU can use
• Interface to VBUSP(32-bit synchronous slave bus)
• EDMA event enable/disable capability
• Peripheral enable/disable capability
• Operate with module frequency range of 6.7Mhz to 13.3Mhz
• Support Ignore NACK mode
Introduction
1.3 Functional Block Diagram
A block diagram of the I2C peripheral is shown in Figure 1. Refer to Section 2 for detailed information
about the architecture of the I2C peripheral.
ICXSR ICDXR
SDA CPU
ICRSR ICDRR
Control/status EDMA
Clock registers
SCL synchronizer
Prescaler
Peripheral Architecture
2 Peripheral Architecture
The I2C peripheral consists of the following primary blocks:
• A serial interface: one data pin (SDA) and one clock pin (SCL)
• Data registers to temporarily hold receive data and transmit data traveling between the SDA pin and
the CPU or the EDMA controller
• Control and status registers
• A peripheral data bus interface to enable the CPU and the EDMA controller to access the I2C
peripheral registers
• A clock synchronizer to synchronize the I2C input clock (from the processor clock generator) and the
clock on the SCL pin, and to synchronize data transfers with masters of different clock speeds
• A prescaler to divide down the input clock that is driven to the I2C peripheral
• A noise filter on each of the two pins, SDA and SCL
• An arbitrator to handle arbitration between the I2C peripheral (when it is a master) and another master
• Interrupt generation logic, so that an interrupt can be sent to the CPU
• EDMA event generation logic, so that activity in the EDMA controller can be synchronized to data
reception and data transmission in the I2C peripheral
Figure 1 shows the four registers used for transmission and reception. The CPU or the EDMA controller
writes data for transmission to ICDXR and reads received data from ICDRR. When the I2C peripheral is
configured as a transmitter, data written to ICDXR is copied to ICXSR and shifted out on the SDA pin one
bit a time. When the I2C peripheral is configured as a receiver, received data is shifted into ICRSR and
then copied to ICDRR.
Note: A master device is the device that initiates a data transfer on the bus and generates the
clock signals to permit that transfer. Any device that is addressed by this master is
considered a slave during this transfer.
An example of multiple I2C modules that are connected for a two-way transfer from one device to other
devices is shown in Figure 2.
I2C TI device
EPROM I2C
Peripheral Architecture
2.2 Clock Generation
As shown in Figure 3, PLL1 receives a signal from an external clock source and produces an I2C input
clock. A programmable prescaler (IPSC bits in ICPSC) in the I2C module divides down the I2C input clock
to produce a prescaled module clock. The prescaled module clock must be operated within the range of
6.7 to 13.3 MHZ. The I2C clock dividers (ICCH bits in ICCLKH Register) divide down the high and (ICCL
bits in ICCLKL Register)divide down the low portions of the prescaled module clock signal to produce the
I2C serial clock, which appears on the SCL pin when the I2C module is configured to be a master on the
I2C bus.
PLL1
I2C module
Register bits ÷
(ICPSC[IPSC]) I2C
prescaler
Register bits
(ICCLKL[ICCL]),
÷
(ICCLKH[ICCH]) I2C clock
dividers
Peripheral Architecture
The prescaler (IPSC bits in ICPSC) must only be initialized while the I2C module is in the reset state
(IRS = 0 in ICMDR). The prescaled frequency only takes effect when the IRS bit in ICMDR is changed
from 0 to 1. Changing the IPSC bits in ICPSC while IRS = 1 in ICMDR has no effect. Likewise, you must
configure the I2C clock dividers (ICCH bits in ICCLKH and ICCL bits in ICCLKL) while the I2C module is
still in reset (IRS = 0 in ICMDR).
SCL from
device #1
SCL from
device #2
Bus line
SCL
Peripheral Architecture
2.4.2 Pin Multiplexing
I2C module pins are not multiplexed with any other module pins.
SCL
Change of data
allowed
SDA
SCL
START STOP
condition (S) condition (P)
Peripheral Architecture
2.6 Serial Data Formats
Figure 7 shows an example of a data transfer on the I2C-bus. The I2C peripheral supports 2-bit to 8-bit
data values. Figure 7 is shown in an 8-bit data format (BC = 000 in ICMDR). Each bit put on the SDA line
is equivalent to one pulse on the SCL line. The data is always transferred with the most-significant bit
(MSB) first. The number of data values that can be transmitted or received is unrestricted; however, the
transmitters and receivers must agree on the number of data values being transferred.
The I2C peripheral supports the following data formats:
• 7-bit addressing mode
• 10-bit addressing mode
• Free data format mode
SDA
MSB
SCL
START 1 2 7 8 9 1 2 8 9 STOP
condition (S) R/W ACK ACK condition (P)
Slave address Data
Peripheral Architecture
Write 1 to the XA bit of ICMDR to select the 10-bit addressing format.
Figure 9. I2C Peripheral 10-Bit Addressing Format With Master-Transmitter Writing to Slave-Receiver
(FDF = 0, XA = 1 in ICMDR)
1 7 1 1 8 1 n 1 1
n = The number of data bits (from 2 to 8) specified by the bit count (BC) field of ICMDR.
Figure 11. I2C Peripheral 7-Bit Addressing Format With Repeated START Condition
(FDF = 0, XA = 0 in ICMDR)
1 7 1 1 n 1 1 7 1 1 n 1 1
S Slave address R/W ACK Data ACK S Slave address R/W ACK Data ACK P
1 Any 1 Any number
number
n = The number of data bits (from 2 to 8) specified by the bit count (BC) field of ICMDR.
Peripheral Architecture
Peripheral Architecture
2.9 Arbitration
If two or more master-transmitters simultaneously start a transmission on the same bus, an arbitration
procedure is invoked. The arbitration procedure uses the data presented on the serial data bus (SDA) by
the competing transmitters. Figure 12 illustrates the arbitration procedure between two devices. The first
master-transmitter, which drives SDA high, is overruled by another master-transmitter that drives SDA low.
The arbitration procedure gives priority to the device that transmits the serial data stream with the lowest
binary value. Should two or more devices send identical first bytes, arbitration continues on the
subsequent bytes.
If the I2C peripheral is the losing master, it switches to the slave-receiver mode, sets the arbitration lost
(AL) flag, and generates the arbitration-lost interrupt.
If during a serial transfer the arbitration procedure is still in progress when a repeated START condition or
a STOP condition is transmitted to SDA, the master-transmitters involved must send the repeated START
condition or the STOP condition at the same position in the format frame. Arbitration is not allowed
between:
• A repeated START condition and a data bit
• A STOP condition and a data bit
• A repeated START condition and a STOP condition
Bus line
SCL
Device #1 lost arbitration
and switches off
Data from
1 0
device #1
Data from 1 0 0 1 0 1
device #2
Bus line
SDA 1 0 0 1 0 1
Note: If the IRS bit is cleared to 0 during a transfer, this can cause the I2C bus to hang (SDA and
SCL are in the high-impedance state).
Peripheral Architecture
Note: The IRS bit must be cleared to 0 while you configure/reconfigure the I2C peripheral. Forcing
IRS to 0 can be used to save power and to clear error conditions.
2.11 Initialization
Proper I2C initialization is required prior to starting communication with other I2C device(s). I2C peripheral
must be programmed appropriately based on the need to use it either as master or slave I2C peripheral.
After the I2C peripheral is programmed with the desired settings, the I2C peripheral must be brought out
of reset. In case where the I2C peripheral is being used as master, the ICSAR Register must be
programmed with the correct slave address. Prior to starting I2C communication, ensure that all the status
bits in the ICSTR Register are clear, no interrupts are pending and the bus busy bit in ICSTR register
indicates the bus is free for the communication to start.
2.11.1 Configuring the I2C in Master Receiver Mode and Servicing Receive Data via CPU
The following initialization procedure is used to configure the I2C peripheral in Master Receiver mode. The
CPU is used to move data from the I2C receive register(ICDRR) to CPU memory (memory accessible by
the CPU).
1. Enable the clock to the I2C peripheral by programming the Local Power and Sleep Controller(LPSC)
tied with I2C peripheral.
2. Place I2C in reset (clear IRS = 0 in ICMDR).
3. Configure ICMDR:
• Configure I2C as Master (MST = 1).
• Indicate the I2C configuration to be used; for example, Data Receiver (TRX = 0)
• Indicate 7-bit addressing is to be used (XA = 0).
• Disable repeat mode (RM = 0).
• Disable loopback mode (DLB = 0).
• Disable free data format (FDF = 0).
• Optional: Disable start byte mode if addressing a fully fledged I2C device (STB = 0).
• Set number of bits to transfer to be 8 bits (BC = 0).
4. Configure Slave Address: the I2C device this I2C master would be addressing (ICSAR = 7BIT
ADDRESS).
5. Configure the peripheral clock operation frequency (ICPSC). This value should be selected in such a
way that the frequency is between 6.7 to 13.3 MHZ.
6. Configure I2C master clock frequency:
• Configure the low-time divider value (ICCLKL).
• Configure the high-time divider value (ICCLKH).
7. Make sure the interrupt status register (ICSTR) is cleared:
• Read ICSTR and write it back (write 1 to clear) ICSTR = ICSTR
• Read ICIVR until it is zero.
8. Take I2C controller out of reset: enable I2C controller (set IRS bit = 1 in ICMDR).
9. Wait until bus busy bit is cleared (BB = 0 in ICSTR).
10. Generate a START event, followed by Slave Address, etc. (set STT = 1 in ICMDR).
11. Wait until data is received (ICRRDY = 1 in ICSTR).
12. Read data:
• If ICRRDY = 1 in ICSTR, then read ICDRR.
• Perform the previous two steps until receiving one byte short of the entire byte expecting to
receive.
13. Configure the I2C controller not to generate an ACK on the next/final byte reception: set NACKMOD
bit for the I2C to generate a NACK on the last byte received (set NACKMOD = 1 in ICMDR).
14. End transfer/release bus when transfer is done. Generate a STOP event (set STP = 1 in ICMDR).
Peripheral Architecture
2.12 Interrupt Support
In order to ensure that the I2C peripheral is able to generate interrupt to the DSP CPU, the I2C peripheral
needs to be mapped and enabled appropriately in the enhanced interrupt selector. This will ensure that
the I2C interrupt is enabled at the chip level. The enhanced interrupt selector in turn generates interrupt to
the DSP CPU.
The I2C peripheral is capable of interrupting 7 types of interrupts to the DSP CPU. The CPU can
determine which I2C events caused the interrupt by reading the I2C interrupt vector register (ICIVR).
ICIVR contains a binary-coded interrupt vector type to indicate which interrupt has occurred. Reading
ICIVR clears the interrupt flag; if other interrupts are pending, a new interrupt is generated. If there is more
than one pending interrupt flag, reading ICIVR clears the highest-priority interrupt flag.
The I2C interrupt is one clock wide active high signal.
Peripheral Architecture
2.14 Power Management
The power management(Clocking and Reset function) of the I2C peripheral is controlled by the Local
Power and Sleep Controller (LPSC)associated with the I2C peripheral. The LPSC acts as a master
controller for enabling/disabling I2C peripheral clock and reset signals to the I2C peripheral. The I2C
peripheral is not provided with clock signal on power up condition. User would need to ensure that the I2C
peripheral clock is turned on by appropriately programming the LPSC associated with I2C peripheral,
before starting to access the I2C peripheral for any kind of data transfer operation. For detailed
information on power management procedures using the LPSC, see the DSP Subsystem User's Guide.
Registers
3 Registers
Table 4 lists the memory-mapped registers for the inter-integrated circuit (I2C) peripheral. See the
device-specific data manual for the memory address of these registers. All other register offset addresses
not listed in Table 4 should be considered as reserved locations and the register contents should not be
modified.
15 10 9 0
Reserved OADDR
R-0 R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
7 6 5 4 3 2 1 0
Reserved AAS SCD ICXRDY ICRRDY ARDY NACK AL
R-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
3.3 I2C Interrupt Status Register (ICSTR)
The I2C interrupt status register (ICSTR) is used to determine which interrupt has occurred and to read
status information.
The I2C interrupt status register (ICSTR) is shown in Figure 15 and described in Table 7.
15 14 13 12 11 10 9 8
Reserved SDIR NACKSNT BB RSFULL XSMT AAS AD0
R-0 R/W1C-0 R/W1C-0 R/W1C-0 R-0 R-1 R-0 R-0
7 6 5 4 3 2 1 0
Reserved SCD ICXRDY ICRRDY ARDY NACK AL
R-0 R/W1C-0 R/W1C-1 R/W1C-0 R/W1C-0 R/W1C-0 R/W1C-0
LEGEND: R/W = Read/Write; R = Read only; W1C = Write 1 to clear (writing 0 has no effect); -n = value after reset
Registers
Registers
Registers
3.4 I2C Clock Divider Registers (ICCLKL and ICCLKH)
When the I2C is a master, the prescaled module clock is divided down for use as the I2C serial clock on
the SCL pin. The shape of the I2C serial clock depends on two divide-down values, ICCL and ICCH. For
detailed information on how these values are programmed, see Section 2.2.
15 0
ICCL
R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
15 0
ICCH
R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
15 0
ICDC
R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
3.6 I2C Data Receive Register (ICDRR)
The I2C data receive register (ICDRR) is used to read the receive data. The ICDRR can receive a data
value of up to 8 bits; data values with fewer than 8 bits are right-aligned in the D bits and the remaining D
bits are undefined. The number of data bits is selected by the bit count bits (BC) of ICMDR. The I2C
receive shift register (ICRSR) shifts in the received data from the SDA pin. Once data is complete, the I2C
copies the contents of ICRSR into ICDRR. The CPU and the EDMA controller cannot access ICRSR.
The I2C data receive register (ICDRR) is shown in Figure 19 and described in Table 11.
15 8 7 0
Reserved D
R-0 R-0
LEGEND: R = Read only; -n = value after reset
15 10 9 0
Reserved SADDR
R-0 R/W-3FFh
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
15 8 7 0
Reserved D
R-0 R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
3.9 I2C Mode Register (ICMDR)
The I2C mode register (ICMDR) contains the control bits of the I2C.
The I2C mode register (ICMDR) is shown in shown in Figure 22 and described in Table 14.
15 14 13 12 11 10 9 8
NACKMOD FREE STT Reserved STP MST TRX XA
R/W-0 R/W-0 R/W-0 R-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 0
RM DLB IRS STB FDF BC
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
Registers
Table 15. Master-Transmitter/Receiver Bus Activity Defined by RM, STT, and STP Bits
ICMDR Bit
RM STT STP Bus Activity (1) Description
0 0 0 None No activity
0 0 1 P STOP condition
0 1 0 S-A-D..(n)..D START condition, slave address, n data words (n = value in ICCNT)
0 1 1 S-A-D..(n)..D-P START condition, slave address, n data words, STOP condition (n = value in ICCNT)
1 0 0 None No activity
1 0 1 P STOP condition
1 1 0 S-A-D-D-D.. Repeat mode transfer: START condition, slave address, continuous data transfers
until STOP condition or next START condition
1 1 1 None Reserved bit combination (No activity
(1)
A = Address; D = Data word; P = STOP condition; S = START condition
Registers
Table 16. How the MST and FDF Bits Affect the Role of TRX Bit
ICMDR Bit
MST FDF I2C State Function of TRX Bit
0 0 In slave mode but not free data format TRX is a don't care. Depending on the command from the master, the I2C
mode responds as a receiver or a transmitter.
0 1 In slave mode and free data format The free data format mode requires that the transmitter and receiver be
mode fixed. TRX identifies the role of the I2C:
TRX = 0: The I2C is a receiver.
TRX = 1: The I2C is a transmitter.
1 0 In master mode but not free data TRX identifies the role of the I2C:
format mode
TRX = 0: The I2C is a receiver.
TRX = 1: The I2C is a transmitter.
1 1 In master mode and free data format The free data format mode requires that the transmitter and receiver be
mode fixed. TRX identifies the role of the I2C:
TRX = 0: The I2C is a receiver.
TRX = 1: The I2C is a transmitter.
Figure 23. Block Diagram Showing the Effects of the Digital Loopback Mode (DLB) Bit
I2C peripheral
DLB
SCL_IN 0 SCL
To internal I2C logic
1 0
SCL_OUT
From internal I2C logic
DLB
To internal I2C logic
0 SDA
To ARM CPU or EDMA ICDRR ICRSR
DLB 1 0
Registers
3.10 I2C Interrupt Vector Register (ICIVR)
The I2C interrupt vector register (ICIVR) is used by the CPU to determine which event generated the I2C
interrupt. Reading ICIVR clears the interrupt flag; if other interrupts are pending, a new interrupt is
generated. If there are more than one interrupt flag, reading ICIVR clears the highest priority interrupt flag.
Note that you must read (clear) ICIVR before doing another start; otherwise, ICIVR could contain an
incorrect (old interrupt flags) value.
The I2C interrupt vector register (ICIVR) is shown in Figure 24 and described in Table 17.
15 2 0
Reserved INTCODE
R-0 R-0
Registers
3.11 I2C Extended Mode Register (ICEMDR)
The I2C extended mode register (ICEMDR) is used to indicate which condition generates a transmit data
ready interrupt.
The I2C extended mode register (ICEMDR) is shown in Figure 25 and described in Table 18.
15 1 0
Reserved IGNACK BCM
R-0 R/W-0 R/W-1
LEGEND: R/W = Read/Write; R= Read only; -n = value after reset
Registers
3.12 I2C Prescaler Register (ICPSC)
The I2C prescaler register (ICPSC) is used for dividing down the I2C input clock to obtain the desired
prescaled module clock for the operation of the I2C.
The IPSC bits must be initialized while the I2C is in reset (IRS = 0 in ICMDR). The prescaled frequency
takes effect only when the IRS bit is changed to 1. Changing the IPSC value while IRS = 1 has no effect.
The I2C prescaler register (ICPSC) is shown in Figure 26 and described in Table 19.
15 8 7 0
Reserved IPSC
R-0 R/W-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
Registers
3.13 I2C Peripheral Identification Register (ICPID1)
The I2C peripheral identification registers (ICPID1) contain identification data (class, revision, and type) for
the peripheral.
The I2C peripheral identification register (ICPID1) is shown in Figure 27 and described in Table 20.
15 8 7 0
Class Revision
R-01h R-06h
LEGEND: R = Read only; -n = value after reset
15 8 7 0
Reserved TYPE
R-0 R-05h
LEGEND: R = Read only; -n = value after reset
Products Applications
Amplifiers amplifier.ti.com Audio www.ti.com/audio
Data Converters dataconverter.ti.com Automotive www.ti.com/automotive
DSP dsp.ti.com Broadband www.ti.com/broadband
Interface interface.ti.com Digital Control www.ti.com/digitalcontrol
Logic logic.ti.com Military www.ti.com/military
Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork
Microcontrollers microcontroller.ti.com Security www.ti.com/security
RFID www.ti-rfid.com Telephony www.ti.com/telephony
Low Power www.ti.com/lpw Video & Imaging www.ti.com/video
Wireless
Wireless www.ti.com/wireless
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2007, Texas Instruments Incorporated