Enabling MII (data + mdio config) on LPC54618, fsl_enet

cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling MII (data + mdio config) on LPC54618, fsl_enet

1,124 Views
mircofranchetti
Contributor I

Hi!

I was charged to do a project with NXP LPC54618 that involves TCP/IP communication. They got me an example board with LPC54628 where I found (in the SDK) some lwIP working examples that got rid me from PHY init and other low level init stuff. In the actual project we changed PHY (LAN9303) and I need to understand the correct workflow for configuring at least the internal LPC's MII interface.

I also need to understand how to use fsl_enet (or fsl_phy).

I'm new to nxp microcontrollers/mcuxpresso, so I'm still not familiar with the architecture.

Until now, I've configured the pins (i hope) and searched some LAN PHY drivers. We're not running any RTOS.

Thank you!

Mirco

Labels (1)
0 Kudos
5 Replies

812 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Mirco,

Regarding your question, Because the PHY device is different, you have to rewrite the PHY init function based on the LAN9303 user manual. For detailed inf, pls refer to the section 36.6.26 MAC MDIO address register and section 36.6.27 MAC MDIO data register in the UM10912.

For the PHY initialization in SDK, I think you need to rewrite the status_t PHY_Init(ENET_Type *base, uint32_t phyAddr, uint32_t srcClock_Hz) function.

Hope it can help you

BR

XiangJun Rong

0 Kudos

812 Views
mircofranchetti
Contributor I

Thank you, I will look for PHY specific initialization. The only question remaining is, there is an explanation of all ENET fsl driver? 

Mirco

0 Kudos

812 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

I do not think we have explanation documentation for the lwip driver, because the LWIP is an open driver, maybe you can look for it by google.

BR

Xiangjun Rong

0 Kudos

812 Views
mircofranchetti
Contributor I

I wasn't referring to lwIP, but to "fsl_enet.c/.h", i guess this comes from NXP drivers because it's a driver for the ENET peripheral.

Mirco

0 Kudos

812 Views
PabloBaena
Contributor III

Hi mircofranchetti, xiangjun.rong, I'm working similar project, learned on LCPXpresso 54628 which has a LAN phyceiver with RMII interface. My own board for production has a micrel KSZ8041 phyceiver but with MII interface. I got the MDIO interface working, some phy init commads, but then the ENET of LPC, how should I init it?... I am not getting ping responses.  Any code snippet for init of MII enet is highly appreciated.  Thanks!!!

0 Kudos