S32K312EVB-Q172 I2C timeout error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K312EVB-Q172 I2C timeout error

438 次查看
tkubincova
NXP Employee
NXP Employee

Hello,

I have a problem with the I2C AUTOSAR driver for S32K312. I have the code working and I am able to communicate with the device.

However, once a timeout error occurs on the bus for any reason, the MCU somehow gets stuck and everytime there is a attempt to send more data over I2C, nothing gets transmitted on the I2C lines, the SCL line remains high while the SDA line remains low. Is there any way to fix this?

Screenshot 2025-03-20 203025.png

Here is a screenshot of a line of code executing a I2C_SynchTransmit - the capture is not triggered because nothing gets transmitted on the lines and it results in a timeout again.

 

I am using S32DS 3.5 with RTD 3.0.0

0 项奖励
回复
1 回复

409 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Tereza,

This is the slave device that holds the SDA line low.

Refer to UM10204 I2C-bus specification and user manual

https://assets.nexperia.com/documents/user-manual/UM10204.pdf

danielmartynek_0-1742544510691.png

 

The RTD I2C driver cannot have such a feature though. This would require the PORT/DIO driver.

 

An example is in AN4803 I2C Non-Blocking Communication

tI2C_fault I2C_Restore(void)

https://www.nxp.com/docs/en/application-note/AN4803.pdf

 

Regards,

Daniel

 

 

0 项奖励
回复