SPRUHM9H October 2014 – May 2024 TMS320F28075 , TMS320F28075-Q1 , TMS320F28076
The I2C module has four basic operating modes to support data transfers as a master and as a slave. See Table 19-2 for the names and descriptions of the modes.
If the I2C module is a master, the I2C module begins as a master-transmitter and typically transmits an address for a particular slave. When giving data to the slave, the I2C module must remain a master-transmitter. To receive data from a slave, the I2C module must be changed to the master-receiver mode.
If the I2C module is a slave, the I2C module begins as a slave-receiver and typically sends acknowledgment when the I2C module recognizes the slave address from a master. If the master is sending data to the I2C module, the module must remain a slave-receiver. If the master has requested data from the I2C module, the module must be changed to the slave-transmitter mode.
Operating Mode | Description |
---|---|
Slave-receiver mode | The I2C module is a slave and receives data from a master. |
All slaves begin in this mode. In this mode, serial data bits received on SDA are shifted in with the clock pulses that are generated by the master. As a slave, the I2C module does not generate the clock signal, but can hold SCL low while the intervention of the device is required (RSFULL = 1 in I2CSTR) after a byte has been received. See Section 19.3.8 for more details. | |
Slave-transmitter mode | The I2C module is a slave and transmits data to a master. |
This mode can be entered only from the slave-receiver mode; the I2C module must first receive a command from the master. When using any of the 7-bit/10-bit addressing formats, the I2C module enters the slave-transmitter mode if the slave address byte is the same as the address (in I2COAR) and the master has transmitted R/ W = 1. As a slave-transmitter, the I2C module then shifts the serial data out on SDA with the clock pulses that are generated by the master. While a slave, the I2C module does not generate the clock signal, but it can hold SCL low while the intervention of the device is required (XSMT = 0 in I2CSTR) after a byte has been transmitted. See Section 19.3.8 for more details. | |
Master-receiver mode | The I2C module is a master and receives data from a slave. |
This mode can be entered only from the master-transmitter mode; the I2C module must first transmit a command to the slave. When using any of the 7-bit/10-bit addressing formats, the I2C module enters the master-receiver mode after transmitting the slave address byte and R/ W = 1. Serial data bits on SDA are shifted into the I2C module with the clock pulses generated by the I2C module on SCL. The clock pulses are inhibited and SCL is held low when the intervention of the device is required (RSFULL = 1 in I2CSTR) after a byte has been received. | |
Master-transmitter mode | The I2C module is a master and transmits control information and data to a slave. |
All masters begin in this mode. In this mode, data assembled in any of the 7-bit/10-bit addressing formats is shifted out on SDA. The bit shifting is synchronized with the clock pulses generated by the I2C module on SCL. The clock pulses are inhibited and SCL is held low when the intervention of the device is required (XSMT = 0 in I2CSTR) after a byte has been transmitted. |
To summarize, SCL is held low in the following conditions:
I2C slave nodes accept and provide data when the I2C master node requests data.
RM | STT | STP | Bus Activity(1) | Description |
---|---|---|---|---|
0 | 0 | 0 | None | No activity |
0 | 0 | 1 | P | STOP condition |
0 | 1 | 0 | S-A-D..(n)..D. | START condition, slave address, n data bytes (n = value in I2CCNT) |
0 | 1 | 1 | S-A-D..(n)..D-P | START condition, slave address, n data bytes, STOP condition (n = value in I2CCNT) |
1 | 0 | 0 | None | No activity |
1 | 0 | 1 | P | STOP condition |
1 | 1 | 0 | S-A-D-D-D. | Repeat mode transfer: START condition, slave address, continuous data transfers until STOP condition or next START condition |
1 | 1 | 1 | None | Reserved bit combination (No activity) |