While running the S32K1 I2c_HLD_Example from RTD 1.0.1, I noticed the line:
while(((status = I2c_GetStatus(0U)) == I2C_CH_SEND) && (timeout > 0))
always times out even though it sends the data. When I remove the timeout, the routine waits forever because the I2c_GetStatus() always returns I2C_CH_SEND.
The slave buffer is getting filled.
How can I change the example so the status will change to I2C_CH_FINISHED after the transmission is complete?
解決済! 解決策の投稿を見る。
Hi hns80,
description.txt of I2c_HLD_Example_S32K118 shows that this example is developed on S32K118EVB2-Q048 PCB 47530 RevX1 SCH RevA1 for S32K118. Due to the difference between S32K118EVB2-Q048 and S32K118EVB, so you need to notice the I2C pins if you are using S32K118EVB.
If you are using S32K118EVB, then the connections of I2C pins should be:
SDA: J1.1 - J2.9 (PTA2 - PTA1)
SCL: J1.3 - J2.10 (PTA3 - PTA0)
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 hns80,
description.txt of I2c_HLD_Example_S32K118 shows that this example is developed on S32K118EVB2-Q048 PCB 47530 RevX1 SCH RevA1 for S32K118. Due to the difference between S32K118EVB2-Q048 and S32K118EVB, so you need to notice the I2C pins if you are using S32K118EVB.
If you are using S32K118EVB, then the connections of I2C pins should be:
SDA: J1.1 - J2.9 (PTA2 - PTA1)
SCL: J1.3 - J2.10 (PTA3 - PTA0)
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.
-------------------------------------------------------------------------------