cancel
Showing results for 
Search instead for 
Did you mean: 

I2C does not work when FMC is turned on

OKose.1
Associate

Hi,

I am using STM32H743II microcontroller. In which  communicating with external SRAM with FMC. It is working fine.

I need to communicate with the touch LCD IC via I2C. There is no problem in communication when FMC is not active. I am reading the touch coordinates properly. However, when FMC is active, none of the I2C ports on the stm32 work. I tried all I2C1-I2C4 ports one by one. I set the I2C pins not used by FMC. When I scan HAL_I2C_IsDeviceReady, the I2C address of the integrated circuit does not appear. I cannot communicate with the IC. Why does I2C not work with FMC?

3 REPLIES 3
Uwe Bonnes
Principal II

Is there a collision between the default I2C and FMC pins? Did you remap the I2C pins?

Yes, I configured I2C on pins not used by FMC. I tried I2C1 (PB8, PB9) and I2C4(PD13, PD12) which are not used by FMC.

TDK
Guru

There's no reason FMC and I2C can't work together, so the issue is likely within your code.

With FMC active, set the I2C pins as GPIO output and toggle them to verify they are connected correctly. Put a logic analyzer or scope on the line and look at the communication during a HAL_I2C_IsDeviceReady call.

If you feel a post has answered your question, please click "Accept as Solution".