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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,653 次查看
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

标签 (1)
0 项奖励
5 回复数

1,341 次查看
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 项奖励

1,341 次查看
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 项奖励

1,341 次查看
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 项奖励

1,341 次查看
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 项奖励

1,341 次查看
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 项奖励