Skip to main content
AJose.2
Associate
May 2, 2022
Question

STM32H753 Ethernet DMAMR register fails to reset when SWR bit is set

  • May 2, 2022
  • 4 replies
  • 2927 views

While setting up Ethernet connectivity on STM32H753, the HAL layer exited with HAL error during initialization. I found out that the SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR); fails to reset the register and the initialization exits with HAL error on timeout. I am using DP83848 as Ethernet PHY. I was able to verify that the link state is 100-Mbps Full Duplex and 25MHz clock is available as TX_CLK and RX_CLK. The PHY is used in MII mode.

4 replies

Piranha
Principal III
May 2, 2022

It the clocks are physically present on the respective MCU pins, then check the GPIO configuration for MII pins, MII/RMII configuration for the MAC and simple things like whether all 3 of the ETH MAC related clocks are enabled in RCC.

Pavel A.
Super User
May 3, 2022

@AJose.2​ Is the ETH driver the latest ST "reworked" version (HAL 1.10) or "pre-reworked", or anything custom?

If not the latest, could it be this issue?

Also, see this thread.

Piranha
Principal III
May 3, 2022

Good point, but, as MII is the reset value and doesn't change anyway, it should not matter in this particular case.

Piranha
Principal III
May 6, 2022

On H7 only the latest version included in a CubeH7 v1.10 package is somewhat working. Previous versions, especially such an ancient one, are almost hopeless. Although the SWR bit depends on a simple things mentioned in previous comments and the issue should be simple.

Graduate
October 30, 2024

I found something when calling the SET_BIT function twice:
https://community.st.com/t5/stm32-mcus-embedded-software/stmh7-eth-dmamr-swr-fails/m-p/737333/highlight/true#M56484
 Maybe this will help you :)