IIC I2c_AsyncTransmit Call Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IIC I2c_AsyncTransmit Call Error

792 Views
qiu
Contributor I

Hello 

I used NXP S32k Chip,and use the I2c_AsyncTransmit function in the task to start a iic communication.

Normally It works ok. But I use a short circuit SDL and SCL to trigger an IIC error , then restore the circuit to normal.The IIC channel status is always SEND,and never comes to Finish,so IIC communication is always error.

I use I2c_SyncTransmit function,and do the same operation, it will recovery.IIC communication will be ok.

0 Kudos
4 Replies

769 Views
nxf78987
NXP Employee
NXP Employee

Hi @qiu,

What is the package's name you are using? (for example: S32K14X_MCAL4_2_RTM_1_0_4)

Best regards,

Dan

0 Kudos

745 Views
qiu
Contributor I

Hi, Dan

S32K14X_MCAL4_2_RTM_HF6_1_0_2

Best regards,

Qiu

0 Kudos

704 Views
nxf78987
NXP Employee
NXP Employee

Hi @qiu,

The I2c_AsyncTransmit method use LPI2C interrupt to transmit data. when an error occur, the driver will disable transmit interrupt bit and perform raise errors. Hence, data can't re-transmit after restore the circuit to normal if you didn't re-call I2c_AsyncTransmit function again. But if you call this function in the ErrorNotification function then will have some errors will occur because LPI2C interrupt called to ErrorNotification function and the I2c_AsyncTransmit function will be raised a new LPI2C interrupt.

So, I created an example for your situation and I tested successful from my side. Please check in the attachment file.

Best regards,

Dan

0 Kudos

558 Views
DELPHI_Eric
Contributor III

master sync sendmaster sync send

a213373a-4b9d-4a3b-8466-42b3ce561957.png

 I2c master sync send error, 100K

  • It can be transmitted normally through oscilloscope observation the slave device address send out OK

  • but no slave device response ACK, so it ran at 
    I2c_aeChannelStatus[s8LogicalChannel] = I2C_CH_ERROR_PRESENT; return NO_OK
    How can I test the master sync send use S32K14x MCAL.
0 Kudos