Programming - Texas Instruments OMAP5910 Technical Reference Manual

Dual-core
Hide thumbs Also See for OMAP5910:
Table of Contents

Advertisement

SDA Line Drive Output Value (SDA_O)
7.8.3

Programming

7.8.3.1
Main Program
In normal functional mode (ST_EN = 0), this bit (0) is don't care, and always
reads as 0. Writes are ignored.
In system test mode (ST_EN = 1 and TMODE = 11), a 0 forces a low level on
the SDA line and a 1 puts the I
-
0: Forces 0 on the SDA data line
-
1: SDA output driver in HIZ state
Value after reset is low.
State after reset:
1) Program the prescaler to obtain an approximately 12-MHz I
clock (I2C_PSC = x; this value is to be calculated and is dependent on the
CPU frequency).
J
If using interrupt for transmit/receive data, enable interrupt masks.
J
If using DMA for transmit/receive data, enable the DMA and program
the DMA controller.
2
2) Take the I
C module out of reset (I2C_EN = 1).
Initialization procedure: Configure the I
Program clock control registers (I2C_SCLL and I2C_SCLH): Program the I
clock to obtain 100K bps or 400K bps (I2C_SCLL = x and I2C_SCLH = x; these
values are to be calculated and are dependent on the CPU frequency).
-
Configure address registers:
J
Configure its own address (I2C_OA = x).
J
Configure the slave address (I2C_SA = x).
-
Program transmit data register (I2C_DATA): If in master transmitter mode,
program the data transmit register (I2C_DATA = x).
-
Configure status and mode register (I2C_STAT): Poll the bus busy (BB)
2
bit in the I
C status register (I2C_STAT); if it is cleared to 0 (bus not busy),
configure START/STOP condition to initiate a transfer.
Inter-Integrated Circuit Controller
2
C output driver in a high-impedance state.
2
C mode register (I2C_CON) bits.
MPU Public Peripherals
2
C module
2
C
7-87

Advertisement

Table of Contents
loading

Table of Contents