cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a custom Ethernet PHY in STM32CubeMX/STM32CubeIDE with NetX Duo?

shreyas15
Associate

Hello,

I am using STM32CubeIDE/CubeMX with Azure RTOS NetX Duo on a custom board and need to integrate a custom Ethernet PHY that is not one of the PHYs natively supported by CubeMX. I need to add MXL86110I-AQB-R eth phy.

I would like to understand the recommended procedure for adding a custom PHY when using NetX Duo.

My questions are:

  • How should a custom Ethernet PHY be integrated with NetX Duo in STM32CubeMX?
  • What CubeMX configurations are required for a custom PHY?
  • Are there any example projects demonstrating the integration of a custom PHY with NetX Duo?

 

 

2 REPLIES 2
FBL
ST Employee

Hi @shreyas15 

Interesting, this could be a good topic for a KB article.

Ethernet PHY should be integrated at the PHY driver layer, not dependent on NetXDuo itself. 

I assume the recommended approach is to keep the CubeMX generated Ethernet MAC/DMA and NetXDuo setup, and implement the PHY specific functions required by the STM32 Ethernet driver abstraction. You can refer to the drivers provided here.

For an unsupported PHY such as MXL86110I-AQB-R, you should:

  • implement the PHY init and MDIO access functions
  • handle PHY reset, auto-negotiation, and link detection
  • map the negotiated speed/duplex to the standard STM32 PHY status values
  • let the Ethernet driver configure the MAC accordingly

In CubeMX, only the Ethernet peripheral, RMII/MII interface, NetXDuo middleware, and the required clocks/interrupts need to be configured.

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.




Best regards,
FBL
Pavel A.
Super User

I need to add MXL86110I-AQB-R eth phy.

STM32N6 has 100 Mbp/s MAC, so what is the point of adding a GB PHY to it? Check the data sheet of the PHY for details how to connect it to 100 Mbp/s MII or RMII.