2024-10-07 07:10 AM
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
Solved! Go to Solution.
2024-10-09 07:53 AM
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
2024-10-07 07:21 AM - edited 2024-10-07 07:26 AM
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
- ...
2024-10-07 07:33 AM
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:
2024-10-07 09:08 AM
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.
2024-10-07 10:02 PM
Get a Nucleo H723, it's a "simple" (ha!) single core H7 with ethernet and PHY on the board.
2024-10-07 10:34 PM
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
2024-10-07 10:37 PM
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
2024-10-07 10:38 PM
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
2024-10-07 10:47 PM
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?
2024-10-07 10:57 PM
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);" ?