I2C baudrate issue - S32K344 MCU

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

I2C baudrate issue - S32K344 MCU

ソリューションへジャンプ
1,280件の閲覧回数
MVR
Contributor V

Hello everyone,

I would like to know why in the LPI2C example code (I2c_IP_LPI2C_Transfer_S32K344) the baudrate configuration is this:

MVR_0-1724952790109.png

Note: I'm using S32K3 RTD AUTOSAR 4.4 2.0.1 D2207.

But the result is:

MVR_0-1724953195389.png

The frequency is 125KHz, is it correct? Shouldn't it be 208333Hz as the configuration? Can you please provide me the formula to find the baudrate?

The pullup that I'm using in my custom board is 100K, I don't know if it is the reason.

Thank you,

MVR

 

0 件の賞賛
返信
1 解決策
1,220件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @MVR,

The user manual describes the calculation for I2C baud rate in S32 Config Tools. The reference manual defines the SCL period. You can refer to the I2C User Manual for the baud rate parameter instead.

Best regards,
Julián

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,255件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @MVR,

You can find how the timing parameters are calculated from Table 452. from the S32K3xx Reference Manual (Rev. 9), as well as the timing parameter restrictions:

Julin_AragnM_0-1724973589820.png

Chapter 71.6 (Application information) also proves useful for example timing configurations:

Julin_AragnM_1-1724973596419.png

Please keep in mind that actual baud rate depends on the SCL rise time, which does depend on the external pullup resistor values and bus loading. If communication is working, the actual speed should be no issue.

Best regards,
Julián

0 件の賞賛
返信
1,232件の閲覧回数
MVR
Contributor V

Hey @Julián_AragónM ,

I followed this table and it was not matching with the baudrate final on S32DS. I found the user manual and I could see a different formula:

MVR_0-1725021402942.png

This formula match with the final result. Which formula should I use? I used this file: UM34I2CASR4.4 Rev0000R2.0.0 Rev. 1.0

0 件の賞賛
返信
1,221件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @MVR,

The user manual describes the calculation for I2C baud rate in S32 Config Tools. The reference manual defines the SCL period. You can refer to the I2C User Manual for the baud rate parameter instead.

Best regards,
Julián

0 件の賞賛
返信