[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] jump_to_null question
From: |
Juergen Harms |
Subject: |
Re: [avr-gcc-list] jump_to_null question |
Date: |
Thu, 24 May 2007 16:18:46 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070522) |
> The best way to reset is to enable the watchdog timer on the shortest
> time-out, go into an infinite loop, and let the watchdog reset the
> AVR. Depending on which AVR you are using, you will have to turn off
> the watchdog timer after reset, with code in the .init3 section, for
> example.
Interesting. I use a system-disaster procedure for impossible cases
which I want to be able to resconstruct - it saves some information in
eeprom and does __init () - which is where the reset vector ends up.
Nice hint, that needs to be corrected. Reading the code of __init I now
realise that __init is only a prolog for launching the compiled program.
Even for a software disaster handler, the watchdog reset is certainly
preferable, I assume it will clean pending interrupts, reset hardware
counters, etc. A candidate for the FAQ's (How do I hard-reset my system?) ?
Thanks, Juergen
Re: [avr-gcc-list] jump_to_null question, Rolf Magnus, 2007/05/26