Renesas 70 Manual De Usuario

Descargar
Página de 162
Chapter 3 Introduction to MR308 
   
- 49 - 
3.5.11 
Cyclic Handler Function 
The cyclic handler is a time event handler that is started every startup cycle after a specified startup phase has 
elapsed.  
The cyclic handler may be started with or without saving the startup phase. In the former case, the cyclic han-
dler is started relative to the point in time at which it was generated. In the latter case, the cyclic handler is 
started relative to the point in time at which it started operating. Figure 3.39 anFigure 3.40 show typical opera-
tions of the cyclic handler. 
If the startup cycle is shorter than the time tick interval, the cyclic handler is started only once every time tick 
supplied (processing equivalent to isig_tim). For example, if the time tick interval is 10 ms and the startup cycle 
is 3 ms and the cyclic handler has started operating when a time tick is supplied, then the cyclic handler is 
started every time tick. 
 
Cyclic handler 
created 
Activation 
phase 
Activation 
cycle 
Activation 
cycle 
Activation 
cycle 
Activation 
cycle 
Handler does 
not start 
Handler does 
not start 
Start operating
Stop operating 
Handler does 
not start 
Handler starts
Handler starts
 
Figure 3.39 Cyclic handler operation in cases where the activation phase is saved 
 
Cyclic handler 
created 
Activation 
phase 
Activation 
cycle 
Activation 
cycle 
Activation 
cycle 
Activation 
cycle 
Handler does 
not start 
Handler does 
not start 
Start operating
Stop operating 
Handler does 
not start 
Handler starts
Handler starts 
 
Figure 3.40 Cyclic handler operation in cases where the activation phase is not saved 
• 
Start Cyclic Handler Operation (sta_cyc, ista_cyc) 
Causes the cyclic handler with the specified ID to operational state. 
• 
Stop Cyclic Handler Operation (stp_cyc, istp_cyc) 
Causes the cyclic handler with the specified ID to non-operational state. 
• 
Reference Cyclic Handler Status (ref_cyc, iref_cyc) 
Refers to the status of the cyclic handler. The operating status of the target cyclic handler and the re-
maining time before it starts next time are inspected.