[Top][All Lists]

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

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

From: Theodore A. Roth
Subject: Re: [avr-gcc-list] possible compiler bug?
Date: Wed, 28 Aug 2002 16:53:23 -0700 (PDT)

On Wed, 28 Aug 2002, E. Weddington wrote:

:) That's the crux. It's not all 16-bit I/O ports. This just has to do
:) with the Timer/Counter registers where it's important to read/write
:) coherent 16-bit values over an 8-bit bus.
:) 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.

This is true and has been hashed out a few times on this list in the last
year. ;-)

Looks like we have found another entry for the faq. Any one want to write
it up?

Ted Roth

avr-gcc-list at http://avr1.org

reply via email to

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