Content originally posted in LPCWare by Kangurito on Mon Apr 06 08:10:47 MST 2015
Just to share with those who may fact this problem in the future... here's my solution.
When initialising ethernet MAC, the IO lines must be configured properly before turning on the ETH power.
The initialisation sequence with the code I was using was wrong.
Buggy code with incorrect sequence:
/* Set up power for Ethernet module */
CLKPWR_ConfigPPWR (CLKPWR_PCONP_PCENET, ENABLE);
/* Enable P1 Ethernet Pins. */
PINSEL_ConfigPin(1,0,1);
PINSEL_ConfigPin(1,1,1);
PINSEL_ConfigPin(1,4,1);
PINSEL_ConfigPin(1,8,1);
PINSEL_ConfigPin(1,9,1);
PINSEL_ConfigPin(1,10,1);
PINSEL_ConfigPin(1,14,1);
PINSEL_ConfigPin(1,15,1);
PINSEL_ConfigPin(1,16,1);
PINSEL_ConfigPin(1,17,1);
Solution: Configure the pins first, then turn on the clock. This works:
PINSEL_ConfigPin(1,0,1);
PINSEL_ConfigPin(1,1,1);
PINSEL_ConfigPin(1,4,1);
PINSEL_ConfigPin(1,8,1);
PINSEL_ConfigPin(1,9,1);
PINSEL_ConfigPin(1,10,1);
PINSEL_ConfigPin(1,14,1);
PINSEL_ConfigPin(1,15,1);
PINSEL_ConfigPin(1,16,1);
PINSEL_ConfigPin(1,17,1);
/* Set up power for Ethernet module */
CLKPWR_ConfigPPWR (CLKPWR_PCONP_PCENET, ENABLE);