Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 95

Controller module
Table of Contents

Advertisement

CCPU_EntryWDTInt
This function registers a routine to be called when a user WDT error interrupt occurs.
Format
short CCPU_EntryWDTInt (short sType, CCPU_FUNCPTR pFuncPtr)
Argument
Argument
Name
sType
WDT type
pFuncPtr
Registered routine
• The data type of the registered routine (pFuncPtr) is defined as void type in the header file, "CCPUFunc.h".
Description
• This function registers a routine to call when a user WDT error interrupt of C Controller module occurs.
• Specify the routine to be registered to the registered routine (pFuncPtr).
• When this function is executed several times, the last registered routine will be in effect.
• The routine registered with this function is executed as an interrupt service routine (ISR) when a user WDT error occurs. (If
the CCPU_ResetWDT function is not executed within the time interval specified in the CCPU_StartWDT function, the WDT
error interrupt will occur.)
Precautions
• The registered routine is not executed while the operating system is in the interrupt-disabled state.
• For processing a routine to be registered in the registered routine (pFuncPtr), note the following:
A routine to be registered must not have an argument. (Do not pass an argument from an interrupt.)
When registering a routine, observe the considerations on the interrupt service routine (ISR).
Register minimal processing of a routine so that the processing time is as short as possible.
Only the C Controller module dedicated function for ISR can be used for a routine to be registered. Do not use any other
function. (An error of a function to be registered is not checked.)
WARNING
When a routine that does not observe the considerations on interrupt service routine (ISR) is registered, the operating system
may be runaway.
Make sure to use the routine after carefully verifying the operation and performance.
Return value
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following:
Page 225 ERROR CODE LIST
Relevant functions
• Page 138 CCPU_StartWDT
• Page 128 CCPU_ResetWDT
• Page 139 CCPU_StopWDT
Description
Specify the WDT type.
(If reserve is specified, an error is returned.)
• 0: User WDT
• Others: Reserved
Specify a routine to be registered.
(The routine is deregistered by specifying NULL.)
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
IN
93

Advertisement

Table of Contents
loading

Table of Contents