Download Chapter 1 Contents

Transcript
executing, Key_1 execution is temporarily interrupted and the Key_2 routine is
executed. When Key_2 is finished, Key_1 resumes execution where it was
temporarily interrupted. This is because softkey k2 was assigned a higher software
priority than k1.
Figure 5-15. Higher Software Priority Takes Precedence
In contrast, Figure 5-16 shows a typical sequence of actions when k1 is pressed
after k2 is pressed. In this case, Key_2 finishes execution before executing Key_1.
The event of pressing k1 is logged but not serviced until the routine with higher
software priority completes.
Figure 5-16. Lower Software Priority Event Must Wait
Changing System Priority
The system priority assigned to an executing service routine is set by the software
priority of the event or interrupt which caused the branch to the service routine. For
example, if an event has software priority 5, the service routine has system priority
System Controller Mode Operation 5-43