2024-03-02 02:03 AM
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?
2024-03-02 02:07 AM
Is there a collision between the default I2C and FMC pins? Did you remap the I2C pins?
2024-03-02 02:11 AM
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.
2024-03-03 04:54 AM
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.