SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
The I2C module has four basic operating modes to support data transfers as a controller and as a target. See Table 28-2 for the names and descriptions of the modes.
If the I2C module is a controller, the I2C module begins as a controller-transmitter and typically transmits an address for a particular target. When giving data to the target, the I2C module must remain a controller-transmitter. To receive data from a target, the I2C module must be changed to the controller-receiver mode.
If the I2C module is a target, the I2C module begins as a target-receiver and typically sends acknowledgment when the I2C module recognizes the target address from a controller. If the controller is sending data to the I2C module, the module must remain a target-receiver. If the controller has requested data from the I2C module, the module must be changed to the target-transmitter mode.
Operating Mode | Description |
---|---|
Target-receiver mode | The I2C module is a target and receives data from a controller. |
All targets 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 controller. As a target, 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 28.3.8 for more details. | |
Target-transmitter mode | The I2C module is a target and transmits data to a controller. |
This mode can be entered only from the target-receiver mode; the I2C module must first receive a command from the controller. When using any of the 7-bit/10-bit addressing formats, the I2C module enters the target-transmitter mode if the target address byte is the same as the address (in I2COAR) and the controller has transmitted R/ W = 1. As a target-transmitter, the I2C module then shifts the serial data out on SDA with the clock pulses that are generated by the controller. While a target, 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 28.3.8 for more details. | |
Controller-receiver mode | The I2C module is a controller and receives data from a target. |
This mode can be entered only from the controller-transmitter mode; the I2C module must first transmit a command to the target. When using any of the 7-bit/10-bit addressing formats, the I2C module enters the controller-receiver mode after transmitting the target 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. | |
Controller-transmitter mode | The I2C module is a controller and transmits control information and data to a target. |
All controllers 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 target nodes accept and provide data when the I2C controller 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, target address, n data bytes (n = value in I2CCNT) |
0 | 1 | 1 | S-A-D..(n)..D-P | START condition, target 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, target address, continuous data transfers until STOP condition or next START condition |
1 | 1 | 1 | None | Reserved bit combination (No activity) |