Specifications
Modifying the Configuration File
6-4
7) Click the + sign next to the SWI manager. A SWI object called PRD_swi
was added automatically. This software interrupt executes periodic
functions at run time. Therefore, all PRD functions are called within the
context of a software interrupt and can yield to hardware interrupts. In
contrast, CLK functions run in the context of a hardware interrupt. (The
KNL_swi object runs a function that runs the TSK manager. See the
TMS320C6000 DSP/BIOS User’s Guide
and the online help for
information about tasks, which are not used in this tutorial.)
8) Click the + sign next to the CLK manager. Notice that the CLK object
called PRD_clock runs a function called PRD_F_tick. This function
causes the DSP/BIOS system clock to tick (by calling the PRD_tick API
function) and the PRD_swi software interrupt to be posted if any PRD
functions need to run. PRD_swi runs the functions for all the PRD objects
whose period has elapsed.
9) Right click on the PRD manager, and choose Properties from the pop-up
menu. The PRD manager has a property called Use CLK Manager to
drive PRD. Make sure this box is checked for this example.
In your own projects, if you remove the check mark from this box, the
PRD_clock object would be deleted automatically. Your program could
then call PRD_tick from some other event, such as a hardware interrupt,
to drive periodic functions.
10) Recall that the processing_SWI object has a mailbox value of 10 and that
the mailbox value is decremented by the dataIO_CLK object, which runs
every millisecond. As a result, the processing_SWI runs its function every
10 milliseconds. In contrast, the loadchange_PRD object should run its
function every 2 milliseconds.
11) Choose File
→
Close. You are asked whether you want to save your
changes to volume.cdb. Click Yes. Saving this file also generates
volumecfg.cmd, volumecfg.s62, and volumecfg.h62.
12) Choose Project
→
Rebuild All or click the (Rebuild All) toolbar button.