LPC2378 and ethernet problem

Started by Peter Kic September 12, 2008
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

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

Hello
One further thing to think about is ethernet speed - autonegotiation.
10/100Mb speed.It might just fail to set it correctly.(Timeout)
Regards
/Martin

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

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

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
>

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
>

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