English
Language : 

LM3S6753 Datasheet, PDF (400/625 Pages) Texas Instruments – Stellaris LM3S6753 Microcontroller
Inter-Integrated Circuit (I2C) Interface
CLK_PRD = 50 ns
TIMER_PRD = 2
SCL_LP=6
SCL_HP=4
yields a SCL frequency of:
1/T = 333 Khz
Table 15-1 on page 400 gives examples of timer period, system clock, and speed mode (Standard
or Fast).
Table 15-1. Examples of I2C Master Timer Period versus Speed Mode
System Clock
4 MHz
6 MHz
12.5 MHz
16.7 MHz
20 MHz
25 MHz
33 MHz
40 MHz
50 MHz
Timer Period
0x01
0x02
0x06
0x08
0x09
0x0C
0x10
0x13
0x18
Standard Mode
100 Kbps
100 Kbps
89 Kbps
93 Kbps
100 Kbps
96.2 Kbps
97.1 Kbps
100 Kbps
100 Kbps
Timer Period
-
-
0x01
0x02
0x02
0x03
0x04
0x04
0x06
Fast Mode
-
-
312 Kbps
278 Kbps
333 Kbps
312 Kbps
330 Kbps
400 Kbps
357 Kbps
15.2.3
Interrupts
The I2C can generate interrupts when the following conditions are observed:
■ Master transaction completed
■ Master transaction error
■ Slave transaction received
■ Slave transaction requested
There is a separate interrupt signal for the I2C master and I2C slave modules. While both modules
can generate interrupts for multiple conditions, only a single interrupt signal is sent to the interrupt
controller.
15.2.3.1
I2C Master Interrupts
The I2C master module generates an interrupt when a transaction completes (either transmit or
receive), or when an error occurs during a transaction. To enable the I2C master interrupt, software
must write a '1' to the I2C Master Interrupt Mask (I2CMIMR) register. When an interrupt condition
is met, software must check the ERROR bit in the I2C Master Control/Status (I2CMCS) register to
verify that an error didn't occur during the last transaction. An error condition is asserted if the last
transaction wasn't acknowledge by the slave or if the master was forced to give up ownership of
the bus due to a lost arbitration round with another master. If an error is not detected, the application
can proceed with the transfer. The interrupt is cleared by writing a '1' to the I2C Master Interrupt
Clear (I2CMICR) register.
400
April 05, 2010
Texas Instruments-Production Data