Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
БЭМЗ полищук доки / Склад / Datasheet_LM3S6965.pdf
Скачиваний:
10
Добавлен:
21.12.2020
Размер:
6.13 Mб
Скачать

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 396 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 ClockTimer Period Standard ModeTimer PeriodFast Mode

4 MHz

0x01

100 Kbps

-

-

6 MHz

0x02

100 Kbps

-

-

12.5 MHz

0x06

89 Kbps

0x01

312 Kbps

16.7 MHz

0x08

93 Kbps

0x02

278 Kbps

20 MHz

0x09

100 Kbps

0x02

333 Kbps

25 MHz

0x0C

96.2 Kbps

0x03

312 Kbps

33 MHz

0x10

97.1 Kbps

0x04

330 Kbps

40 MHz

0x13

100 Kbps

0x04

400 Kbps

50 MHz

0x18

100 Kbps

0x06

357 Kbps

15.2.3Interrupts

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 thebusduetoalostarbitrationroundwithanothermaster. Ifanerrorisnotdetected,theapplication can proceed with the transfer. The interrupt is cleared by writing a '1' to the I2C Master Interrupt Clear (I2CMICR) register.

396

November 16, 2008

Preliminary

Соседние файлы в папке Склад