Specifications
Modifying Software Interrupt Priorities
Analyzing Real-Time Behavior
6-11
6.5 Modifying Software Interrupt Priorities
To understand why the program is not meeting its real-time deadline, you
need to examine the priorities of the software interrupt threads.
1) Select Debug
→
Halt to halt the target.
2) In the Project View, double-click on the volume.cdb file to open it.
3) Highlight the SWI manager.
Notice the SWI object
priorities shown in the right
half of the window. (The
KNL_swi object runs a
function that runs the TSK
manager. This object must
always have the lowest SWI
priority. Tasks are not used in
this lesson.)
Because the PRD_swi and
processing_SWI objects both
have the same priority level,
the PRD_swi cannot preempt
the processing_SWI while it
is running.
The processing_SWI needs
to run once every 10
milliseconds and PRD_swi needs to run every 2 milliseconds. When the
load is high, processing_SWI takes longer than 2 milliseconds to run, and
so it prevents PRD_swi from meeting its real-time deadline.
4) To correct this problem, use
your mouse to select and drag
PRD_swi to a higher priority
level, such as Priority 2.
5) Select File
→
Save to save
your changes.
6) Select File
→
Close to close
volume.cdb.
7) Choose Project
→
Build or click
the (Incremental Build) toolbar button.
8) Select File
→
Reload Program.