Renesas M3T-MR100 Network Card User Manual


 
264
10. Stack Size Calculation Method
10.1 Stack Size Calculation Method
The MR100 provides two kinds of stacks: the system stack and the user stack. The stack size calculation method differ be-
tween the stacks.
z User stack
This stack is provided for each task. Therefore, writing an application by using the MR100 requires to allocate
the stack area for each stack.
z System stack
This stack is used inside the MR100 or during the execution of the handler.
When a task issues a service call, the MR100 switches the user stack to the system stack. (See Figure
10.1:System
Stack and User Stack)
The system stack uses interrupt stack(ISP).
Register save
Stack switching
Service call
rocessing
Task Selection
Stack switching
Re
g
ister return
XXX_XXX()
MR100 Service Call Processing Position
User Stack
User Stack
System Stack
(interruput stack)
Task
Figure 10.1:System Stack and User Stack
The sections of the system stack and user stack each are located in the manner shown below. However, the diagram shown
below applies to the case where the stack areas for all tasks are located in the stack section during configuration.