EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2294 Software Reset vs. Watchdog

Started by mpwalter2005 September 9, 2005
Hi,

some problem: after flashing the internal flash with IAP, i want to
perform a restart. I know it works good with the watchdog, using this
commands:

WDTC = 0x00FFF;
WDMOD = 0x03;
WDFEED= 0xAA;
WDFEED= 0x55;

but I don't want to use the watchdog, I will use a software reset. So
i write this code:

void (*reset)(void);

void function (..)
{
... iap routines ...
reset = (void (*)(void))(0x0000);
reset();
}

so it do what I want - jump to the reset handler , but my program
will not start (when i doing a reset, by pressing the reset-button on
my phycore board it will runs great !) - so what is wrong or what can
I do ? Must changing some registers ?

Thanks for every hint
Matthias


An Engineer's Guide to the LPC2100 Series

Make sure you set VPBDIV to zero before you initialize EXTMODE,
EXTPOLAR, etc.
VPBDIV is zero on reset, but it may not be zero if you jump to address
0x00000000.

Also initializing the PLL while it is still connected to CCLK, may not
work (never tried this).

Look for other initializations that assume reset values. Richard Duits mpwalter2005 wrote:

> Hi,
>
> some problem: after flashing the internal flash with IAP, i want to
> perform a restart. I know it works good with the watchdog, using this
> commands:
>
> WDTC = 0x00FFF;
> WDMOD = 0x03;
> WDFEED= 0xAA;
> WDFEED= 0x55;
>
> but I don't want to use the watchdog, I will use a software reset. So
> i write this code:
>
> void (*reset)(void);
>
> void function (..)
> {
> ... iap routines ...
> reset = (void (*)(void))(0x0000);
> reset();
> }
>
> so it do what I want - jump to the reset handler , but my program
> will not start (when i doing a reset, by pressing the reset-button on
> my phycore board it will runs great !) - so what is wrong or what can
> I do ? Must changing some registers ?
>
> Thanks for every hint
> Matthias >
>
> >. >
>





The 2024 Embedded Online Conference