I2C baudrate issue - S32K344 MCU

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

I2C baudrate issue - S32K344 MCU

Jump to solution
1,252 Views
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 Kudos
Reply
1 Solution
1,192 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
1,227 Views
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 Kudos
Reply
1,204 Views
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 Kudos
Reply
1,193 Views
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 Kudos
Reply