AnsweredAssumed Answered

LPC1778 ethernet MAC reset Issue

Question asked by ASHISH G on Mar 22, 2018
Latest reply on Apr 17, 2018 by jeremyzhou

Hello LPC,

 

 

I am trying to imitate RESET in Ethernet MAC but it is hanging in some condition.

 

................start Ethernet reset......................................................................

 

Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_ENET); ENABLE CLOCK PERIPHERAL  WORKS FINE PCONP 

 

for (i = 0; i < 10000; i++) {}
GpioSet(ENET_RST_EN_OUTPUT); RESET PHY ETHERNET WORKS FINE
for (i = 0; i < 10000; i++) {}
GpioClear(ENET_RST_EN_OUTPUT); RESET PHY ETHERNET WORKS FINE
for (i = 0; i < 10000; i++) {}

 

GpioSet(ENET_CLK_EN_OUTPUT); ENABLE CLOCK FOR PHY ETHERNETWORKS FINE
for (i = 0; i < 1000; i++) {}

 

 LPC_EMAC->MAC.MAC1 = ENET_MAC1_RESETTX | ENET_MAC1_RESETMCSTX | ENET_MAC1_RESETRX |  ENET_MAC1_RESETMCSRX | ENET_MAC1_SIMRESET | ENET_MAC1_SOFTRESET; WORKS FINE

 

LPC_EMAC->CONTROL.COMMAND |= ENET_COMMAND_REGRESET; WORKS FINE

 

LPC_EMAC->MAC.MAC1 |= ENET_MAC1_PARF;           HANGS HERE ??????

 

I Have checked the ENET_REF_CLK on scope, The value it is showing as 50 MHZ as i am using RMII.

I guess it is correct. 

 

 

Regards,

Ashish

Outcomes