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

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

Re: [avr-libc-dev] [bug #35003] wdt_enable() has a wrong code sequencefo


From: Georg-Johann Lay
Subject: Re: [avr-libc-dev] [bug #35003] wdt_enable() has a wrong code sequencefor many parts
Date: Wed, 07 Dec 2011 18:22:59 +0100
User-agent: Thunderbird 2.0.0.24 (X11/20100302)

Joerg Wunsch wrote:
> As Jan Waclawek wrote:
> 
>> Do you find that a sufficient documentation of this feature?
> 
> Strictly, that description is only guaranteed to apply to the SEI
> instruction, not to other ways that modify the I flag.  Apparently,
> this one-instruction delay is implemented in the classic AVR core in a
> way where it always applies, independent of the way the I flags has
> actually been set.
> 
> Given that this appears to be an undocumented feature that has always
> been present in the "classic" AVR core, and that the compiler has been
> relying on it all the time (once the early AVR-GCC authors knew about
> it), the entire world would break down if this behaviour were suddenly
> changed, so things like wdt_enable() are certainly the least of the
> problems.

If it's actually undocumented feature that can be found nowhere (instruction
set manual, data sheets, ...) then this needs clarification by means of, e.g.
Atmel support ticket.

Tool should not rely on undocumented behaviour, just the same way as they don't
implement undocumented opcodes that appear to work in some devices.

Johann




reply via email to

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