Renesas M3T-MR100 用户手册

下载
页码 304
   
- 34 - 
 
3.7  Stacks 
3.7.1 
System Stack and User Stack 
The MR100 provides two types of stacks: system stack and user stack. 
• 
User Stack 
One user stack is provided for each task. Therefore, when writing applications with the MR100, it is necessary to 
furnish the stack area for each task. 
• 
System Stack 
This stack is used within the MR100 (during service call processing). When a service call is issued from a task, 
the MR100 switches the stack from the user stack to the system stack (See Figure 3.25). 
The system stack use the interrupt stack(ISP). 
 
 
Task 
MR100 service call processing 
User Stack 
User Stack 
System Stack 
Save Registers
Stack switching 
Service call
processing 
Task selection
Stack switching
Restore Registers 
XXX_XXX( ) 
 
Figure 3.25 System Stack and User Stack 
Switchover from user stack to system stack occurs when an interrupt of vector numbers 0 to 127 is generated. Consequently, 
all stacks used by the interrupt handler are the system stack.