SPRUJF2A March 2026 – March 2026 AM13E23019
Timeout Counter A
An UNICOMM-I2CT can extend the transaction by pulling the SCL line low to slow down communication. Both the UNICOMM-I2CC and UNICOMM-I2CT modules have a counter called TCNTA, which is a 12-bit programmable counter that tracks how long the clock has been held low. The upper 8-bits of the count value are software programmable through the TIMEOUT_CTL register. The value programmed in the TIMEOUT_CTL.TCNTLA register field must be greater than 0x01 to enable the timeout A feature.
The application can program the eight most significant bits of the counter to reflect the acceptable cumulative low period in a transaction. Each count is equal to a timeout period of ((1 + TPR) × 12) I2Cclk's where the TPR is the programmable timer period. TIMEOUT_CNT.TCNTA counts continuously for the entire time SCL is held in a low state. When SCL goes back high, TIMEOUT_CNT.TCNTA is reloaded with the value in the TIMEOUT_CTL.TCNTLA register, and begins counting down from this value at the falling edge of SCL.
The internal I2Cclk keeps running even if SCL is held low on the bus.
The I2C clock low timeout period is calculated as follows:
As an example, if the I2Cclk is configured to 20 MHz and the I2C module is operating at a 100-kHz speed, the TPR would be equal to 19. See Section 24.2.1.1 on how TPR is calculated. One timeout period is equal to (1 / 20 MHz) × ( 1 + 19) × 12 or 12 µs. Programming the TIMEOUT_CTL.TCNTLA register to 0xDA would translate to the value 0xDA0, because the lower 4-bits are set to 0x0. This translates to a decimal value of 3488 clocks or a cumulative clock low period of 3488 × 12 µs, or 41.856 ms at 100 kHz.
The TIMEOUTA bit in the UNICOMM-I2CC RIS register is set when the clock timeout period is reached, allowing the controller to start corrective action to resolve the remote target state. This bit is cleared after I2C goes to idle or during the I2C controller reset. The status of the raw SDA and SCL signals are readable by software through the SDA and SCL bits in the BMON register to help determine the state of the remote target. In the event of a timeout condition, application software must choose how it intends to attempt bus recovery. If a timeout is detected before the end of a transfer (receive or transmit), software needs to flush the FIFOs before initiating the next transfer. This timeout feature is needed for SMBus and PMBus implementation.
A UNICOMM-I2CT module can also trigger an interrupt on a configured clock timeout low condition using the same registers and fields.
Timeout Counter B
Timeout Counter B is only available for Advanced UNICOMM-I2CC and UNICOMM-I2CT instances.
Both the UNICOMM-I2CC and UNICOMM-I2CT modules have a secondary counter called TCNTB, which is a 12-bit programmable counter that tracks how long the clock has been held high. This counter is configured similarly to the TCNTA, where the upper 8-bits of the count value are software programmable through the TIMEOUT_CTL.TCNTLB register. The value programmed in the TIMEOUT_CTL.TCNTLB register field must be greater than 0x01 to enable the timeout B feature. There is an interrupt flag available for the TCNTB counter for UNICOMM I2CC and UNICOMM-I2CT in the event that the clock timeout period is reached, the TIMEOUTB bit in the RIS register is set.