2025-12-08 4:12 AM - last edited on 2025-12-08 4:40 AM by mƎALLEm
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code and a linker script content. Please read this post: How to insert source code.
Hello Community,
I am working on STM32F746G-Discovery and trying to send ADC sensor data to a cloud server using Ethernet.
Cloud API details:
URL: https://iot.hummingbirdtek.com/api/data
Method: POST
Content-Type: application/json
Enabled Ethernet (RMII) in CubeMX
Enabled LwIP, set static IP
Enabled ADC1, UART6 for debug
Generated code (AC6/GCC)
Added code to format JSON and send to cloud using http_post
The crash happens during:
MX_LWIP_Init();
netif_set_up();
2) DMA Descriptor Memory Configuration Errors
Compiler shows errors like:
DMARxDscrTab memory out of range
or
aggregate value used where integer expected
I suspect incorrect MPU/Alignment/Section placement for:
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection")));
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection")));
I am not sure how this should be configured in CubeMX linker settings for STM32F746.
Specifically:
ETH clock settings
RMII pins required
LwIP static IP configuration
Required settings in lwipopts.h
Whether mbedTLS is required for HTTPS POST
If any official ST example project exists for STM32F746 + LwIP + HTTP POST
Can someone please guide me with:
✔ Correct CubeMX IOC configuration steps
✔ Correct linker script placement for ETH DMA descriptors
✔ Any working example project (preferably F746G-DISCO)
✔ Any documents or references for fixing HardFault in LwIP init
Send ADC value as JSON to cloud through Ethernet:
{
"adc_value": 1024,
"device": "stm32f746"
}
Any help, guidance, or example code will be greatly appreciated.
Thank you!