Notes On Rewriting Port Mode Registers - Renesas F-ZTAT H8 Series Hardware Manual

8-bit single-chip microcomputer
Hide thumbs Also See for F-ZTAT H8 Series:
Table of Contents

Advertisement

3. Exception Handling
SP
SP set to H'FEFF
Legend:
PC
:
Upper byte of program counter
H
PC
:
Lower byte of program counter
L
R1L:
General register R1L
SP:
Stack pointer
Figure 3.6 Operation when Odd Address Is Set in SP
When CCR contents are saved to the stack during interrupt exception handling or restored when
RTE is executed, this also takes place in word size. Both the upper and lower bytes of word data
are saved to the stack; on return, the even address contents are restored to CCR while the odd
address contents are ignored.
3.4.2

Notes on Rewriting Port Mode Registers

When a port mode register is rewritten to switch the functions of external interrupt pins, the
following points should be observed.
When an external interrupt pin function is switched by rewriting the port mode register that
controls these pins (IRQ
may be set to 1 at the time the pin function is switched, even if no valid interrupt is input at the
pin. Be sure to clear the interrupt request flag to 0 after switching pin functions. Table 3.5 shows
the conditions under which interrupt request flags are set to 1 in this way.
Note: * Applies to the H8/3857 Group; not provided in the H8/3854 Group.
Rev.3.00 Jul. 19, 2007 page 90 of 532
REJ09B0397-0300
SP
BSR instruction
Stack accessed beyond SP
, IRQ
, IRQ
*, IRQ
4
3
2
PC
SP
H
PC
L
MOV. B R1L, @–R7
, IRQ
, and WKP
to WKP
1
0
7
R1L
PC
L
Contents of PC are lost
H
), the interrupt request flag
0
H'FEFC
H'FEFD
H'FEFF

Advertisement

Table of Contents
loading

Table of Contents