Configure Ethernet Options in STM32CubeMX for STM32 Processor Based Boards
You must configure the Ethernet options in STM32CubeMX project for STM32H7xx(single-core), STM32F7xx, and STM32F4xx-based boards whenever you use TCP/UDP/MQTT blocks in your model.
If your new to STM32CubeMX tool, see https://www.st.com/en/development-tools/stm32cubemx.html
Prerequisite
Complete the following tutorials:
Configure STM32H7xx Based Boards
Click Launch to open the selected STM32CubeMX project in STM32CubeMX tool.
In the STM32CubeMX tool, you can configure the peripherals for the selected STM32 processors.
In the STM32CubeMX tool, go to System Core > CORTEX_M7 > Parameter Settings > Cortex Interface settings and set the CPU ICache and CPU DCache to
Enabled
.Go to Connectivity > ETH > Mode and select the Mode as
RMII
.Navigate to Configurations > NVIC Settings and enable the parameters Ethernet global interrupt and Ethernet wake-up interrupt through EXTI line 86.
Go to ETH > Parameters Settings > Ethernet Configuration and ensure that the Rx Buffers Address is set to
0x30040200
.Note
For STM32H723xx ,STM32H735xx STM32H725xx,STM32H733xx, and STM32H730xx based boards, ensure that the Rx Buffers Address is set to
0x30000200
.Go to Middleware > LWIP > Mode and enable the Mode.
In the Platform settings, set the Found solutions to
LAN8742
.Go to File and Click Save Project.
Configure STM32F7xx/STM32xx Based Boards
Click Launch to open the selected STM32CubeMX project in STM32CubeMX tool.
Note
You can configure Ethernet options for STM32F4xx Based Boards similar to that of STM32F7xx Based Boards.
Go to Connectivity > ETH > Mode and select the Mode as
RMII
.Navigate to Configurations > NVIC Settings and enable the parameter Ethernet global interrupt.
Go to Middleware > LWIP > Mode and enable the Mode.
Go to File and Click Save Project.
See Also
Configure STM32 Processor-Based Boards using STM32CubeMX with Simulink | TCP Receive | TCP Send | UDP Receive | UDP Send | Ethernet