Skip to main content
This topic has been closed for replies.
Best answer by Piranha

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

4 replies

PiranhaAnswer
Graduate II
March 1, 2021

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

AChas.1Author
Explorer II
March 2, 2021

Yep. This is an Answer. Thank You!

Visitor II
April 7, 2021

Could you please share your ioc file configuration Ethenet with STM32H733

AChas.1Author
Explorer II
April 7, 2021

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

Visitor II
April 9, 2021

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

Thanks

Graduate II
December 6, 2023

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)