avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] variable that survives reset?


From: Artur Lipowski
Subject: Re: [avr-libc-dev] variable that survives reset?
Date: Fri, 28 Nov 2003 08:31:48 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031126 Thunderbird/0.4a

Jörgen Birkler wrote:
...
> Arthur, you mentioned init3, maybe i shouldn't rely on
> that I can check the MCUCSR in my main() function?

If you want to make some decisions about variable initialization, init3 
is a good place for that.
Eg. I sometimes use watchdog do wake up uC from power down and basing on 
information from MCUCSR I can choose:
- powerup reset - do nothing -> normal avr-libc startup
- watchdog reset - skip avr-libc initialization -> "goto" main

Regards,
-- 
Artur Lipowski




reply via email to

[Prev in Thread] Current Thread [Next in Thread]