20.5.1.2 Setting Baud Rate When Operating as a Bus Host

When operating as an I2C host, the module must generate the system SCLx clock. Generally, the I2C system clocks are specified to be either 100 kHz, 400 kHz or 1 MHz. The system clock rate is specified as the minimum SCLx low time (I2CxLBRG), plus the minimum SCLx high time (I2CxHBRG). In most cases, that is defined by two BRG periods (TBRG).

The reload value for the BRG is the I2CxHBRG/I2CxLBRG register, as illustrated in Figure 20-5. When the BRG is loaded with this value, the generator counts down to zero and stops until another reload has taken place. The BRG is reloaded automatically on baud rate Restart. For example, if clock synchronization is taking place, the BRG will be reloaded when the SCLx pin is sampled high.

Note: The I2CxHBRG/I2CxLBRG register values that are less than four are not supported.
Figure 20-5. Baud Rate Generator Block Diagram

Equation 20-1 shows the formula for computing the BRG reload value.

Equation 20-1. BRG Reload Value Calculation

Where:

Typical value of delay is 200 ns.

Note: Equation 20-1 is only for a design guideline. Due to system-dependent parameters, the actual baud rate may differ slightly. Testing is required to confirm that the actual baud rate meets the system requirements; otherwise, the value of the I2CxHBRG/I2CxLBRG register has to be adjusted.
Table 20-19. I2C Clock Rates
FPBFSCLI2CxLBRG/I2CxHBRG (Decimal)
200 MHz1 MHz 57
200 MHz400 kHz207
200 MHz100 kHz957
100 MHz1 MHz 27
100 MHz400 kHz102
100 MHz100 kHz477
50 MHz1 MHz 12
50 MHz400 kHz50
50 MHz100 kHz237
16 MHz1 MHz
16 MHz400 kHz13
16 MHz100 kHz73
8 MHz1 MHz
8 MHz400 kHz5
8 MHz100 kHz35