Mitsubishi Electric MELIPC MI5000 Series Programming Manual page 76

Vxworks
Hide thumbs Also See for MELIPC MI5000 Series:
Table of Contents

Advertisement

CCPU_SysClkRateSet
Saves a specified system clock rate to MRAM.
Format
short CCPU_SysClkRateSet(short sTicks, short* psRestart)
Argument
Argument
sTicks
psRestart
Description
• Saves a system clock rate specified with the clock rate (sTicks) to MRAM.
• The specified system clock rate will be enabled after restarting a MELIPC.
• When the output to the restart necessity flag (psRestart) is '0' (restart is not required), continue the application processing.
• When the output to the restart necessity flag (psRestart) is '1' (restart is required), stop the application processing, and
restart the MELIPC (turn the power supply OFF and ON).
• For details on the system clock rate, refer to the VxWorks Manual.
Precautions
• Execute this function only once after the MELIPC is started.
If this function is executed again when specifying the same clock rate as the first time, the restart necessity flag (psRestart)
will be '0' (restart is not required) regardless of the system clock rate value in operation.
• Use this function when changing the system clock rate.
If the sysClkRateSet function of VxWorks is used, the operation of VxWorks will be unstable.
Return value
Return value
0(0000H)
-320(FEC0H)
For details on error codes, refer to the following section.
Page 116 Function error codes
Relevant function
Page 73 CCPU_SysClkRateGet
3 DETAILS OF FUNCTIONS
74
3.1 C Controller Module Dedicated Functions
Name
Clock rate
Restart necessity flag
Description
Normal
Clock rate specification error
Description
Specify the system clock rate in the unit of clock frequency (Hz) per one
second.
• 0: Default value (60 Hz)
• 60 to 1000: Specified clock rate value
Stores the necessity to restart a MELIPC after the execution of this function.
(When 'NULL' is specified, the restart necessity flag is not stored.)
• 0: Restart is not required. (C Controller module has already been running
at the specified clock rate.)
• 1: Restart is required. (C Controller module operates at the specified
clock rate after restarting it.)
IN/OUT
IN
OUT

Advertisement

Table of Contents
loading

Table of Contents