How do you recover after a NAK from I2C_RTOS_Transfer?

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

How do you recover after a NAK from I2C_RTOS_Transfer?

Jump to solution
776 Views
tfont
Contributor I

I'm using MCUXpresso V10.2.1 and the V2.4.1 SDK for the FRDM-KL27Z.

I can't seem to re-use the I2C handle after getting a kStatus_I2C_Nak when calling I2C_RTOS_Transfer.  Each access after the NAK gives me an kStatus_I2C_ArbitrationLost.  I've tried calling I2C_RTOS_Init again and I've also tried calling I2C_RTOS_Deinit then I2C_RTOS_Init but no matter what, I always get an Arbitration Lost.

Is there some other way to reset the peripheral?  What's the recommended way to recover from a NAK or an Arbitration Loss?

0 Kudos
1 Solution
610 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Anthony,

It seems you have multimaster on i2c bus. I2C_RTOS_Deinit does not clear S.ARBL. You can use I2C_CheckAndClearError(...) to clear it. This function is in fsl_i2c.c.

Regards,

Jing

View solution in original post

1 Reply
611 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Anthony,

It seems you have multimaster on i2c bus. I2C_RTOS_Deinit does not clear S.ARBL. You can use I2C_CheckAndClearError(...) to clear it. This function is in fsl_i2c.c.

Regards,

Jing