cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly set up ETH on STM32H753 series MCU connected by RMII?

VaZso
Associate III

Dear Members,

I have an own board with STM32H753ZIT as MCU and I am trying to get ETH working.

Unfortunately, I have a DP83848 PHY on this board which worked perfectly well using an STM32F407VIT earlier (DP83848 is intact in the schematic but connected to the new MCU representative PINs).

However, in the current firmware of STM32H7, the PHY handling code is completely rewritten and it relies on some of the special features of LAN8742A.

At my side, I have modified the code to be able to use it with my DP83848, so it finds PHY address, senses cable connection / reconnection, speed, half/full duplex mode, etc... so at management side it should be okay.

(Anyway, ST would have been written the code to be a bit more flexible to use PHY other than LAN8742 which is not very well solderable by hand.)

ETH LEDs are also working as they should - one is lights up on cable connection and the other lights up when data arrives from the network.

On connecting a LAN cable, LWIP starts sending DHCP requests (and calls low_level_output function in ethernetif.c), but HAL_ETH_IsRxDataAvailable in low_level_input function is never true and nothing arrives.

I have looked at appropriate PINs using an oscilloscope and I can not see any communications at TXD0 and TXD1, not even at TX_EN, so MCU does not send anything to PHY on these lines.

At RXD0 and RXD1, I can see communication, so PHY sends packages coming from the network towards MCU.

PHY is connected by RMII interface using the same schematic at DP83848 side what I used together with STM32F4 series MCU with a 50 MHz active crystal (which is also working).

So it seems there are some configuration issues which lead to communication failure at MCU side.

Code was generated by STM32CubeMX and compiled using GCC from AC6 System Workbench on Linux. These systems are up-to-date.

So, does STM32H7 really has working ETH solution using RMII interface generated by STM32CubeMX or may have some issues at HAL side?

Also, I don't really understand what the following notice means in STM32CubeMX:

"The ETH can work only when RAM is pointing at 0x24000000"

I have set "First RX / TX Descriptor Address" and "RX Buffers Address" in this range, but I don't really see what I should set in order to have a right configuration.

What is this notice really mean and what should I do to get Ethernet working on this chip?

Does anyone have any suggestions?

Thank you your help in advance.

13 REPLIES 13
VaZso
Associate III

sorry, double post

VaZso
Associate III

You're welcome.

Anyway, I wrote about cache problem above (in May).

Glad you got it working.

akaya
Associate II

hi @VaZso​ ethernet communication does not work. please you help me. If Stm32h7 ethernet communication work with dp83848. you send the project of files.

nguen nguyen
Associate II

Can anyone send example project ? thanks so much Cubemx 5.4