I2C time frequency configure

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

I2C time frequency configure

1,982 Views
huqiang
Contributor IV

Hi everybody!

When configing the I2C module in MPC5748G, there is something puzzle me about the frequency of the SCL for I2C bus. For example, IBFD=0x20

152854_152854.pngpastedImage_1.png

what's the unit of the number 160, 17, 78, 81? stands for how long time?

What should I do if I want to have a 400KHz I2C bus?

 

152853_152853.pngpastedImage_0.png

Labels (1)
Tags (3)
2 Replies

1,510 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The I2C module is clocked from F40 clock group (max 40MHz). The IBFD[IBC] field is used to divide this module clock to give desired bit rate.

If you  want for example 100kHz I2C bus then simply calculate divider as

divider = F40 / bit rate = 40MHz / 100kHz = 400.

Now from Table 44-11 find closest SCL divider and use respective IBC value.

So you can select SCL divider = 416 and IBFD = 0x96.

The SCL Divider, SDA Hold and SCL Hold (start/stop) values represent time duration in number of module clock.

For 400kHz I2C bus, assuming max 40MHz module clock, you get divider = 100, then select IBFD = 0x16.

BR, Petr

1,510 Views
huqiang
Contributor IV

Hi, Petr

         Thank you very much for your help! I will do it later.

Best Regards,

Qiang

0 Kudos
Reply