Everything

17.5.9 Cyclic handler information

The number of items that can be defined as cycic handler information is limited to one for each ID number.
The following shows the cyclic handler information format.
 CRE_CYC (cycid, { cycatr, exinf, cychdr, cyctim, cycphs });

The items constituting the cyclic handler information are as follows.
1 ) ID number: cycid
Specifies the ID number for a cyclic handler.
A value from 0x1 to 0xff, or a name, can be specified for cycid.
Note When a name is specified, the CF850V4 automatically assigns an ID number.
The CF850V4 outputs the relationship between a name and an ID number to the system information header file in the following format:
 #define cycid   value
2 ) Attribute: cycatr
Specifies the attribute for a cyclic handler.
The keywords that can be specified for cycatr are TA_HLNG, TA_ASM, TA_STA and TA_PHS.
[Coding language]
TA_HLNG: Start a cyclic handler through a C language interface.
TA_ASM: Start a cyclic handler through an assembly language interface.
[Initial activation state]
TA_STA: Cyclic handlers is in an operational state after the creation.
[Activation phase]
TA_PHS: Cyclic handler is activated preserving the activation phase.
Note 1 If specification of TA_STA is omitted, the initial activation state is set to "non-operational state".
Note 2 If specification of TA_PHS is omitted, no activation phase items are saved.
3 ) Extended information: exinf
Specifies the extended information for a cyclic handler.
A value from 0x0 to 0xffffffff, or a symbol name, can be specified for exinf.
Note The target cyclic handler can be manipulated by handling the extended information as if it were a function parameter.
4 ) Start address: cychdr
Specifies the start address for a cyclic handler.
A value from 0x0 to 0xfffffffe (aligned to a 2-byte boundary), or a symbol name, can be specified for cychdr.
Note When a cyclic handler is coded as follows, the symbol name specified for cychdr should be func_cyc.
 #include        <kernel.h>
 #include        <kernel_id.h>
 
 void
 func_cyc ( VP_INT exinf )
 {
         ............
         ............
 
         return;
 }

5 ) Activation cycle: cyctim
Specifies the activation cycle (unit:millisecond) for a cyclic handler.
A value from 0x1 to 0x7fffffff (aligned to "clkcyc" multiple values) can be specified for cyctim.
Note If a value other than an integral multiple of the base clock cycle defined in Basic information is specified for cyctim, the CF850V4 assumes that an integral multiple is specified and performs processing.
6 ) Activation phase: cycphs
Specifies the activation phase (unit:millisecond) for a cyclic handler.
A value from 0x1 to 0x7fffffff (aligned to "clkcyc" multiple values) can be specified for cycphs.
Note 1 In the RI850V4, the initial activation phase means the relative interval from when generation of s cyclic handler is completed until the first activation request is issued.
Note 2 If a value other than an integral multiple of the base clock cycle defined in Basic information is specified for cycphs, the CF850V4 assumes that an integral multiple is specified and performs processing.