cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP133C Ethernet/PHY issue

Aerokii
Associate

Hello! I'm working on bringing up a bare-metal STM32MP133C bare-metal on the dev kit from DIGI, using the HAL layer from ST. The problem I'm running in to is we're getting stuck on HAL_ETH_Init as when we enable the MAC clock, DMAMR's 0 bit (the reset bit) is stuck at 1, causing a timeout. 

 

From reading the reference manual, all related clocks need to be enabled for the reset to work, so I'm operating under the assumption there's a clock issue. I've initialized/configured the peripheral clock for PLL4, I'm enabling the relevant GPIO clocks, along with the ethernet clocks ETH1CK, ETH1TX, ETH1RX, and ETH1MAC. This leads me to believe the issue may be with the PHY clock. As we're using the Marvell PHY that comes with the board, I've (attempted) to set it so the PHY uses PLL4 by changing the appropriate bits in syscfg's PMCSETR. 

 

I figured that would be enough to get it all going... but it still seems I'm missing something. I've tried generating the code from CubeMX to see if it was a GPIO issue with no luck. I've attached the (very rough) file I'm working out of at present.

 

Thanks in advance for any support provided!

1 REPLY 1
Pwxn
ST Employee

Hello,

 

Could you give me the version of CubeMX you're using? A similar issue where ETH_DMAMR_SWR stay up during the Init function was fixed with the 6.16 release.

You can applied a Work Around to your current version of CubeMX by replacing __HAL_RCC_ETHxMAC_CLK_ENABLE() (x={1,2}) by __HAL_RCC_ETHxCK_CLK_ENABLE() on line 423 and 505 of stm32mp13xx_hal_msp.c

 

Please use latest version of CubeMX if it's not the case. 

 

Regards