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

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

Re: [avr-gcc-list] possible compiler bug?


From: Brian Dean
Subject: Re: [avr-gcc-list] possible compiler bug?
Date: Wed, 28 Aug 2002 20:39:19 -0400
User-agent: Mutt/1.4i

On Wed, Aug 28, 2002 at 05:35:29PM -0600, E. Weddington wrote:

> Another reason for rolling your own functions is that if you read 
> further down in the section, Accessing 16-bit Registers, in the 
> datasheet, it says that if you are in the middle of reading/writing 
> one of these 16-bit registers, and an interrupt happens where the 
> interrupt will also access ANY of those 16-bit registers that shares 
> the Temporary Register, then there will be a mighty clash at the 
> Temporary Register and it screw up the values royally. So, when 
> rolling your own functions, add a disable interrupts and enable 
> interrupts bookends around the operation.

Well, that's the first good reason I've heard for rolling your own
function or macro for this type of thing.

Thanks for you input.

-Brian
-- 
Brian Dean                                      address@hidden
avr-gcc-list at http://avr1.org



reply via email to

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