Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Stack Pointer - documentation conflict?

2006-04-05 by Henry Carl Ott

At 03:43 PM 4/5/2006, you wrote:
>However, some of the most recent Atmel datasheets (for example
>doc2586.pdf, 2586F dated 4/06 on the tiny 25/45/85) lead me to believe
>that Atmel has gone the way of initializing the stack pointer to the top
>of SRAM at reset/powerup time.  In this doc (2586F), paragraph 5.6.1
>shows the "Initial Value" to be "RAMEND".
>
>This is great if true, BUT in the paragraph above it (par. 5.6) it says
>"This Stack space in the data SRAM must be defined by the program before
>any subroutine calls are executed or interrupts are enabled. The Stack
>Pointer must be set to point above 0x60."


The newer avr parts init the stack at ramend. Atmel has a tendency to copy 
and paste their data sheets, and these kind of conflicts creep in.
   The 0x60 is a bit of a giveaway, I'm pretty sure ram STARTS at 0x100 on 
most of the newer chips with an expanded i/o space.



carl

--------------------------------------------------------
Henry Carl Ott   N2RVQ
http://users.rcn.com/carlott/
--------------------------------------------------------

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.