EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

ARM LPC2388 - Ethernet

Started by ansarizafar June 6, 2008
Hi All,

I have LPC2388 board with design same as Keil's MCB2300. I am using
PHY DP83848C for ethernet & Keil IDE. I am using the sample ethernet
driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).

I am able to run code in my processor, it initializes Ethernet & Link
LED activates, but after sometime (approx 15-20 sec) system starts
rebooting periodically & Link LED goes off.

I am not calling any Ethernet related function in my super loop (while
(1)), except init_ethernet() called once.
can anybody suggets me why system is rebooting.

Thanks

An Engineer's Guide to the LPC2100 Series

Hi,

watchdog?

Foltos

ansarizafar wrote:
> Hi All,
>
> I have LPC2388 board with design same as Keil's MCB2300. I am using
> PHY DP83848C for ethernet & Keil IDE. I am using the sample ethernet
> driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).
>
> I am able to run code in my processor, it initializes Ethernet & Link
> LED activates, but after sometime (approx 15-20 sec) system starts
> rebooting periodically & Link LED goes off.
>
> I am not calling any Ethernet related function in my super loop (while
> (1)), except init_ethernet() called once.
> can anybody suggets me why system is rebooting.
>
> Thanks
>
Watch dog is currently disabled.

--- In l..., Foltos wrote:
>
> Hi,
>
> watchdog?
>
> Foltos
>
> ansarizafar wrote:
> > Hi All,
> >
> > I have LPC2388 board with design same as Keil's MCB2300. I am
using
> > PHY DP83848C for ethernet & Keil IDE. I am using the sample
ethernet
> > driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).
> >
> > I am able to run code in my processor, it initializes Ethernet &
Link
> > LED activates, but after sometime (approx 15-20 sec) system
starts
> > rebooting periodically & Link LED goes off.
> >
> > I am not calling any Ethernet related function in my super loop
(while
> > (1)), except init_ethernet() called once.
> >
> >
> > can anybody suggets me why system is rebooting.
> >
> > Thanks
> >
> >
> >
> >
> >
Could it be that the init function enables some (in your code)
unexisting irq routine that gets called whenever a packet arrives which
then leads to the reboot? A bug in said IRQ routine (provided you have one)?

My 2 of course

Markus

ansarizafar schrieb:
>
> Hi All,
>
> I have LPC2388 board with design same as Keil's MCB2300. I am using
> PHY DP83848C for ethernet & Keil IDE. I am using the sample ethernet
> driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).
>
> I am able to run code in my processor, it initializes Ethernet & Link
> LED activates, but after sometime (approx 15-20 sec) system starts
> rebooting periodically & Link LED goes off.
>
> I am not calling any Ethernet related function in my super loop (while
> (1)), except init_ethernet() called once.
>
> can anybody suggets me why system is rebooting.
>
> Thanks
>
>
Hi Markus,



First you need to check what is the source of the reset. You can do this

by adding some code at the beginning of your main function.

Then you'll be able to tell if it's a external reset, watchdog reset, or

any other reason.



Rebooting - which is related (mainly but not only) to restarting CPU -

shouldn't be affected by any problems in the ethernet controller domain,

unless of course due to the memory exception conditions (reading or

writing non-existent registers of the MAC controller). However this would

lead you to an abort vector, and not to the reset vector (verify if they
point

to the same reset routine..)



So it must be related to some bug in your code, watchdog, or even

power bouncing due to phy activity. Although because you mentioned

that this is systematic (15~20 secs), I more likely to think that this could


be a bug in the firmware.



Regards,

Jorge.



-------Original Message-------



From: Markus Zingg

Date: 6/6/2008 7:45

To: l...

Subject: Re: [lpc2000] ARM LPC2388 - Ethernet



Could it be that the init function enables some (in your code)

unexisting irq routine that gets called whenever a packet arrives which

then leads to the reboot? A bug in said IRQ routine (provided you have one)?



My 2 of course



Markus



ansarizafar schrieb:

>

> Hi All,

>

> I have LPC2388 board with design same as Keil's MCB2300. I am using

> PHY DP83848C for ethernet & Keil IDE. I am using the sample ethernet

> driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).

>

> I am able to run code in my processor, it initializes Ethernet & Link

> LED activates, but after sometime (approx 15-20 sec) system starts

> rebooting periodically & Link LED goes off.

>

> I am not calling any Ethernet related function in my super loop (while

> (1)), except init_ethernet() called once.

>

> can anybody suggets me why system is rebooting.

>

> Thanks

>

>










Hi:
Can you disable the Ethernet receiver? After that, if you still
having the reset, it would be a different thing...
I thing as soon as you initialize the ethernet interface, you could
start receiving packets and if the code is not handling this, you
could be finishing in some kind of problem...

Regards;
Gus
--- In l..., "Jorge" wrote:
>
> Hi Markus,
>
> First you need to check what is the source of the reset. You can
do this
> by adding some code at the beginning of your main function.
> Then you'll be able to tell if it's a external reset, watchdog
reset, or
> any other reason.
>
> Rebooting - which is related (mainly but not only) to restarting
CPU -
> shouldn't be affected by any problems in the ethernet controller
domain,
> unless of course due to the memory exception conditions (reading
or
> writing non-existent registers of the MAC controller). However
this would
> lead you to an abort vector, and not to the reset vector (verify
if they
> point
> to the same reset routine..)
>
> So it must be related to some bug in your code, watchdog, or even
> power bouncing due to phy activity. Although because you mentioned
> that this is systematic (15~20 secs), I more likely to think that
this could
>
> be a bug in the firmware.
>
> Regards,
> Jorge.
>
> -------Original Message-------
>
> From: Markus Zingg
> Date: 6/6/2008 7:45
> To: l...
> Subject: Re: [lpc2000] ARM LPC2388 - Ethernet
>
> Could it be that the init function enables some (in your code)
> unexisting irq routine that gets called whenever a packet arrives
which
> then leads to the reboot? A bug in said IRQ routine (provided you
have one)?
>
> My 2 of course
>
> Markus
>
> ansarizafar schrieb:
> >
> > Hi All,
> >
> > I have LPC2388 board with design same as Keil's MCB2300. I am
using
> > PHY DP83848C for ethernet & Keil IDE. I am using the sample
ethernet
> > driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).
> >
> > I am able to run code in my processor, it initializes Ethernet &
Link
> > LED activates, but after sometime (approx 15-20 sec) system
starts
> > rebooting periodically & Link LED goes off.
> >
> > I am not calling any Ethernet related function in my super loop
(while
> > (1)), except init_ethernet() called once.
> >
> > can anybody suggets me why system is rebooting.
> >
> > Thanks
> >
> >
>
>
>
>
>
>
>

>> > Hi All,
>> >
>> > I have LPC2388 board with design same as Keil's MCB2300. I am
>using
>> > PHY DP83848C for ethernet & Keil IDE. I am using the sample
>ethernet
>> > driver code provided by Keil (LPC23_EMAC.h & LPC23_EMAC.c).
>> >
>> > I am able to run code in my processor, it initializes Ethernet &
>Link
>> > LED activates, but after sometime (approx 15-20 sec) system
>starts
>> > rebooting periodically & Link LED goes off.
>> >
>> > I am not calling any Ethernet related function in my super loop
>(while
>> > (1)), except init_ethernet() called once.

Not sure if these apply applies to this part, but causes of this on some other parts can be :

Unexpected interrupts - where does the unexpected interrupt vector point to? If zero, try pointing
it to an infinite loop ( with watchdog reset if enabled) & see if this changes anything.

Watchdog, in particular accessing other IO in between the WDT feed sequence ( as NOT documented in
the UMs I've read) - if you are not disabling ints when feeding the WDT this may be the problem. Try
disabling the WDT to see if this is the source of the reset.

Stack overflow - pulling garbage off the stack and jumping into the weeds.


The 2024 Embedded Online Conference