Main Content

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

  1. Click Launch to open the selected STM32CubeMX project in STM32CubeMX tool.

  2. In the STM32CubeMX tool, you can configure the peripherals for the selected STM32 processors.

  3. 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.

    Cortex interface

  4. Go to Connectivity > ETH > Mode and select the Mode as RMII.

  5. Navigate to Configurations > NVIC Settings and enable the parameters Ethernet global interrupt and Ethernet wake-up interrupt through EXTI line 86.

    Ethernet global

  6. 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.

    Ethernet configuration

  7. Go to Middleware > LWIP > Mode and enable the Mode.

  8. In the Platform settings, set the Found solutions to LAN8742.

    LWIP LAN

  9. Go to File and Click Save Project.

Configure STM32F7xx/STM32xx Based Boards

  1. 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.

    Launch stm32cubemx

  2. Go to Connectivity > ETH > Mode and select the Mode as RMII.

  3. Navigate to Configurations > NVIC Settings and enable the parameter Ethernet global interrupt.

    Ethernet

  4. Go to Middleware > LWIP > Mode and enable the Mode.

    LWIP

  5. Go to File and Click Save Project.

See Also

| | | | |

Related Topics