USBB17RX78K4-XXX NEC Electronics, USBB17RX78K4-XXX Datasheet - Page 40

no-image

USBB17RX78K4-XXX

Manufacturer Part Number
USBB17RX78K4-XXX
Description
78K/4 series realtime OS
Manufacturer
NEC Electronics
Datasheet
4.1.1 sta_tsk (Start Task)
[Function]
[Remarks]
[System call ID number]
[Parameter]
[Return parameter]
[Assembler format]
[C format]
Starts a task by placing it in the READY state from the DORMANT state.
This system call starts the task specified by tskid. As a result, the task enters the READY state from the
DORMANT state. This system call must not be issued to a task that is not in the DORMANT state. If issued,
error code “E_NODMT” is returned.
To start a task for the first time, or to restart a task that has been once terminated, processing is started from
the start address of the task, and the value of the stack pointer is set to the initial value. The values of the
other registers are undefined.
A task to which the “sta_tsk” system call is to be issued enables interrupts. Disable interrupts for each task.
sta_tsk = 0
tskid (Task Identifier)
E_OK
E_NODMT
[Large model]
MOV
MOVW
MOV
CALLT
C register= return parameter
ret = sta_tsk(tskid);
char
bnk0_b, #0
bnk0_up, #tskid
bnk0_d, #tskid
[40H]
:
*tskid;
CHAPTER 4
Task ID (TCB top address)
Normal termination
Specified task is not in DORMANT state
[Small model]
MOV
MOVW
CALLT
C register= return parameter
RX78K/IV SYSTEM CALL LIST
bnk0_b, #0
bnk0_up, #tskid
[40H]
:
- 24 bits (large model)
- 16 bits (small model)
31

Related parts for USBB17RX78K4-XXX