Ethernet Communication Unstable After Integrating TouchGFX on STM32H743 – Suspecting AXI Bus Conflicts
Hello ST Community,
I'm currently developing a project on STM32H743 using TouchGFX 4.25.0 (RGB LTDC interface, framebuffer in external 16MB SDRAM) and LWIP + FreeRTOS (TCP client mode over Ethernet RMII). Everything works fine when TouchGFX is not included. However, after adding TouchGFX to the project, I'm facing strange Ethernet instability.
:magnifying_glass_tilted_left: Observations:
Without TouchGFX:
TCP Client connects to the server reliably.
No reconnection or data loss observed.
Using recv() with flags = 0 works flawlessly for long durations.
With TouchGFX + LTDC + DMA2D:
Frequent TCP reconnections start occurring.
Happens especially when using lwip_select() + recv() mechanism.
If I skip lwip_select() and use direct recv() with flags = 0, reconnections stop, but after some time communication lags or stalls.
:light_bulb: Hypothesis:
I suspect the problem lies in AXI bus contention between:
LTDC/DMA2D accessing external SDRAM (for framebuffer)
Ethernet DMA accessing DTCM/SRAM or other AXI slaves
Possibly QSPI access if active for bitmap cache
I'm considering using AXI PMU (Performance Monitoring Unit) to measure:
Bus latency
AXI master stalls
Transaction overlap
However, documentation on AXI PMU in STM32H7 context is scarce, especially under FreeRTOS + TouchGFX + LwIP.
:question_mark: Questions to Community:
Has anyone faced similar TCP instability or lag after enabling TouchGFX or DMA-heavy peripherals?
Can AXI PMU registers be monitored in runtime to measure bus load/stalls in FreeRTOS?
Any suggestion to prioritize Ethernet DMA transactions on AXI bus?
Can DMA2D or LTDC be throttled or delayed to reduce congestion?
:package: Configuration:
MCU: STM32H743II
TouchGFX: 4.25.0 (LTDC RGB interface)
SDRAM: 16MB at 0xD0000000 (double-buffered framebuffer)
QSPI Flash: For external bitmap assets (W25Q128)
FreeRTOS: Default settings (preemptive)
Ethernet: LwIP TCP Client using RAW API
Compiler: STM32CubeIDE + GCC
I'm open to any insights, workaround ideas, or experiences. I’d also be happy to share code structure or bus matrix settings if needed.
Thanks in advance,
Jumman Jhinga
