Download RI78V4 Real-Time Operating System User`s Manual: Coding
Transcript
RI78V4
7.5.5
CHAPTER 7 TIME MANAGEMENT FUNCTIONS
Start cyclic handler operation
Moving to the operational state (STA state) is implemented by issuing the following service call from the processing
program.
- sta_cyc
This service call moves the cyclic handler specified by parameter cycid from the non-operational state (STP state) to
operational state (STA state).
As a result, the target cyclic handler is handled as an activation target of the RI78V4.
The following describes an example for coding this service call.
#pragma
rtos_task
func_task
#include
#include
<kernel.h>
<kernel_id.h>
void
func_task ( VP_INT exinf )
{
ID
cycid = ID_cycA;
/*Standard header file definition*/
/*System information header file definition*/
/*Declares and initializes variable*/
/* ............ */
sta_cyc ( cycid );
/*Start cyclic handler operation*/
/* ............ */
}
Note
This service call does not perform queuing of start requests. If the target cyclic handler has been moved to
the operational state (STA state), only activation cycle re-set processing is executed.
The relative time interval from the output of this service call until the first activation request is output is
always the activation phase (activation cycle cyctim) using the output of this service call as the reference
point.
[ Cyclic handler activation image ]
Start
Start
Start
cyctim
cyctim
cyctim
cyctim
cyctim
Start
Start
cyctim
cyctim
cyctim
Activation enabled by sta_cyc
Activation enabled by sta_cyc
Activation disabled by stp_cyc
Creation (TA_STA attribute)
R20UT0511EJ0101 Rev.1.01
Apr 01, 2012
Page 77 of 272