Interrupts; Reading Address 00000; Setting The Sp; Changing The Interrupt Generation Factor - Renesas M16C/26A Series Hardware Manual

16-bit single-chip microcomputer m16c family / m16c/tiny series
Hide thumbs Also See for M16C/26A Series:
Table of Contents

Advertisement

M
1
6
C
2 /
6
A
G
o r
u
p
(
M
1
6

19.5 Interrupts

19.5.1 Reading address 00000

Do not read the address 00000
reads interrupt information (interrupt number and interrupt request priority level) from the address
00000
during the interrupt sequence. At this time, the IR bit for the accepted interrupt is cleared to "0".
16
If the address 00000
among the enabled interrupts is cleared to "0". This causes a problem that the interrupt is canceled, or an
unexpected interrupt request is generated.

19.5.2 Setting the SP

Set any value in the SP(USP, ISP) before accepting an interrupt. The SP(USP, ISP) is cleared to '0000
after reset. Therefore, if an interrupt is accepted before setting any value in the SP(USP, ISP), the pro-
gram may go out of control.
_______
19.5.3 The NMI Interrupt
_______
1. The NMI interrupt is invalid after reset. The NMI interrupt becomes effective by setting to "1" the PM24
bit in the PM2 register. Set the PM24 bit to "1" when a high-level signal ("H") is applied to the NMI pin.
If the PM24 bit is set to "1" when a low-level signal ("L") is applied, NMI interrupt is generated. Once NMI
interrupt is enabled, it will not be disabled unless a reset is applied.
2. The input level of the NMI pin can be read by accessing the P8_5 bit in the P8 register.
3. When selecting NMI function, stop mode cannot be entered into while input on the NMI pin is low. This
is because while input on the NMI pin is low the CM10 bit in the CM1 register is fixed to "0".
4. When selecting NMI function, do not go to wait mode while input on the NMI pin is low. This is because
when input on the NMI pin goes low, the CPU stops but CPU clock remains active; therefore, the current
consumption in the chip does not drop. In this case, normal condition is restored by an interrupt gener-
ated thereafter.
5. When selecting NMI function, the low and high level durations of the input signal to the NMI pin must
each be 2 CPU clock cycles + 300 ns or more.
6. When using the NMI interrupt for exiting stop mode, set the NDDR register to "FF
debounce filter) before entering stop mode.

19.5.4 Changing the Interrupt Generation Factor

If the interrupt generate factor is changed, the IR bit in the interrupt control register for the changed
interrupt may inadvertently be set to "1" (interrupt requested). If you changed the interrupt generate factor
for an interrupt that needs to be used, be sure to clear the IR bit for that interrupt to "0" (interrupt not
requested).
"Changing the interrupt generate factor" referred to here means any act of changing the source, polarity
or timing of the interrupt assigned to each software interrupt number. Therefore, if a mode change of any
peripheral function involves changing the generate factor, polarity or timing of an interrupt, be sure to
clear the IR bit for that interrupt to "0" (interrupt not requested) after making such changes. Refer to the
description of each peripheral function for details about the interrupts from peripheral functions.
Figure 19.2 shows the procedure for changing the interrupt generate factor.
R
e
. v
2
0 .
0
F
e
b
1 .
, 5
2
0
0
7
R
E
J
0
9
B
0
2
0
2
0 -
2
0
0
C
2 /
6
, A
M
1
6
C
2 /
6
, B
M
1
6
16
in a program. When a maskable interrupt request is accepted, the CPU
16
is read in a program, the IR bit for the interrupt which has the highest priority
16
_______
_______
_______
_______
_______
_______
_______
page 304
f o
3
2
9
C
2 /
6
) T
_______
_______
_______
_______
" (disable digital
16
19. Usage Notes
'
16
_______
_______
_______

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/26aM16c/26bM16c/26t

Table of Contents