SPRUJ17H March 2022 – October 2024 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
The I2C module is operated by the module clock. This clock is generated by way of the I2C prescaler block. The prescaler block consists of a 8-bit register, ICPSC, used for dividing down the device peripheral clock (VBUS_CLK) to obtain a module clock between 6.7 MHz and 13.3 MHz.
As shown in Figure 7-323, the I2C module uses the input clock generated from the device clock generator to generate the module clock and controller clock. The I2C input clock is the device peripheral clock (VBUS_CLK). The clock is then divided twice more inside the I2C module to produce the module clock and the controller clock.
The module clock determines the frequency at which the I2C module operates. A programmable prescaler in the I2C module divides down the input clock to produce the module clock. To specify the divide-down value, initialize the IPSC7_IPSC0 bit field of the prescaler register, ICPSC. The resulting frequency is:
The module clock frequency must be between 6.7MHz and 13.3MHz. The prescaler can only be initialized while the I2C module is in the reset state (IRS = 0 in ICMDR). The prescaled frequency takes effect only when IRS is changed to 1. Changing the ICPSC value while IRS = 1 has no effect.
The controller clock appears on the SCL pin when the I2C module is configured to be a controller on the I2C bus. This clock controls the timing of the communication between the I2C module and a peripheral. As shown in Figure 13-19, a second clock divider in the I2C module divides down the module clock to produce the controller clock. The clock divider uses the ICCLKL to divide down the low portion of the module clock signal and uses the ICCLKH to divide down the high portion of the module clock signal.
The resulting frequency is:
where d depends on the value of ICPSC:
ICPSC | d |
---|---|
0 | 7 |
1 | 6 |
Greater than 1 | 5 |
The controller clock frequency defined above does not include rise/fall time and latency of the synchronizer inside the module. The actual transfer rate is slower than the value calculated from the formula above. Also, due to the nature of SCL synchronization, the SCL clock period can change if SCL synchronization is taking place.