Hi
I want to set the baud rate of i2c to 400KHz and use the tree parameter in S32DS MCAL I2c_1 ex: picture1(the red line) is 52083. The baud rate is 52.5kHz on the board (Picture2) with setting the parameter is (2,5,5) same with sample code, but when I modify the tree parameter(blue line) like picture3, it shows the baud rate is 378787HZ but on the board is 37.8kHz in Picture 4.
The i2c Module Clock Frequency in the Picture1 is 133333333Hz
How can I adjust the baud rate between 100 and 400Khz?
chip: S32G274A
Use S32 RTD AUTOSAR 4.4 3.0.2 HF01 D2204
I2c_lp_Transfer_S32G274A_M7 Example
1.
2.
3.
4.
Hi eason08253426,
Perhaps, the internal pull-up resistor value = 2k2Ω is affected to the baud rate in the second situation.
In the second situation, Could you try to re-test using the resistor value = 200Ω or 10KΩ pull-up VDD for both SDA and SCL?
Best regards,
Dan
Hi eason08253426,
About the formula calculate baudrate, you can view this file:
C:\NXP\S32DS.3.4\eclipse\mcu_data\components\PlatformSDK_S32XX_2022_03\I2c\I2c_Ip_PBcfg.c
Best regards,
Dan