SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
The I2C peripheral has support for high-speed operation as both a master and slave. High-speed mode is configured by setting the HS bit in the I2C Master Control/Status (I2CMCS) register. High-speed mode transmits data at a high bit rate with a 66.6%/33.3% duty cycle, but communication and arbitration are done at standard, fast mode, or fast-mode plus speed, depending on which is selected by the user. When the HS bit in the I2CMCS register is set, current mode pullups are enabled.
The clock period can be selected using Equation 38, but in this case, SCL_LP = 2 and SCL_HP = 1.
For example:
Yields a SCL frequency of: 1/T = 3.33 MHz
Table 46-2 gives examples of timer period and system clock in high-speed mode. Note that the HS bit in the I2CMTPR register must be set for the TPR value to be used in high-speed mode.
System Clock | Timer Period | Transmission Mode |
---|---|---|
200 MHz | 9 | 3.33 Mbps |
When operating as a master, the protocol is shown in Figure 46-7. The master is responsible for sending a master code byte in either standard (100 kbps) or fast mode (400 kbps) before the code byte begins transferring in high-speed mode. The master code byte must contain data in the form of 0000.1XXX and is used to tell the slave devices to prepare for a high-speed transfer. The master code byte must never be acknowledged by a slave, since the code byte is only used to indicate that the upcoming data is going to be transferred at a higher data rate. To send the master code byte for a standard high-speed transfer, software must place the value of the master code byte into the I2CMSA register and write the I2CMCS register with a value of 0x13. If a high-speed burst transfer is required, then to send the master code byte, software must place the value of the master code byte into the I2CMSA register and write the I2CMCS register with 0x50. Either configuration places the I2C master peripheral in high-speed mode, and all subsequent transfers (until STOP) are carried out at high-speed data rate using the normal I2CMCS command bits, without setting the HS bit in the I2CMCS register. Again, setting the HS bit in the I2CMCS register is only necessary during the master code byte.
When operating as a high-speed slave, no additional software is required.