STM32Cube  Version 2.0
Create Projects for STM32F2 Series with STM32Cube HAL and STM32CubeMX
 All Files Pages
CMSIS-Driver Ethernet MAC Setup

The CMSIS-Driver EMAC requires:

  • Setup of HCLK to 25MHz or higher
  • Optional setup of SYSCLK to 50MHz or higher, when Ethernet PTP is used
  • Setup of ETH in MII or RMII mode

Valid settings for various evaluation boards are listed in the table below:

Peripheral Resource MCBSTM32F200 STM3220G-EVAL
ETH Mode RMII MII

For different boards, refer to the hardware schematics to reflect correct setup values.

The STM32CubeMX configuration for MCBSTM32F200 with steps for Pinout, Clock, and System Configuration are listed below. Enter the values that are marked bold.

Pinout tab

  1. Configure ETH mode
    • Peripherals ETH: Mode=RMII

Clock Configuration tab

  1. Configure HCLK Clock: HCLK (MHz) = 25 or higher

Configuration tab

  1. Under Connectivity open ETH Configuration:

    • GPIO Settings: review settings, no changes required
      Pin Name Signal on Pin GPIO mode GPIO Pull-up/Pull..Maximum out User Label
      PA1 ETH_REF_CLK Alternate No pull-up and no..High .
      PA2 ETH_MDIO Alternate No pull-up and no..High .
      PA7 ETH_CRS_DV Alternate No pull-up and no..High .
      PC1 ETH_MDC Alternate No pull-up and no..High .
      PC4 ETH_RXD0 Alternate No pull-up and no..High .
      PC5 ETH_RXD1 Alternate No pull-up and no..High .
      PG11 ETH_TX_EN Alternate No pull-up and no..High .
      PG13 ETH_TXD0 Alternate No pull-up and no..High .
      PG14 ETH_TXD1 Alternate No pull-up and no..High .
    • NVIC Settings: enable interrupts
      Interrupt Table Enable Preemption Priority Sub Priority
      Ethernet global interrupt ON 0 0
    • Parameter Settings: not used
    • User Constants: not used

    Click OK to close the ETH Configuration dialog