I2C reset on iMX8X Cortex-M4

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

I2C reset on iMX8X Cortex-M4

859 Views
amulbrook
Contributor I

I'm looking at using an MIMX8MQ6 based solution where the Cortex-M4 core would be watching some hardware I2C peripherals and responding in real-time. This seems to work just fine, but I have run into an issue were occasionally I get stuck in a "I2C busy" deadlock scenario (line held by peripheral).

On other products, the solution has been to generally manually clock the I2C bus to force a reset - but it seems like there's not a solid way to do this with the basic API I'm looking at for FreeRTOS / MCUX SDK stuff. In general, it seems like there's no way to hand over the I2C pins to be controlled by GPIO.

Is there a good way in software to perform a I2C reset / clear busy state / manual clock I2C bus on the M4 core?

0 Kudos
Reply
1 Reply

832 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

I do not have it clear which processor you're using, since in the description you mention i.MX8MQ but in the tittle says i.MX8X which is a different processor, i.MX8MQ uses standard I2C module while the i.MX8X uses LPI2C.

For the i.MX8X, it is indeed a kStatus_LPI2C_PinLowTimeout status return code so it seems that it is possible to add a routine to handle such scenario. You may also take a look to the reference manual section 12.3.2.2.5 Error Conditions.

For the i.MX8MQ, it is available kStatus_I2C_Timeout which is a transfer error timeout, so it could be possible to use it as well.

Best regards,
Aldo.

0 Kudos
Reply