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?
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
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
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