EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2378 and ethernet problem

Started by Peter Kic September 12, 2008
Thank you for information.

What means relative short? My Nets (RD-, RD+, TD-, TD+) are long from
2300mil to 3000mil.

My board is runing on 12MHz clock.
Now I notice, that sometimes after reset works OK, no lose at ping
test, but sometimes not, so I could be a problem at inicialization.
Peter
--- In l..., Markus Zingg wrote:
>
> Peter,
>
> At 100Mb it's not yet THAT important as long as you are using relative
> short traces between the PHY and the JACK. At what clock frequency is
> your board running? I had a similar problem with a design using 6Mhz
> which for some reason turned out to be too slow for reliable ethernet
> packet reception. Changeing the crystal to 12Mhz did the trick....
>
> HTH
>
> Markus
>
> Peter Kic schrieb:
> >
> >
> > I did ping test and I had 42%loss.
> >
> > I thinh a problem is in design. I look the documentation of DP83848,
> > but there is not mention lookout - max distance between DP83848 and
> > jack, line width, ...
> > I notice on this groop that is also important, that line length of
> > RD+- and TD+- must be the same, is that true?
> >
> > This is my first project with high frequence.
> >
> > Any advice for new design?
> >
> > Best regards
> > Peter
> >
>

An Engineer's Guide to the LPC2100 Series

Peter,

The RD- and RD+ as well as their TX counterparts are to be routed in
pairs where the impedance is also important. That's probably the reason.
If you have to place the jack away from the MAC, move the PHY closer to
the jack next time cause the MII interface is less critical.

Markus

Peter Kic schrieb:
>
> Thank you for information.
>
> What means relative short? My Nets (RD-, RD+, TD-, TD+) are long from
> 2300mil to 3000mil.
>
> My board is runing on 12MHz clock.
>
> Now I notice, that sometimes after reset works OK, no lose at ping
> test, but sometimes not, so I could be a problem at inicialization.
>
> Peter
>
> --- In l... ,
> Markus Zingg wrote:
> >
> > Peter,
> >
> > At 100Mb it's not yet THAT important as long as you are using relative
> > short traces between the PHY and the JACK. At what clock frequency is
> > your board running? I had a similar problem with a design using 6Mhz
> > which for some reason turned out to be too slow for reliable ethernet
> > packet reception. Changeing the crystal to 12Mhz did the trick....
> >
> > HTH
> >
> > Markus
> >
> > Peter Kic schrieb:
> > >
> > >
> > > I did ping test and I had 42%loss.
> > >
> > > I thinh a problem is in design. I look the documentation of DP83848,
> > > but there is not mention lookout - max distance between DP83848 and
> > > jack, line width, ...
> > > I notice on this groop that is also important, that line length of
> > > RD+- and TD+- must be the same, is that true?
> > >
> > > This is my first project with high frequence.
> > >
> > > Any advice for new design?
> > >
> > > Best regards
> > > Peter
> > >
> > >
> >
Hi!

Now I have new hardware and I had a problem, like at old, that
sometimes DHC work, sametimes don't and ping sometimes is 100%,
sometimes 50% sucessfull.

I notice, that after HW reset (power off) of DP83848 works better.
Than I looked documentation (DP83848) and notice that you can make SW
reset (equivalent to HW). After SW reset it need to be 1us time delay
and another 3us befour is made "contact" with DP83848. There is not
delay but just looking if you get right register data from DP83848.

I made 10us time delay with TIMER2 between reset in looking register
and then again 10us.

Now its works fine.

file: LPC23_EMAC.C
function: void init_ethernet (void)

...
//wait at least 1ms
T2TC = 0;
while(T2TC<10); //10ms

/* Wait for hardware reset to end. */
for (tout = 0; tout < 0x100000; tout++) {
regv = read_PHY (PHY_REG_BMCR);
if (!(regv & 0x8800)) {
/* Reset complete, device not Power Down. */
break;
}
}

//wait at least 3ms
T2TC = 0;
while(T2TC<10); //10ms
...

I hope this will help to someone.

Bye
--- In l..., "Peter Kic" wrote:
>
> Hi!!
>
> I have MCB2300 and I made a ethernet aplication with RTL. Its work
> fine. Then I made own hardware, that is similar to MCB2300, ethernet
> part is the same. Software, that works on MCB2300 on my board don't
> work. At ethernet inicialization just crash. Than I can't reprogram
> board again, I have to run LPC in bootload (P2.10 low at start up). I
> looked disassemly and I notice that crash happen when in register MAC1
> flag PASS ALL RECEIVE FRAMES is set.
>
> I looked all pins of DP83848 (Ethernet Physical Layer Transceiver) and
> pin MDC is low on my board but on MCB2300 is frequency 12MHz (like
> main oscillator). Pin TX_EN is all the time low, on MCB gives pulses.
> All other pins have the same voltage and frequency like MCB2300. I
> changed capacitor on pin PFBOUT (replacing with tantalum) and made
> short circuit to GND. Then i tried it and solve that.
> Now is this pin on the same voltage like on MCB2300. Could this
> destroy DP83848?
>
> What could be wrong?
>
> Thanke you for any advice.
>
> Best regard
> Peter
>

Hi!

I had exactly the same problem. I guess your MCB2300 board uses a rev. '-' LPC2300, and your board uses a rev. 'B'. I solved this problem with the errata sheet : the PINSEL value is different for the different revisions.
But then, I still have the problem that it does not work at 100Mbits, but works fine at 10Mbits...
Tell me how is your work going.

Bye.
Jerome
--- On Thu, 10/30/08, Peter Kic wrote:
From: Peter Kic
Subject: [lpc2000] Re: LPC2378 and ethernet problem
To: l...
Date: Thursday, October 30, 2008, 12:55 PM

Hi!

Now I have new hardware and I had a problem, like at old, that

sometimes DHC work, sametimes don't and ping sometimes is 100%,

sometimes 50% sucessfull.

I notice, that after HW reset (power off) of DP83848 works better.

Than I looked documentation (DP83848) and notice that you can make SW

reset (equivalent to HW). After SW reset it need to be 1us time delay

and another 3us befour is made "contact" with DP83848. There is not

delay but just looking if you get right register data from DP83848.

I made 10us time delay with TIMER2 between reset in looking register

and then again 10us.

Now its works fine.

file: LPC23_EMAC.C

function: void init_ethernet (void)

...

//wait at least 1ms

T2TC = 0;

while(T2TC<10) ; //10ms

/* Wait for hardware reset to end. */

for (tout = 0; tout < 0x100000; tout++) {

regv = read_PHY (PHY_REG_BMCR) ;

if (!(regv & 0x8800)) {

/* Reset complete, device not Power Down. */

break;

}

}

//wait at least 3ms

T2TC = 0;

while(T2TC<10) ; //10ms

...

I hope this will help to someone.

Bye

--- In lpc2000@yahoogroups .com, "Peter Kic" wrote:

>

> Hi!!

>

> I have MCB2300 and I made a ethernet aplication with RTL. Its work

> fine. Then I made own hardware, that is similar to MCB2300, ethernet

> part is the same. Software, that works on MCB2300 on my board don't

> work. At ethernet inicialization just crash. Than I can't reprogram

> board again, I have to run LPC in bootload (P2.10 low at start up). I

> looked disassemly and I notice that crash happen when in register MAC1

> flag PASS ALL RECEIVE FRAMES is set.

>

> I looked all pins of DP83848 (Ethernet Physical Layer Transceiver) and

> pin MDC is low on my board but on MCB2300 is frequency 12MHz (like

> main oscillator). Pin TX_EN is all the time low, on MCB gives pulses.

> All other pins have the same voltage and frequency like MCB2300. I

> changed capacitor on pin PFBOUT (replacing with tantalum) and made

> short circuit to GND. Then i tried it and solve that.

> Now is this pin on the same voltage like on MCB2300. Could this

> destroy DP83848?

>

> What could be wrong?

>

> Thanke you for any advice.

>

> Best regard

> Peter

>



The 2024 Embedded Online Conference