TC1796
System Units (Vol. 1 of 2)
Interrupt System
User’s Manual
14-27
V2.0, 2007-07
Interrupt, V2.0
14.10.5
NMI Enable
After reset, the NMI is disabled. It must be enabled by the user program when the NMI
handler routine has been setup. The NMI is enabled by setting bit SCU_CON.NMIEN.
Once NMIEN has been set, it cannot be cleared again by software but only by a reset
operation (except Watchdog reset).
14.10.6
NMI Status Register
The source of an NMI trap can be identified through three status bits in NMISR. The bits
in NMISR are read-only; writing to them has no effect.
The CPU detects a one-to-zero transition of the NMI input signal as indicating a NMI trap
event. It then sets NMISR.NMIEXT. If the Watchdog Timer times out, it sets
NMISR.NMIWDT. If the PLL loses its clock signal, it sets NMISR.PLL.
The bits in NMISR are OR-ed together to generate an NMI trap request to the CPU. If
one of the NMISR bits is newly asserted while another bit is set, no new NMI trap request
is generated. All flags are cleared automatically after a read of NMISR. Therefore, after
reading NMISR, the NMI TSR must check all bits in NMISR to determine whether there
have been multiple causes of an NMI trap.
NMISR
NMI Status Register
(F000002C
H
)
Reset Value: 0000 0000
H
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
0
r
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
NMI
PER
NMI
WDT
NMI
PLL
NMI
EXT
r
rh
rh
rh
rh
Field
Bits
Type
Description
NMIEXT
0
rh
External NMI Flag
This flag indicates whether or not an external NMI
request has occurred.
0
B
No external NMI request has occurred.
1
B
An external NMI request has been detected.