cancel
Showing results for 
Search instead for 
Did you mean: 

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

AJose.2
Associate II

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.

6 REPLIES 6
Piranha
Chief II

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.
Evangelist III

@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.

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

The HAL version I'm using is V1.2.0. I tried (void)SYSCFG->PMCR; as suggested in https://github.com/STMicroelectronics/STM32CubeH7/issues/121 but didnt work. I also verified the clock configuration in RCC.

Piranha
Chief II

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.

MBeau
Associate

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 :)