[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] Question on stack size in ATmega128 and Errors in iom
From: |
E. Weddington |
Subject: |
RE: [avr-libc-dev] Question on stack size in ATmega128 and Errors in iom128.h |
Date: |
Mon, 09 Dec 2002 16:43:25 -0700 |
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Curtis, Ron Sent: 9. december 2002 19:01 To:
> 'address@hidden' Subject: [avr-libc-dev] Question on stack
> size in ATmega128 and Errors iniom128.h
>
> Hi-
>
> Question on ATmega128:
> Why is the stack initialized to 0x10FF instead of 0x0FFF?
I believe I saw an answer to your post about this in the AVRFreaks
GCC forum.
> Also, I had to make the following corrections to iom128.h to be
> consistent in my code.
>
> /* USART Status Register A ERROR RDC
> #define RXC 7
> #define TXC 6
> #define UDRE 5
> #define FE 4
> #define OVR 3 This definition differs from the databook
> #*/
> /*definition to avoid problems with the OR instruction */
>
> /* UCSR0A correction, RDC 12/2/02*/
> #define RXC0 7
> #define TXC0 6
> #define UDRE0 5
> #define FE0 4
> #define OVR0 3
> #define U2X0 1
> #define MPCM0 0
>
Your correction is incorrect depending upon which version of the
software you're using. The latest from CVS is correct with the
ATmega128 data sheet from Atmel:
http://www.atmel.com/atmel/acrobat/doc2467.pdf
So if you have a later distribution of the software, you might want
to update your project rather than change the header file that comes
with the distribution.
Eric