iMX7D Cortex-M4 I2C isn't working properly

Hello,

I’m having problems developing I2C for IMX7D Cortex-M4 using FreeRTOS. I started from the example provided by Toradex, available at:

I needed to make some changes to the original code because my i2c is on an alternate pin (ALT4 option).

The problem is:
When I execute a write command (I2C_XFER_Write), the program work properly and I can view the i2c signals on osciloscope. But, when I execute a read command (I2C_XFER_Read), I can’t see any signal on osciloscope (neither SCL or SDA) and no i2c interruption is generated on M4.

Is this a known issue?

Regards, Tolentino

Colibri iMX7D 512MB V1.1D

Hi @jvtolentin0 ,

Can you please share with us the changes to the code?

Also, did you remove these pins from the kernel device tree to prevent pins conflict?

Best regards,
Daniel Morais

Hi @daniel_m.tx !

The i2c pins were being reset by Linux. I removed the pins on linux devicetree and everything worked fine.

Thanks!

Best regards,
João Tolentino