Clock Generation (Standard Mode, Fast Mode, and Fast Mode Plus)
In I2C, Sm, Fm, and Fm+ modes, the Host clock (SCL) frequency is determined as follows.
The low (TLOW) and high (THIGH) times are determined by the Baud Rate (BAUD) register, while the rise (TRISE) and fall (TFALL) times are determined by the bus topology. Because of the wired AND logic of the bus, TFALL is considered part of TLOW. Likewise, TRISE remains in a transitional state between TLOW and THIGH until a high state is detected.
0, from the Host Baud Rate bit group in the Baud Rate
register (BAUD.BAUD).- TLOW—Low period of the SCL clock
- TSU;STO —Setup time for the Stop condition
- TBUF—Bus free time between Stop and Start conditions
- THD;STA—Hold time for (repeated) Start condition
- TSU;STA—Setup time for repeated Start condition
- THIGH is sdtimed using the SCL high time count from BAUD.BAUD
- TRISE is determined by the bus impedance. For internal pull-ups, refer to the Electrical Characteristics chapter.
- TFALL is determined by the open-drain current limit and bus impedance and can typically be regarded as zero. Refer to the Electrical Characteristics chapter for details.
The SCL frequency is given by:
When BAUD.BAUDLOW is zero, the BAUD.BAUD value is used to time both the SCL high and SCL low durations. In this case, the following formula gives the SCL frequency:
When BAUD.BAUDLOW is non-zero, the following formula determines the SCL frequency:
The following formulas determine the SCL TLOW and THIGH times:
To configure the SCL clock, first increase the BAUDLOW value until the measured SCL low time meets the minimum requirement for the selected speed mode. Then increase the BAUD value until the desired SCL frequency is reached. When BAUDLOW is zero, adjust BAUD to satisfy both the minimum SCL low time and the desired SCL frequency. Because delays introduced by the bus driver can reduce the measured SCL low time, verify the SCL timing in the target application and allow sufficient margin.
