Hello,

I am confused about I2C baud rate setting.

According to the** Table 44-11I2C divider and hold values** of datasheet, and the formula: **divider = F40 / bit rate = 40MHz / bit rate**

I have calculated some baud rate:

1) IBFD.B.IBC = 0x96, divider = 416, then the bit rate should be 40M/416 = 96kHz

but I got the scope like followings, the actual bit rate = 59.3kHz

2) IBFD.B.IBC = 0x20, divider = 160, then the bit rate should be 40M/160 = 250kHz

but I got the scope like followings, the actual bit rate = 102.1kHz

3) IBFD.B.IBC = 0x16, divider = 104, then the bit rate should be 40M/104 = 385kHz

but I got the scope like followings, the actual bit rate = 108.1kHz

And when I use different MCU, the same IBFD.B.IBC value will also cause different bit rate.

So, is the F40 value in the formula (**divider = F40 / bit rate = 40MHz / bit rate**) different? Then it causes this problem. Where can I find the correct F40 values?

Thanks a lot.

HONG Yang

2016.8.15

Hi,

calculation is correct but the clock is stretched due to weak pull-up. Try to use stronger pull-up resistors on both SCL and SDA lines, for example e.g. 2kOhm.

BR, Petr