Skip to main content
This topic has been closed for replies.
Piranha
PiranhaBest answer
Principal III
Mar 1, 2021 7:22 PM UTC

Most likely that is because the external MII/RMII clock is not present. Check the pin configuration and actual clock signal presence.

7 replies

Piranha
PiranhaBest answer
Principal III
Mar 1, 2021 7:22 PM UTC

Most likely that is because the external MII/RMII clock is not present. Check the pin configuration and actual clock signal presence.

AChas.1Author
Associate II
Mar 2, 2021 11:57 AM UTC

Yep. This is an Answer. Thank You!

nguen nguyen
Associate III
Apr 7, 2021 11:18 AM UTC

Could you please share your ioc file configuration Ethenet with STM32H733

AChas.1Author
Associate II
Apr 7, 2021 12:01 PM UTC

Problem was solved. See top comment and do not forget change pin speed to height!

nguen nguyen
Associate III
Apr 9, 2021 6:14 AM UTC

Could you see my configuration Ethernet with STM32H733 https://community.st.com/s/question/0D53W00000hOPnPSAW/stm32h733-ethernet-lwip-not-connect 

Thanks

MKing
Associate
Dec 6, 2023 6:26 AM UTC

Here are my solutions form my project (STM32H725IGKx with STM32CubeMX (6.10.0)).

Problem was that I had HAL_ETH_ERROR_TIMEOUT. So the SWR bit (ETH_DMAMR_SWR) was not set to 0:

  /* Ethernet Software reset */

  /* Set the SWR bit: resets all MAC subsystem internal registers and logic */

  /* After reset all the registers holds their respective reset values */

  SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR);

 

  /* Get tick */

  tickstart = HAL_GetTick();

 

  /* Wait for software reset */

  while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U)

  {

    if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT))

    {

      /* Set Error Code */

      heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT;

      /* Set State as Error */

      heth->gState = HAL_ETH_STATE_ERROR;

      /* Return Error */

      return HAL_ERROR;

    }

  }

 

MKing_0-1701843761225.png

 

 

  1. There is a problem in Cube: The preset pin for ETH_RX_CLK is PA1_C. In the manule you will find that you need pin PA1 for ETH_RX_CLK! So you need to change register value that PA1_C is linked internally to PA1. I do it before HAL_ETH_Init:

SYSCFG->PMCR &= ~SYSCFG_PMCR_PA1SO_Msk;

  /* USER CODE END MACADDRESS */

 

  if (HAL_ETH_Init(&heth) != HAL_OK)

  {

    Error_Handler();

  }

 

I didn’t found a possibility to change it in the STM32CubeMX (6.10.0)

MKing_1-1701843761235.png

 

  1. Check that PHY is not in reset. So check the RESET pin.
  2. Check that both clock signals are available from PHY (TX_CLK & RX_CLK)