Is I2C Bus free
I2CSTR.BB = 0?
I2C Bus Free
I2C Bus Busy
Interrupt received?
No
Yes
ACK (NACK= 0)
received?
No (NACK received)
Generate STOP condition
(STP = 1)
Yes
(ACK received)
Non-FIFO:
Receive ready (RRDY)?
(or)
FIFO:
RXFIFO interrupt (RXFFINT)?
Non-FIFO:
Rcvd data = I2CDRR
FIFO:
Store received data in a buffer from RXFIFO
Yes
Non-repeat mode:
I2CCNT not equal to 0
(or)
Repeat mode:
More bytes to be
received?
Yes
(More bytes needs
to be received)
Master Transmitter
(or)
Master Receiver
Master Transmitter (MST = 1)
Master Receiver (MST = 0)
Repeat mode (RM = 1)
(or)
Non-repeat mode (RM = 0)
I2
&&17 LV GRQ·W FDUH
Repeat mode
Write I2CMDR = 0x66A0
I2CCNT = Number of bytes
to be transmitted
Non-Repeat mode
Write I2CMDR = 0x6620
Repeat mode (RM = 1)
(or)
Non-repeat mode (RM = 0)
I2
&&17 LV GRQ·W FDUH
Repeat mode
Write I2CMDR = 0x62A0
I2CCNT = Number of bytes
to be received
Non-Repeat mode
Write I2CMDR = 0x6220
Non-FIFO:
I2CDXR = next data
FIFO:
Update I2CDXR in a loop to fill FIFO
Non-FIFO:
Transmit ready (XRDY)?
(or)
FIFO:
TXFIFO interrupt (TXFFINT)?
Yes
(ACK received)
Non-repeat mode:
I2CCNT not equal to 0
(or)
Repeat mode:
More bytes to be
transmitted?
Yes
(More bytes needs
to be transmitted)
Yes
No
(No more bytes to
be transmitted)
No
(No more bytes to
be received)
Start
Disable I2C
(IRS = 0)
Enable I2C
(IRS = 1)
Application code decides to initiate I2C transaction
No
No
I2C Master device running its own application code
Configure I2C Module clock using
I2CPSC register
I2C Module clock should be 7-12 MHz
Configure I2C baud rate using I2CCLKL and I2CCLKH
1) Configure I2C Own address using I2COAR
2) Configure I2C Slave address to talk to using I2CSAR
Non-FIFO mode
3) Enable below I2C Interrupts using I2CIER
No-acknowledge interrupt (NACK)
Arbitration Lost (ARBL)
Transmit Ready (XRDY) & Receive Ready (RRDY)
FIFO mode
4) Enable and configure TX / RX FIFO
Configure TX FIFO level (TXFFIL)
Configure RX FIFO level (RXFFIL)
5) Enable TX FIFO (TXFFIENA) and RX FIFO (RXFFIENA) interrupts
Figure 14-7. I2C Master TX / RX Flowchart
Inter-Integrated Circuit Module (I2C)
842
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......