EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2129 watchdog reset

Started by "t.herbi" August 4, 2006
Hello,

im designing a project with the lpc2129 and need to reset the
controller by software after i have received a command over uart.
To realice this i set and start the watchdog and wait till the wd
period is over.

But after the reset occoured the uC doesn't come back to live. When
i'm debugging this problem i see that the boot vector at adress 0x00
is overwritten with 0xFF. But that couldn't be possible because the
boot vector resides in flash memory.

After i reset the controller with the debugger it runs again normally,
so the boot vector isn't overwritten.

What's going wrong? Can anyone help me please?
Greetings t.herbi

An Engineer's Guide to the LPC2100 Series

t.herbi wrote:
> Hello,
>
> im designing a project with the lpc2129 and need to reset the
> controller by software after i have received a command over uart.
> To realice this i set and start the watchdog and wait till the wd
> period is over.
>
> But after the reset occoured the uC doesn't come back to live. When
> i'm debugging this problem i see that the boot vector at adress 0x00
> is overwritten with 0xFF. But that couldn't be possible because the
> boot vector resides in flash memory.
>
> After i reset the controller with the debugger it runs again normally,
> so the boot vector isn't overwritten.
>
> What's going wrong? Can anyone help me please?
>

Have you tested this phenomenon without debugger connected? Maybe just a problem with your
debugger/software.

I have the problem that after such a watchdog reset I cannot enter bootloader by asserting /RESET
and P0.14 anymore. LPC need a power-on-reset prior to work properly again.

Sten

--
/************************************************
Do you need a tiny and efficient real time
operating system (RTOS) with a preemtive
multitasking for LPC2000?

http://www.sandring-systems.de/
************************************************/
> Have you tested this phenomenon without debugger connected? Maybe
just a problem with your
> debugger/software.
>
> I have the problem that after such a watchdog reset I cannot enter
bootloader by asserting /RESET
> and P0.14 anymore. LPC need a power-on-reset prior to work properly
again.
>
> Sten
>
> --
> /************************************************
> Do you need a tiny and efficient real time
> operating system (RTOS) with a preemtive
> multitasking for LPC2000?
>
> http://www.sandring-systems.de/
> ************************************************/
>

Hi Sten,

thank you for your reply. I've tested that with and without the
debugger connected but it doesn't work anywhere.

t.herbi
--- In l..., "t.herbi" wrote:
>
> > Have you tested this phenomenon without debugger connected? Maybe
> just a problem with your
> > debugger/software.
> >
> > I have the problem that after such a watchdog reset I cannot
enter
> bootloader by asserting /RESET
> > and P0.14 anymore. LPC need a power-on-reset prior to work
properly
> again.
> >
> > Sten
> >
> > --
> > /************************************************
> > Do you need a tiny and efficient real time
> > operating system (RTOS) with a preemtive
> > multitasking for LPC2000?
> >
> > http://www.sandring-systems.de/
> >
> >
> > ************************************************/
> > Hi Sten,
>
> thank you for your reply. I've tested that with and without the
> debugger connected but it doesn't work anywhere.
>
> t.herbi
>

Are you remapping exception vectors to SRAM? If so, you might need
to copy the vectors upon reboot before your reset vectors are valid
again. There are plenty of examples on the web on how to do this.
Search for SRAM_EXCEPTIONS.

here is a code snippet I found on the web on how to do this with a
Rowley compiler.

/* Copy exception vectors into SRAM */
mov r8, #0x40000000
ldr r9, =_vectors
ldmia r9!, {r0-r7}
stmia r8!, {r0-r7}
ldmia r9!, {r0-r6}
stmia r8!, {r0-r6}

/* Re-map interrupt vectors from SRAM */
ldr r0, MEMMAP
mov r1, #2 /* User RAM Mode. Interrupt vectors are re-mapped from
SRAM */
str r1, [r0]

Good luck.
Thanks for your replys,

we've tested the watchdog reset with an other board where the 2138 is
placed on and on this controller it works?!

We still don't know what's wrong with the 2129. Maybe a hardware error
in the uC?
But that doesn't matter, in our product we are going to use the 2138.

Again thanks for your help and

Good bye

t.herbi

The 2024 Embedded Online Conference