I2C time frequency configure

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I2C time frequency configure

1,932件の閲覧回数
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

ラベル(1)
タグ(3)
2 返答(返信)

1,460件の閲覧回数
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,460件の閲覧回数
huqiang
Contributor IV

Hi, Petr

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

Best Regards,

Qiang

0 件の賞賛
返信