2026-05-13 5:11 AM - last edited on 2026-05-13 5:37 AM by mƎALLEm
I am working on an STM32F746G-Discovery board using LwIP (2.1.2) and FreeRTOS (CMSIS-RTOS V1) generated via STM32CubeMX. I am facing a persistent issue where the gnetif.ip_addr.addr field is populated with a garbage/static value before DHCP can complete, specifically 0xf44fd102.
The Issue: Even after performing a memset(&gnetif, 0, sizeof(struct netif)) before MX_LWIP_Init(), the debugger consistently reports the following for the IP address variable:
Hex: 0xf44fd102
Decimal: -196095742
Translated IP: 244.79.209.2 (Multicast)
It appears the Ethernet DMA is writing multicast network traffic into the memory space allocated for gnetif, or I am facing a D-Cache coherency issue where the CPU is reading "stale" data from a previous boot/session.
Current Configuration:
CPU: STM32F746NGH6 (Cortex-M7)
Cache: I-Cache and D-Cache enabled in main.c.
PHY: LAN8742A (RMII mode).
Clock: 216MHz (HSE used as source).
MPU: I have attempted to configure the MPU to set the SRAM1 region (0x20010000) as Non-Cacheable (TEX=1, C=0, B=0), but the value 0xf44fd102 persists.
My Questions:
Why is the gnetif structure being initialized or overwritten with 0xf44fd102 (Multicast) specifically?
On the STM32F7 Discovery, what is the exact MPU region configuration required to ensure the LwIP descriptors and the netif structure remain coherent with the DMA?
Could this indicate a linker script issue where LwIP buffers are overlapping with the .bss or .data sections used for global variables?
Any guidance on resolving this "Ghost IP" issue on the M7 core would be greatly appreciated. or any link from where i can implement all thing from start or Zero.
2026-05-13 5:37 AM - edited 2026-05-13 5:37 AM
Hello @Manoj1985Ku and welcome to the ST community,
I invite you to refer to this knowledge base article: Implementing a LwIP and FreeRTOS™ v1 UDP echo server on the STM32F7 series