Skip to main content
Renesas Electronics America - Knowledgebase

Why does the watchdog interrupt occurs?

Latest Updated:04/01/2006


When the watchdog interrupt occurred, I calculated the memory checksum and restarted from the cstart address if there was an error.
However, after restarting, interrupts could no longer be acknowledged.
I checked both the PSW and mask registers, but interrupts were in the enabled state.


Are you perhaps using a nonmaskable interrupt as the watchdog interrupt?
In this case, the system simply restarts from the cstart address, and the next operation executed is nonmaskable interrupt servicing.
Consequently, interrupts cannot be acknowledged.

To avoid this, you must execute the RETI instruction and exit from nonmaskable interrupt servicing.
Specifically, load the PSW and branch destination address (cstart in this case) onto the stack and branch to the branch destination address using the RETI instruction.

In the following example, the vector is read from address 0 and the program branches there.

    MOV     PSW,#02H ; Set dummy PSW
    MOVW    AX,!0    ; Reset vector value loading.
    PUSH    PSW
    PUSH    AX       ; Stack for RETI prepared
    RETI             ; Branch to reset vector
Suitable Products
78K Family