I2C divider and baud rate questions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C divider and baud rate questions

1,246 Views
yang104hong
Contributor II

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

158452_158452.png100.png

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

158471_158471.png300.png

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

158472_158472.png400.png

 

 

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

Labels (1)
Tags (3)
2 Replies

893 Views
PetrS
NXP TechSupport
NXP TechSupport

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

0 Kudos

893 Views
yang104hong
Contributor II

Hi, Petr

Thank you very much! I've solved the problem according to your advice!

HONG Yang

2016.9.5

0 Kudos