EmbeddedRelated.com
Forums

1788 Ethernet Initialitions Take Long Time.

Started by Murat January 18, 2012
Hi all,

I have developed ethernet driver for LPC1768 using CMSIS lpc17xx_emac driver.
And I have applied this driver for LPC1788 using CMSIS lpc177x_8x_emac driver too.
But while 1788 CMSIS EMAC Driver setting the Ethernet Physical Mode (calling EMAC_SetPHYMode), its take long time, like as 20 seconds.
1768 is working fine.
I cant understand the problem.

Thanks.

Murat.

An Engineer's Guide to the LPC2100 Series

Hi

I have used the LPC1768 and LPC1788 with Ethernet and didn't have any difficulties (using the LPC1788 on the IAR board).

Check carefully that the ENET pins are all configured correctly (see below for list in RMII mode) and check that all clocks are set up correctly (clocking is a bit different):

IOCON_P1_00 = _ENET_P1_0_TXD0;
IOCON_P1_01 = _ENET_P1_1_TXD1;
IOCON_P1_04 = _ENET_P1_4_TXEN;
IOCON_P1_08 = _ENET_P1_8_CRS_DV;
IOCON_P1_09 = _ENET_P1_9_RXD0;
IOCON_P1_10 = _ENET_P1_10_RXD1;
IOCON_P1_14 = _ENET_P1_14_RXER;
IOCON_P1_15 = _ENET_P1_15_REFCK;
IOCON_P1_16 = _ENET_P1_16_MDC;
IOCON_P1_17 = _ENET_P1_17_MDIO;

Finally, if you are running the CPU faster than 100MHz makes sure that you have the power boost (in the new PBOOST register) set otherwise there may be some strange behaviour.

Regards

Mark

www.uTasker.com
--- In l..., "Murat" wrote:
>
> Hi all,
>
> I have developed ethernet driver for LPC1768 using CMSIS lpc17xx_emac driver.
> And I have applied this driver for LPC1788 using CMSIS lpc177x_8x_emac driver too.
> But while 1788 CMSIS EMAC Driver setting the Ethernet Physical Mode (calling EMAC_SetPHYMode), its take long time, like as 20 seconds.
> 1768 is working fine.
> I cant understand the problem.
>
> Thanks.
>
> Murat.
>

Alternate EMAC and PHY drivers that have been optimized for LWIP on the LPC177x/8x are
also available at http://www.lpcware.com/content/project/lightweight-ip-lwip-networking-stack
The PHY driver is separate from the EMAC driver. PHY negotiation with the LAN8720 is very quick.

Kevin