66
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
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
• 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
■
Relevant functions
• Page 104 CCPU_StartWDT
• Page 94 CCPU_ResetWDT
• Page 105 CCPU_StopWDT
Argument
Name
Description
IN/OUT
sType
WDT type
Specify the WDT type.
(If reserve is specified, an error is returned.)
• 0: User WDT
• Others: Reserved
IN
pFuncPtr
Registered routine
Specify a routine to be registered.
(The routine is deregistered by specifying NULL.)
IN
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Summary of Contents for MELSEC iQ-R C
Page 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Page 2: ......
Page 201: ...I 199 MEMO ...
Page 203: ...I 201 MEMO ...
Page 207: ......