CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Enough stack space

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
xpercad
Guest







Enough stack space
PostPosted: Sat Jun 19, 2004 11:17 am     Reply with quote

Hi Group,

In the August 2002 manual in the Common Questions and Answers section for the What are the restrictions on function calls from an interrupt function ? there is mention that the programmer MUST ensure there will be enough stack space. It also mentions that this can be checked on top of the list file and it should be less than 9.

In the July 2003 manual there is no longer mention concerning this issue (stack less than 9). I am currently working with release 3.180 and PIC18F452 and the list file reads Stack: 9 worst case (7 in main + 2 for interrupts). Is this something I should worry about ???

Thanks in advance,

Aaron
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

Stack Size
PostPosted: Sat Jun 19, 2004 12:57 pm     Reply with quote

According to the MICROCHIP DATA SHEETS, in the 16F series (16F877 for example) the stack size is limited 8.

In the 18F series the stack size is 31, so, in answer to your question, NO a stack depth of 9 on the 18F452 is not a problem.

The message "Stack: 9 worst case (7 in main + 2 for interrupts)" simply gives the greatest possible stack usage scenario and is not meant to imply "worst" in a bad code programming sense.
xpercad
Guest







PostPosted: Mon Jun 21, 2004 7:19 am     Reply with quote

Thanks a lot dyeatman !!!! Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group