Hello.
How can I set I2C baud rate for S32K312 MCU ?
Source clock from AIPS_SLOW, 30 MHz.
I want to set baud rate to 400 Kbps.
How can I set this config page ?
Best Regards,
SEAN SUNG
Solved! Go to Solution.
Hi
Please refer to the Table 424. Timing Parameters of S32K3XXRM. Modify the value of I2c Clock High Period(CLKHI) and I2c Clock Low Period(CLKLO). The I2c Baud Rate will be automatically calculated based on your input value and will be displayed there. But the value you configured now is too small, causing it to exceed the Baud Rate upper limit of LPI2C_FAST_MODE (so it is displayed in red). Please also note: Table 426. LPI2C Timing Parameter Restrictions
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi
Please refer to the Table 424. Timing Parameters of S32K3XXRM. Modify the value of I2c Clock High Period(CLKHI) and I2c Clock Low Period(CLKLO). The I2c Baud Rate will be automatically calculated based on your input value and will be displayed there. But the value you configured now is too small, causing it to exceed the Baud Rate upper limit of LPI2C_FAST_MODE (so it is displayed in red). Please also note: Table 426. LPI2C Timing Parameter Restrictions
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Dear Robin.
Thank you for reply.
I set CLKHI=31, CLKLO=42, FILTSCL=1, PRESCALE=2 (DIV4)
My calculated baud rate is 100000 (100K).
But S32DS auto calculated baud rate is 200000(200K).
What is my miss?
Could you check my project(attached), please?
And.. HAPPY NEW YEAR!
Best Regards,
SEAN SUNG
Hi SEAN SUNG,
I think it should be 100K. Maybe the S32 Configuration Tool calculated it wrong. It is recommended to test the actual frequency of SCL. And observe the value of PRESCALE during debug.
HAPPY NEW YEAR!
Best Regards,
Robin