Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Options for Software Reset in LPC2148

2006-04-17 by Ralph Hempel

> How about writing a "magic" value to somewhere in RAM before you do 
> a planned watchdog reset, and then checking it before you zero 
> out/load initialised RAM as part of normal startup procedure? I've 
> seen this technique used in the past. Obviously you'd need to check 
> that the magic value is zeroed out as soon as it's read.

I've used this in the past as well, Brendan, and can vouch for
its usefulness.

We actually had a special segment of RAM that was NOT part of
the BSS, and was preserved through reset. It was checksummed or
CRCed so that random startup values has little chance of being
misinterpreted.

This also allows the buffer to be used for other information that
we might want to preserve through reset. Most runtime libraries
will zero out the entire BSS at reset, so beware!

A soft reset wrote a special value into this buffer, and
then we disabled interrupts and entered a hard loop. The soft
watchdog does the rest. Actually we had a separate hardware
watchdog but that's not really relevant.

There may be other ways to get what you want, and it's wise to
understand that there is not just one "right" way to get a job
like this done :-)

Ralph

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.