This guide explains how to implement a LwIP and FreeRTOS™ v1 UDP echo server on the STM32F7 series, focusing on the STM32F767 MCU. Complete steps and detailed instructions are provided in this knowledge base article.
This example is provided for the following MCU and can be tailored for any other F7 series microcontrollers with slight memory address variations:
- STM32CubeIDE v1.18.1
- STM32CubeMX v6.14.1
- Packet generator, for example, Packet Sender
- (Optional) DHCP server, for example, Tftpd32
Compile the code. Using an application or utility like Packet Sender, you can test whether the server is successfully receiving UDP test messages. The board can obtain its IP address in two ways: either dynamically from a DHCP server running on the testing computer or network using, for example, Tftpd32, or through a statically defined IP address. In this example, we format a UDP packet to send to port 7 using the IP address, whether it is assigned by the DHCP server or manually configured.
After this, you should see that the response echoed back by the UDP server running on the board, confirming that the server is functioning correctly and everything is working as intended.
Here are some useful links to assist with development using the LwIP middleware within ST's ecosystem:
- UM1713: Developing applications on STM32Cube with LwIP TCP/IP stack
- LwIP documentation
- GitHub: STMicroelectronics
- UM1974: STM32 Nucleo-144 boards (MB1137)
- RM0410: STM32F76xxx and STM32F77xxx advanced Arm®-based 32-bit MCUs
Please refer to the CONTRIBUTING.MD guide.