Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] LPC Reset..

2004-10-10 by Anton Erasmus

On 7 Oct 2004 at 15:05, bty639886 wrote:

> 
> 
> Is there any way to reset the processor from within the firmware?
> 
> I am currently using the Watchdog feature, and I know if I stop 
> toggling the watchdog then my processor will time out and reset.
> 
> However, I need to be able to do different things depending on 
> the 'cause' of the reset...
> 
> ie if its a watchdog timeout that caused reset I need to do X,Y,Z
> before normal operation but if its a software triggered reset (eg
> after I have updated a parameter or something in flash) then I only
> want it to do Y,Z
> 
> Obviously I could use some external hardware, however is there any way
> to do it in software????
> 

What I have done in the past is to have a 32bit value in a portion of RAM which is not 
initialised by the C startup code. (If you have any). I then write a specific value into this 
address, before I cause a deliberate watchdog reset. After a reset one can then check 
the value. If it is the special value, then it was a "Software Reset" otherwise it was a 
watchdog reset.

Regards
   Anton Erasmus
-- 
A J Erasmus

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.