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:21:46 +0400

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.

2012/11/19 Anton Voloshin <address@hidden>

> The code was compiled on windows with -Os optimization for Atmega
> 1284P. The "ldi" instruction takes 2 cycles, according to disassembly
> listing.
>
> wdt_enable() didn't work for me until I made this correction.
>
>
> 2012/11/19 Joerg Wunsch <address@hidden>
>
>> Follow-up Comment #1, bug #37772 (project avr-libc):
>>
>> Well, this inline assembly statement has been written that
>> way for years now, and was proven to work.  How did you
>> verify it doesn't work, and for which controller type?
>>
>> The OUT instruction takes one CPU cycle, and the STS
>> instruction two cycles, that's why the four-cycle requirement
>> is still maintained.
>>
>>     _______________________________________________________
>>
>> Reply to this item at:
>>
>>   <http://savannah.nongnu.org/bugs/?37772>
>>
>> _______________________________________________
>>   Message sent via/by Savannah
>>   http://savannah.nongnu.org/
>>
>>
>
>
> --
> Anton Voloshin
> Jabber: address@hidden
>



-- 
Anton Voloshin
Jabber: address@hidden


reply via email to

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