Reply by Mike Harrison July 29, 20102010-07-29
On Thu, 29 Jul 2010 22:52:52 +0000, you wrote:

>Hi, I'm developing a device that uses an LPC2387 and communicates with
>fast ethernet. I have developed a loader for reflashing it over ethernet,
>I burn that loader to a place in the flash and in the main program, I just disable interrupts and
>copy the address of the loader into the program counter when instructed to do so.
>However, I'd like a way to leave the loader once reflashing is complete.
>I could just load address 0x0 into the program counter but that is not ideal as it would not
>clear pending interrupts and otherwise reset registers and peripherals used in the main program.
>What I really need is to induce a reset. What is the best way to do this? The only way I have spotted
>is to configure the watchdog timer but that seems like a hack. Is there a correct way to force a reset
>in firmware?
>
>Baldur

Watchdog is an entirely sensible way to do it, and certainly better than jumping to 0 - the watchdog
hardware is specifically designed to reset the processor, and can be reliably forced to do so via
documented interfaces so why does it seem a hack?
The only other way would be to tie an external pin to reset.
>

An Engineer's Guide to the LPC2100 Series

Reply by jsm09a July 29, 20102010-07-29
Watchdog timer is the method that we used - not aware of any other way (other than external hardware ....).

Reply by Baldur Gislason July 29, 20102010-07-29
Hi, I'm developing a device that uses an LPC2387 and communicates with
fast ethernet. I have developed a loader for reflashing it over ethernet,
I burn that loader to a place in the flash and in the main program, I just disable interrupts and
copy the address of the loader into the program counter when instructed to do so.
However, I'd like a way to leave the loader once reflashing is complete.
I could just load address 0x0 into the program counter but that is not ideal as it would not
clear pending interrupts and otherwise reset registers and peripherals used in the main program.
What I really need is to induce a reset. What is the best way to do this? The only way I have spotted
is to configure the watchdog timer but that seems like a hack. Is there a correct way to force a reset
in firmware?

Baldur