Reply by gussabina July 28, 20102010-07-28
Hello:
Please, beaware that RMII (MII is not supported by LPC17xx) needs a 50MHz clock, not 25MHz like in MII.

Unless you had a typo, this should be the problem.
Regards;

GS

--- In l..., Prakash Rajoli wrote:
>
> Hello,
>
> During configuration of Ethernet, JTAG losing communication with the target.
>
> In LPC17xx manual there is a remark as follow
>
> Remark: when initializing the Ethernet block, it is important to first configure the PHY and
> insure that reference clocks (ENET_REF_CLK signal in RMII mode, or both
> ENET_RX_CLK and ENET_TX_CLK signals in MII mode) are present at the external pins
> and connected to the EMAC module (selecting the appropriate pins using the PINSEL
> registers) prior to continuing with Ethernet configuration. Otherwise the CPU can become
> locked and no further functionality will be possible. This will cause JTAG lose
> communication with the target, if debug mode is being used.
>
> Initialization have following code,
>
>
>
> /* Power Up the EMAC controller. */
>
> SC->PCONP |= 0x40000000;
>
>
>
> /* Enable P1 Ethernet Pins. */
>
> PINCON->PINSEL2 = 0x50150105;
>
> PINCON->PINSEL3 = (PINCON->PINSEL3 & ~0x0000000F) |
> 0x00000005;
>
>
>
> /* Reset all EMAC internal modules. */
>
> EMAC->MAC1 = MAC1_RES_TX | MAC1_RES_MCS_TX | MAC1_RES_RX |
> MAC1_RES_MCS_RX |
>
> MAC1_SIM_RES | MAC1_SOFT_RES;
>
> EMAC->Command = CR_REG_RES | CR_TX_RES | CR_RX_RES;
>
>
>
> Is there any problem in this configuration?
>
> KS8721 PHY is the device which I am using in my board and 25 MHz oscillator be connected to the device X1 pin. Is there oscillator problem?
>
> -Prakash
>
> 9886545216
>

An Engineer's Guide to the LPC2100 Series

Reply by Prakash Rajoli July 28, 20102010-07-28
>Hello:
>Please, beaware that RMII (MII is not supported by LPC17xx) needs a 50MHz clock, not >25MHz like in MII.

Thanks for your response.

I have ordered 50MHz oscillator. I'll check it once it comes.
-Prakash

9886545216
Reply by Prakash Rajoli July 24, 20102010-07-24
Hello,

During configuration of Ethernet, JTAG losing communication with the target.

In LPC17xx manual there is a remark as follow

Remark: when initializing the Ethernet block, it is important to first configure the PHY and
insure that reference clocks (ENET_REF_CLK signal in RMII mode, or both
ENET_RX_CLK and ENET_TX_CLK signals in MII mode) are present at the external pins
and connected to the EMAC module (selecting the appropriate pins using the PINSEL
registers) prior to continuing with Ethernet configuration. Otherwise the CPU can become
locked and no further functionality will be possible. This will cause JTAG lose
communication with the target, if debug mode is being used.

Initialization have following code,

/* Power Up the EMAC controller. */

SC->PCONP |= 0x40000000;

/* Enable P1 Ethernet Pins. */

PINCON->PINSEL2 = 0x50150105;

PINCON->PINSEL3 = (PINCON->PINSEL3 & ~0x0000000F) |
0x00000005;

/* Reset all EMAC internal modules. */

EMAC->MAC1 = MAC1_RES_TX | MAC1_RES_MCS_TX | MAC1_RES_RX |
MAC1_RES_MCS_RX |

MAC1_SIM_RES | MAC1_SOFT_RES;

EMAC->Command = CR_REG_RES | CR_TX_RES | CR_RX_RES;

Is there any problem in this configuration?

KS8721 PHY is the device which I am using in my board and 25 MHz oscillator be connected to the device X1 pin. Is there oscillator problem?

-Prakash

9886545216