cancel
Showing results for 
Search instead for 
Did you mean: 

HAL MDIO on Nucleo-H7A3ZI-Q

Promise_Conti
Associate II

Hello everyone,

 

I would like to know if the Nucleo-H7A3ZI-Q supports the MDIO to external Ethernet PHY control via SMI (MDC and MDIO). I have the setup connected, and I have programmed it accordingly but the MDC and MDIO Lines are always LOW, not even a hint of toggling or any thing on the PINS when viewed on a logic analyser.

This brings me to my question. Does the Nucleo-H7A3ZI-Q support control on an external PHY.

 

Best regards

1 ACCEPTED SOLUTION

Accepted Solutions
STea
ST Employee

Hello @Promise_Conti ,

MDIOS can't communicate with an external PHY because the PHY will behave as a slave also so no one will initiate the communication.
you need to have a master communicating with MDIOS providing its clock so normally you will not see any traffic on the MDIO /MDC lines as a clock and a command to the address programmed in the slave should be provided.

otherwise MDIO/MDC are quite simple to emulate using normal GPIO if you are constrained to use this product series, or you can switch to a product supporting master MDIO/MDC communication.
please refer to sections 59.3.3 and 59.3.5 of RM.
Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

18 REPLIES 18
LCE
Principal

I don't see any ethernet components (RJ45, transformer, PHY) on this photo:

https://www.st.com/en/evaluation-tools/nucleo-h7a3zi-q.html

Edit: H7A / H7B do NOT have ethernet peripheral!

 

Before that, I wrote:

I don't know.

But to find out:

- check the Nucleo schematics and find the SMI pins

- search the source code for GPIO init of these pins (could be in ../lwip/target/ethernetif.c)

- compare to datasheet / GPIO alternate functions

- ...

SofLit
ST Employee

Hello @Promise_Conti and welcome to the community,

By defaults, Nucleo-H7A3ZI-Q does not have the PHY nor the transformer for the ethernet function.

See the schematics. All the components related to the ETH are not fitted:

SofLit_0-1728311563820.png

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Guillaume K
ST Employee

As LCE wrote, the STM32H7A3 series don't have Ethernet . In particular, no ethernet MAC component.

There is a STM32 peripheral called "MDIOS" ("Management data input/output") that could be used for very basic serial interface, but the Ethernet MAC component is missing in this specific STM32H7 to do real Ethernet communication with an external PHY.

Ethernet MACs are present in other STM32H7s.

LCE
Principal

Get a Nucleo H723, it's a "simple" (ha!) single core H7 with ethernet and PHY on the board.

Hello SofLit,

 

I do not need the onboard Ethernet PHY on the Evaluation board, I only need the SMI (MDC and MDIO) pins, I have an Ethernet PHY on an external board with I would like to communicate with.

 

According to DS the PA2 and PC1 should support this function, but this does not respond and are always LOW

Promise_Conti_0-1728365678200.png

 

Hi Guillaume K,

 

I do not need an onboard PHY, I have a PHY on an external Board which I would like to communicate with.

The STM32H7A3 seems to have the MDIO interface, my problem is that it seems responsive even when called via HAL_MDIO 

Promise_Conti_1-1728365800476.png

 

Hello LCE, 

I have no need for an On-the-Board PHY, I already have an external PHY with I would like to communicate with

Hi LCE,

I do not need the On board PHY or any of the Analogue Front End circuitry, I only need the MDC and MDIO pins (on PC1 and PA2) to communicate with an external PHY on another board.

- check the Nucleo schematics and find the SMI pins

        Response: Pins are on PC1 and PA2

 

- search the source code for GPIO init of these pins (could be in ../lwip/target/ethernetif.c)

       This might be what I am missing. Can you please elaborate more, I have the PINS initilized as  "static void MX_MDIOS_Init(void);". I did not bother with the Ethernet communication since I only need the SMI.

Do I necessarily need to initialize the ETH?

LCE
Principal

Interesting, I never saw the MDIO interface on ICs without ethernet before.

If there's no ETH peripheral, you cannot init it.

But then you probably have to init the MDIO peripheral (it looks like it is an extra peripheral), starting with the clock etcpp.

And init the GPIOs with the MDIO alternate functions (check datasheet), which you probably do in  "static void MX_MDIOS_Init(void);" ?