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

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

Re: [avr-libc-dev] [bug #37772] wdt_enable() doesn't work for a list of


From: Anton Voloshin
Subject: Re: [avr-libc-dev] [bug #37772] wdt_enable() doesn't work for a list of chips
Date: Mon, 19 Nov 2012 13:57:42 +0400

Real hardware. But I've checked once again and couldn't reproduce that
faulty behaviour. I've used modified version on the routine to set
"interrupt, then reset" watchdog mode. Now it works with the original
instructions order, too.

Looks like a false alarm. I can't reproduce the "bug". Sorry for bothering
and thanks for the explanation.

2012/11/19 Joerg Wunsch <address@hidden>

> As Anton Voloshin wrote:
>
> > My bad. LDI takes 1 cycle, and it's not even here. The reason is that OUT
> > instruction enables interrupts here, and interrupt can occure before the
> > second STS instruction.
>
> On tiny/mega AVRs, re-enabling interrupts is always delayed by one
> instruction, that is, the STS instruction right after the OUT is still
> executed with interrupts disabled.  This has been the way all the
> time, and GCC relies on this in the function epilogue as well.  (On
> Xmega AVRs, this has been changed in hardware, so GCC emit a different
> epilogue there.  However, the Xmega watchdog handling is different
> anyway.)
>
> Curious, are you experiencing this on real hardware, or are you using
> a simulator?
> --
> cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL
>
> http://www.sax.de/~joerg/                        NIC: JW11-RIPE
> Never trust an operating system you don't have sources for. ;-)
>



-- 
Anton Voloshin
Jabber: address@hidden


reply via email to

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