How do you recover after a NAK from I2C_RTOS_Transfer?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do you recover after a NAK from I2C_RTOS_Transfer?

ソリューションへジャンプ
1,031件の閲覧回数
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 件の賞賛
返信
1 解決策
865件の閲覧回数
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

元の投稿で解決策を見る

1 返信
866件の閲覧回数
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