Yahoo Groups archive

AVR-Chat

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

Thread

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

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

2006-04-05 by Henry Carl Ott

At 06:03 PM 4/5/2006, you wrote:

>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.
>
>
>Hmm.. Do we know which chips?
>I don't like exceptions. :(  It's neat, but they COULD make this behaviour 
>retroactive through all chips. I can't see why anyone would be bothered. 
>If you're writing code that depends on SP=0000 on boot, that's pretty scary!

Perhaps not an exception, just a new feature with the new silicon.

  But I'd guess it's on a chip by chip basis. The mega 48/88/168s that I'm 
playing with these days set the SP to RAMEND  (just tested on a m168 
hardware to be sure). The mega8s always used to set it to 0x00.

I don't really trust it myself, and I'll be setting the SP manually until I 
really really need those last couple of program words.
   One does wish the documentation was more consistent.



carl

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

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.