2025-12-09 2:07 AM - last edited on 2025-12-09 2:20 AM by Andrew Neil
Hello everyone,
I am working with the STM32F746G-Discovery board and trying to send ADC sensor data to a cloud server over Ethernet using LwIP (RMII mode). The goal is to send a JSON payload via HTTP POST.
Enabled Ethernet (RMII) in CubeMX
Enabled LwIP (static IP)
Enabled ADC1 and UART6 for debugging
Generated code using AC6/GCC
Added JSON formatting + http_post() call
The system crashes right after:
MX_LWIP_Init();
netif_set_up(&gnetif);A HardFault occurs before DHCP/static IP becomes active.
The compiler/linker shows errors such as:
DMARxDscrTab memory out of range
aggregate value used where integer expected
The descriptors are currently placed like this:
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection")));
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection")));I suspect the MPU configuration, alignment, or linker script memory section is incorrect for STM32F746 (DCache enabled MCU).
I am unsure whether my .ioc settings are correct, specifically:
Ethernet clock configuration
Required RMII pins on F746G-DISCO
Proper static IP settings in LwIP
Key parameters in lwipopts.h
Whether mbedTLS is required for HTTPS POST
Whether an official ST example exists for F746 + LwIP + HTTP/HTTPS client
I would appreciate help with:
✔ Correct CubeMX .ioc configuration for STM32F746 + RMII + LwIP
✔ Correct linker script placement for Ethernet DMA descriptors
✔ Working example project (preferably for F746G-Discovery)
✔ Any documentation on debugging HardFaults in LwIP init
Send ADC value as JSON to a cloud server:
{
"adc_value": 1024,
"device": "stm32f746"
}Any guidance, examples, or recommended configurations are greatly appreciated.
Thank you
2025-12-09 2:18 AM
Debugging Cortex-M (including STM32) Hard Faults.
LwIP debug & diagnostic options.