SWI Module
2-426
SWI Manager
Properties
The following global property can be set for the SWI module in the SWI
Manager Properties dialog of the DSP/BIOS Configuration Tool or in a
Tconf script:
❏
Object Memory
. The memory segment that contains the SWI
objects.
Tconf Name: OBJMEMSEG
Type: Reference
Example:
bios.SWI.OBJMEMSEG = prog.get("myMEM");
SWI Object Properties
To create a SWI object in a configuration script, use the following syntax.
The Tconf examples that follow assume the object has been created as
shown here.
var mySwi = bios.SWI.create("mySwi");
If you cannot create a new SWI object (an error occurs or the Insert SWI
item is inactive in the DSP/BIOS Configuration Tool), try increasing the
Stack Size property in the MEM Manager Properties before adding a SWI
object or a SWI priority level.
The following properties can be set for a SWI object in the SWI Object
Properties dialog of the DSP/BIOS Configuration Tool or in a Tconf script:
❏
comment
. Type a comment to identify this SWI object.
Tconf Name: comment
Type: String
Example:
mySwi.comment = "my SWI";
❏
function
. The function to execute. If this function is written in C and
you are using the DSP/BIOS Configuration Tool, use a leading
underscore before the C function name. (The DSP/BIOS
Configuration Tool generates assembly code, which must use
leading underscores when referencing C functions or labels.) If you
are using Tconf, do not add an underscore before the function name;
Tconf adds the underscore needed to call a C function from
assembly internally.
Tconf Name: fxn
Type: Extern
Example:
mySwi.fxn = prog.extern("swiFxn");
❏
priority
. This property shows the numeric priority level for this SWI
object. SWIs can have up to 15 priority levels. The highest level is
SWI_MAXPRI (14). The lowest is SWI_MINPRI (0). The priority level
of 0 is reserved for the KNL_swi object, which runs the task
scheduler. Instead of typing a number in the DSP/BIOS
Configuration Tool, you change the relative priority levels of SWI
objects by dragging the objects in the ordered collection view.
Tconf Name: priority
Type: EnumInt
Options:
0 to 14
Example:
mySwi.priority = 1;