跳转到主内容
Knowledgebase
Home
Renesas Electronics China - Knowledgebase

Problem Caused by Clearing of Watchdog Timer During Timer Interrupts

Last Updated:05/25/2018

Question:

We are using a watchdog timer as a measure to prevent the CPU from getting out of control. To simplify the program, we clear the watchdog timer during timer interrupts, which occur regularly. Is there any problem in doing this?

Answer:

We cannot recommend a method that clears the watchdog timer during a timer interrupt.
With this method, if the main routine goes out of control, the watchdog timer will end up being cleared as long as a timer interrupt is accepted, and consequently the runaway situation cannot be detected.

To more precisely detect a runaway situation, provide individual flags in the areas that must be processed within a specified amount of time, and once these are processed, set those flags.
Consider using a program that runs regularly, such as timer interrupt, to check these flags, and clear the watchdog timer if all of the required flags are set.

Suitable Products
RL78/G10
RL78/G11
RL78/G12
RL78/G13
RL78/G14
RL78/G1A
RL78/G1C
RL78/G1D
RL78/G1E
RL78/G1F
RL78/G1G
RL78/G1H
RL78/I1A
RL78/I1C
RL78/I1D
RL78/I1E
RL78/L12
RL78/L13
RL78/L1A
RL78/L1C
78K Family