cancel
Showing results for 
Search instead for 
Did you mean: 

ETH_DMAMR_SWR in STM32H733

AChas.1
Associate II

Hello. Try to start ETH on STM32H733. 

ETH_DMAMR_SWR setted by HAL in HAL_ETH_Init() but do not reset by device during timeout 500ms and even 2000ms. 

The same code run over STM32H723 perfect. 

I am try this https://community.st.com/s/question/0D53W000003xOGUSA2/stmh7-ethdmamrswr-fails but still no work

1 ACCEPTED SOLUTION

Accepted Solutions
Piranha
Chief II

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

View solution in original post

7 REPLIES 7
Piranha
Chief II

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

Yep. This is an Answer. Thank You!

nguen nguyen
Associate II

Could you please share your ioc file configuration Ethenet with STM32H733

AChas.1
Associate II

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

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

Thanks

same issue, my HW haven't correctly set pull-up resistor on lan8742 pins, so REFCLK was not generated.

MKing
Associate III

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)