English
Language : 

UPD784938 Datasheet, PDF (542/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 23 INTERRUPT FUNCTIONS
23.3.5 Watchdog timer mode register (WDM)
The PRC bit of WDM specifies the priority of NMI pin input non-maskable interrupts and watchdog timer overflow non-
maskable interrupts.
WDM can be written to only by a dedicated instruction. This dedicated instruction, MOV WDM, #byte, has a special
code configuration (4 bytes), and a write is not performed unless the 3rd and 4th bytes of the operation code are mutual
complements of 1.
If the 3rd and 4th bytes of the operation code are not complements of 1, a write is not performed and an operand error
interrupt is generated. In this case, the return address saved in the stack area is the address of the instruction that was
the source of the error, and thus the address that was the source of the error can be identified from the return address saved
in the stack area.
If recovery from an operand error is simply performed by means of an RETB instruction, an endless loop will result.
As an operand error interrupt is only generated in the event of an inadvertent program loop (with the NEC assembler,
RA78K4, only the correct dedicated instruction is generated when MOV WDM, #byte is written), system initialization should
be performed by the program.
Other write instructions (MOV WDM, A, AND WDM, #byte instruction, SET1 WDM.7, etc.) are ignored and do not perform
any operation. That is, a write is not performed to the WDM, and an interrupt such as an operand error interrupt is not
generated.
WDM can be read at any time by a data transfer instruction.
RESET input clears WDM to 00H.
Figure 23-5. Watchdog Timer Mode Register (WDM) Format
7
6
WDM RUN 0
5
4
3
2
1
0 Address After reset R/W
0 PRC 0 WDI2 WDI1 0 0FFC2H
00H
R/W
See Figure 13-2 in CHAPTER 13 WATCHDOG
TIMER FUNCTION for details.
PRC Watchdog Timer Interrupt Request Priority
Specification
0 Watchdog timer interrupt request <
NMI pin input interrupt request
1 Watchdog timer interrupt request >
NMI pin input interrupt request
Caution The watchdog timer mode register (WDM) can only be written to with a dedicated instruction (MOV
WDM, #byte).
542
Preliminary User’s Manual U13987EJ1V0UM00