Help with Ethernet on STM32 H723ZG
Hi all!
I have been using a F446RE board to communicate with an encoder using SPI. I get back a 16-bit value every ms (the process runs at 1kHz). However, I now need to transfer the acquired data over ethernet (it has to be ethernet, not UART or another communication, as it goes through a switch) to a computer in packages ~once per second. I bought an H723ZG board because it comes with a ethernet port, but I have been having a lot of trouble setting up ethernet, as I have had very little prior experience with it.
I have researched more into how ethernet works, and tried the following things:
1. I followed this tutorial, with the difference that I changed "RMII_TX_EN" to PG11 and "RMII_TXD0" to PG13 as per the schematic for my board. I set up my CPU, ETH:First Rx/Tx Descriptor Addresses, and LWIP:Ram Heap Pointer as per the video (respectively, 0x30000000, 0x30000080, 0x30002000 for rx/tx/lwip ram heap). The code compiles and when I debug there is no hard fault, but I am unable to ping the device. I have my mac set to 192.168.000.030 and the device to 192.168.000.123 with subnet mask 255.255.255.000 and gateway address 192.168.000.001
2. I tried using the STM32 H723ZG example projects "LWIP_UDP_Echo" and "LWIP_TCP_Echo". When I turned off DHCP in lwipopts.h and set my mac to ip 192.168.000.030 and subnet 255.255.255.000 I was able to ping the microcontroller successfully, but I could not get it to echo using the command echo -n "Testing LwIP UDP echo server" | nc -u 192.168.0.10 7
I also spent a lot of time scrolling this community/stackoverflow/reddit, where a lot of people suggested giving up on LWIP and CubeMX and instead just using FreeRTOS + TCP. I am not very familiar with FreeRTOS although I understand the principles, and I have not coded an STM32 microcontroller using anything other than CubeMX or PlatformIO (Arduino). Furthermore, my code for communicating with the encoder/collecting data was written in CubeMX so I am hesitant to try and port it.
I am starting to get really confused and don't know what to do next, so I thought I'd make my own (first time!) post. I am really hoping someone could point me in the right direction:
1. For my (relatively simple) purpose, would you recommend continuing with LWIP/CubeMX or abandoning it and trying to use FreeRTOS.
2. If FreeRTOS is the solution, can this be easily implemented with CubeMX or do I have to use another software?
3. If continuing with LWIP/CubeMX is the solution, can someone point me towards what I might be doing wrong? I have uploaded screenshots of all the relevant configurations/code I used following the tutorial I linked.
4. Am I using the right board? I have heard lots of people complain about H7. Would my task be easier to accomplish on an F7?
Thank you all immensely for your help in advance!








