Hello everyone,
I would like to know why in the LPI2C example code (I2c_IP_LPI2C_Transfer_S32K344) the baudrate configuration is this:
Note: I'm using S32K3 RTD AUTOSAR 4.4 2.0.1 D2207.
But the result is:
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
Solved! Go to Solution.
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
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:
Chapter 71.6 (Application information) also proves useful for example timing configurations:
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
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:
This formula match with the final result. Which formula should I use? I used this file: UM34I2CASR4.4 Rev0000R2.0.0 Rev. 1.0
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