avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Global variables and ISRs ???


From: Vincent Trouilliez
Subject: Re: [avr-gcc-list] Global variables and ISRs ???
Date: Tue, 06 Sep 2005 22:17:03 +0200

> Try making 'flag' volatile:

Thanks chaps, that did it :-)


> What's probably happening is the compiler, not seeing that 'flag' is
> modified anywhere in the while loop, isn't reloading it every loop
> iteration 

Must be that, 'cause I looked at the assembler output closely enough to
see that the compiler was toying with my global variables, but didn't
look closely enough to make sure what it was doing e-xac-tly... hum
hum... that will teach me not paying enough attention I guess...


Thanks everyone, I can now resume my experiments... :-)


Regards,


--
Vince, learning a little bit more every day...





reply via email to

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