TSK Module
2-480
same page. Automatically allocating the stack is recommended,
since TSK_create makes sure this condition is satisfied.
Tconf Name: manualStack
Type: Extern
Example:
myTsk.manualStack =
prog.extern("myStack");
❏
Stack size
. Enter the size (in MADUs) of the stack space to allocate
for this task. You must enter the size whether the application
allocates the stack manually or automatically. Each stack must be
large enough to handle normal subroutine calls as well as a single
task preemption context. A task preemption context is the context
that gets saved when one task preempts another as a result of an
interrupt thread readying a higher priority task.
Tconf Name: stackSize
Type: Int16
Example:
myTsk.stackSize = 1024;
❏
System stack size.
This specifies the size (in MADUs) of the task’s
system stack. The sta sysStackSize must be less than or
equal to 0xFFFF. That is, they should be on the same page because
the stack pointer and system stack pointer share the same register
for their upper bits.
Tconf Name: sysStackSize
Type: Int16
Example:
myTsk.sysStackSize = 256;
❏
Stack Memory Segment
. If you set the "Automatically allocate
stack" property to true, specify the memory segment to contain the
stack space for this task.
Tconf Name: stackMemSeg
Type: Reference
Example:
myTsk.stackMemSeg = prog.get("myMEM");
❏
Priority
. The priority level for this task. A priority of -1 causes a task
to be suspended until its priority is raised programmatically.
Tconf Name: priority
Type: EnumInt
Options:
-1, 0, 1 to 15
Example:
myTsk.priority = 1;
Function tab
❏
Task function
. The function to be executed when the task runs. 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 the leading underscore 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. If you compile C programs with the