Start
No
Yes
End
Clear XDR bit
(see Note 1)
Read
I2C .I2C_STAT
i
register
Is bus
free?
Write I2C .I2C_CON with 8603h or 8601h
i
(F/S mode) or with 9603h or 9601h (HS
mode)
Read I2C .I2C_STAT
i
register and save
value
I2C .I2C_STAT[1]
i
NACK bit = 0?
No
No
No
Yes
Yes
Yes
Yes
Yes
Is ACK
returned
(NACK=0)?
Is
arbitration
lost (AL=1)?
Can
update the
registers
(ARDY=1)?
I2C .I2C_STAT[0] AL
i
bit = 1?
I2C .I2C_STAT[2]
i
ARDY bit = 1?
I2C .I2C_STAT[14]
i
XDR bit = 1?
I2C .I2C_STAT[4]
i
XRDY bit = 1?
Is
send data required
to end transfer
(XDR=1)?
Is
send data being
requested
(XRDY bit=1)?
Decisions
based on the
saved value of
I2C .I2C_STAT
i
register
Write I2C .I2C_DATA
i
register for
I2C .I2c_BUF[5:0]
i
XTRSH + 1 times
Clear XRDY bit
(see Note 1)
No
[EXPECTED COMMAND SEQUENCE]
- Full transfer
(I2C .I2C_CON[0] STT bit; I2C .I2C_CON[1] STP bit) = (1;1)
i
i
- 2 phases transfer
(I2C .I2C_CON[0] STT bit; I2C .I2C_CON[1] STP bit) = (1;0), and then (0;1)
i
i
- Multiple phases transfer
(I2C .I2C_CON[0] STT bit; I2C .I2C_CON[1] STP bit) = (1;0), (1;0)....and then (0;1) or (1;1)
i
i
[EXPECTED I2C_IE]
I2C .I2C_IE = 0000h
i
Read I2C .I2C_BUFSTAT[5:0]
i
TXSTAT to check the amount
of data left to be transmitted
Clear ARDY bit
(see Note 1)
Clear AL bit
(see Note 1)
Clear NACK bit
(see Note 1)
Write I2C .I2C_DATA
i
register for
I2C .I2C_BUFSTAT[5:0]
i
TXSTAT times
I2C .I2C_CON[0] STT and
i
I2C .I2C_CON[1] STP and
i
I2C .I2C_CON[10] MST bits
i
are cleared by hardware
I2C .I2C_CON[0] STT and
i
I2C .I2C_CON[1] STP bits
i
are cleared by hardware
Reprogram the
registers
(see Note 2)
New start?
Yes
No
No
Hardware releases the serial
clock line (i2c _scl) to high
i
I C controller goes into
2
slave receiver mode.
Stop?
Yes
I2C .I2C_STAT[12] BB bit = 0?
i
Set appropriate value to every bit of I2C .12C_CON register.
i
I2C .I2C_CON[15] I2C_EN bit must be set to 1 to take the I C
i
2
controller out of reset.
Setting this bit and setting other mode bits can be done
simultaneously.
No
i2c-029
Public Version
www.ti.com
HS I
2
C Basic Programming Model
Figure 17-29. HS I
2
C Master Transmitter Mode, Polling Method, in F/S and HS Modes (I
2
C Mode)
(1)
The NACK, AL, ARDY, XDR, and XRDY bits are cleared by writing 1 to each corresponding bit in the
I2Ci.
register.
(2)
Reprogram the registers means: I2Ci.
[10] MST bit and/or
I2Ci.
[9:0] SA register and/or I2Ci.
[15:0] DCOUNT register and/or I2Ci.
[0] STT bit
and/or I2Ci.
[1] STP bit.
NOTE:
In HS mode, the Sr condition and the clock frequency switching are automatically generated
by the multimaster HS I
2
C controller.
2803
SWPU177N – December 2009 – Revised November 2010
Multimaster High-Speed I
2
C Controller
Copyright © 2009–2010, Texas Instruments Incorporated
Содержание OMAP36 Series
Страница 174: ...174 List of Tables SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 692: ...692 MPU Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 1084: ...1084 IVA2 2 Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 1990: ...1990 2D 3D Graphics Accelerator SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2334: ...2334 Memory Subsystem SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2700: ...2700 Memory Management Units SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2868: ...2868 HDQ 1 Wire SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 2974: ...2974 UART IrDA CIR SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3054: ...3054 Multichannel SPI SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3462: ...3462 MMC SD SDIO Card Interface SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3508: ...3508 General Purpose Interface SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3584: ...3584 Initialization SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...
Страница 3648: ...3648 Debug and Emulation SWPU177N December 2009 Revised November 2010 Copyright 2009 2010 Texas Instruments Incorporated ...