Rev. 5.00, 09/03, page 85 of 760
Section 4 Exception Handling
4.1
Overview
4.1.1
Features
Exception handling is separate from normal program processing, and is performed by a routine
separate from the normal program. In response to an exception handling request due to abnormal
termination of the executing instruction, control is passed to a user-written exception handler.
However, in response to an interrupt request, normal program execution continues until the end of
the executing instruction. Here, all exceptions other than resets and interrupts will be called
general exceptions. There are thus three types of exceptions: resets, general exceptions, and
interrupts.
4.1.2
Register Configuration
Table 4.1 lists the registers used for exception handling. A register with an undefined initial value
should be initialized by software.
Table 4.1
Register Configuration
Register
Abbr.
R/W
Size
Initial Value
Address
TRAPA exception register
TRA
R/W
Longword
Undefined
H'FFFFFFD0
Exception event register
EXPEVT
R/W
Longword
Power-on reset: H'000
Manual reset: H'020
*
1
H'FFFFFFD4
Interrupt event register
INTEVT
R/W
Longword
Undefined
H'FFFFFFD8
Interrupt event register2
INTEVT2 R
Longword
Undefined
H'04000000
(H'A4000000)
*
2
Notes: 1. H'000 is set in a power-on reset, and H'020 in a manual reset.
2. When address translation by the MMU does not apply, the address in parentheses
should be used.
4.2
Exception Handling Function
4.2.1
Exception Handling Flow
In exception handling, the contents of the program counter (PC) and status register (SR) are saved
in the saved program counter (SPC) and saved status register (SSR), respectively, and execution of
the exception handler is invoked from a vector address. The return from exception handler (RTE)
instruction is issued by the exception handler routine on completion of the routine, restoring the
Summary of Contents for SH7709S
Page 2: ......
Page 44: ...Rev 5 00 09 03 page xliv of xliv ...
Page 62: ...Rev 5 00 09 03 page 18 of 760 ...
Page 128: ...Rev 5 00 09 03 page 84 of 760 ...
Page 146: ...Rev 5 00 09 03 page 102 of 760 ...
Page 224: ...Rev 5 00 09 03 page 180 of 760 ...
Page 246: ...Rev 5 00 09 03 page 202 of 760 ...
Page 266: ...Rev 5 00 09 03 page 222 of 760 ...
Page 370: ...Rev 5 00 09 03 page 326 of 760 ...
Page 432: ...Rev 5 00 09 03 page 388 of 760 ...
Page 532: ...Rev 5 00 09 03 page 488 of 760 ...
Page 598: ...Rev 5 00 09 03 page 554 of 760 ...
Page 630: ...Rev 5 00 09 03 page 586 of 760 ...
Page 656: ...Rev 5 00 09 03 page 612 of 760 ...
Page 684: ...Rev 5 00 09 03 page 640 of 760 ...
Page 700: ...Rev 5 00 09 03 page 656 of 760 ...
Page 758: ...Rev 5 00 09 03 page 714 of 760 ...
Page 807: ...SH7709S Group Hardware Manual REJ09B0081 0500O ADE 602 250C ...