Reply by Titi Toon October 30, 20082008-10-30
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

>


An Engineer's Guide to the LPC2100 Series

Reply by Peter Kic October 30, 20082008-10-30
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
>

Reply by Markus Zingg September 17, 20082008-09-17
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
> > >
> > >
> >
Reply by Peter Kic September 17, 20082008-09-17
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
> >
>
Reply by Markus Zingg September 16, 20082008-09-16
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
>
>
Reply by Peter Kic September 16, 20082008-09-16
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
Reply by Peter Kic September 15, 20082008-09-15
Now I have another problem. I don't get link at the moment. After few
10s cames.

What cause that? Some time delay is to short? On MCB2300 work ok.
--- 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
>

Reply by Peter Kic September 15, 20082008-09-15
Thanke for yours advices. The problem is in PINSEL2, like you all are
mention. I change value in debug mode to 0x50150105, after was set to
0x55555555 and was ok.

Thanke you again.

Peter
--- 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
>

Reply by Peter Kic September 15, 20082008-09-15
Chip revision: B (third)
last writen line on chip: ZSD0813BY

50MHz clock is coming propertly
--- In l..., "Vinod Ganesh" wrote:
>
> the problem is the pinsel value for the chip. what is the revision
of your
> chip. we had the same issue and was solved last month. check whether the
> 50MHZ clock is coming properly
>
> On Fri, Sep 12, 2008 at 6:33 PM, 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
> >
> >
> >
>
>

Reply by Peter Kic September 15, 20082008-09-15
I'm using RL-ARM (Realview Real-Time Library) and there is in
incialization PINSEL2 set to 0x55555555. I can't change it.

I trie turning off MAM, but still don't work.

--- In l..., Markus Zingg wrote:
>
> Peter,
>
> Does the etherenet MAC code you use test the CPU version and initialize
> PINSEL2 acordingly? Below is a sniped of code of mine which takes care
> of it.
>
> Then, I had all sorts of WEIRED problems with my LPC2378 based board
> when useing the MAM. I ended up turning it off completely. It sometimes
> workd, then just a slightly different compile (some code chanded
> somewhere) and I had a can of worms...
>
> Just my 2
>
> Markus
>
> /* Note, there is a bug with older LPC23xx chips which require to
set
> P1.6
> (ENET-TX_CLK) or not depending on the version of the EMAC
module. We
> therfore test here against this version and act acordingly. */
> regVal = MAC_MODULEID;
> if( regVal == NXP_OLD_MAC_MODULE_ID )
> PINSEL2 = 0x50151105; /* selects P1[0,1,4,6,8,9,10,14,15] */
> else
> PINSEL2 = 0x50150105; /* selects P1[0,1,4,8,9,10,14,15] */
>
>
>
>
> Peter Kic schrieb:
> >
> > 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
> >
>