Section 5 Exception Handling
Rev. 1.00 Oct. 01, 2007 Page 135 of 1956
REJ09B0256-0100
5.7 Usage
Notes
(1) Return from exception handling
1. Check the BL bit in SR with software. If SPC and SSR have been saved to memory, set the
BL bit in SR to 1 before restoring them.
2. Issue an RTE instruction. When RTE is executed, the SPC contents are saved in PC, the SSR
contents are saved in SR, and branch is made to the SPC address to return from the exception
handling routine.
(2) If an exception or interrupt occurs when BL bit in SR = 1
1. Exception
When an exception other than a user break occurs, a manual reset is executed. The value in
EXPEVT at this time is H'00000020; the SPC and SSR contents are undefined.
2. Interrupt
If an ordinary interrupt occurs, the interrupt request is held pending and is accepted after the
BL bit in SR has been cleared to 0 by software. If a nonmaskable interrupt (NMI) occurs, it can
be held pending or accepted according to the setting made by software.
In sleep or standby mode, however, an interrupt is accepted even if the BL bit in SR is set to 1.
(3) SPC when an exception occurs
1. Re-execution type exception
The PC value for the instruction at which the exception occurred is set in SPC, and the
instruction is re-executed after returning from the exception handling routine. If an exception
occurs in a delay slot instruction, however, the PC value for the delayed branch instruction is
saved in SPC regardless of whether or not the preceding delay slot instruction condition is
satisfied.
2. Completion type exception or interrupt
The PC value for the instruction following that at which the exception occurred is set in SPC.
If an exception occurs in a branch instruction with delay slot, however, the PC value for the
branch destination is saved in SPC.
(4) RTE instruction delay slot
1. The instruction in the delay slot of the RTE instruction is executed only after the value saved
in SSR has been restored to SR. The acceptance of the exception related to the instruction
access is determined depending on SR before restoring, while the acceptance of other
exceptions is determined depending on the processing mode by SR after restoring or the BL
Содержание SH7763
Страница 2: ...Rev 1 00 Oct 01 2007 Page ii of lxvi ...
Страница 122: ...Section 2 Programming Model Rev 1 00 Oct 01 2007 Page 56 of 1956 REJ09B0256 0100 ...
Страница 144: ...Section 3 Instruction Set Rev 1 00 Oct 01 2007 Page 78 of 1956 REJ09B0256 0100 ...
Страница 170: ...Section 4 Pipelining Rev 1 00 Oct 01 2007 Page 104 of 1956 REJ09B0256 0100 ...
Страница 282: ...Section 7 Caches Rev 1 00 Oct 01 2007 Page 216 of 1956 REJ09B0256 0100 ...
Страница 378: ...Section 9 Interrupt Controller INTC Rev 1 00 Oct 01 2007 Page 312 of 1956 REJ09B0256 0100 ...
Страница 514: ...Section 12 DDR SDRAM Interface DDRIF Rev 1 00 Oct 01 2007 Page 448 of 1956 REJ09B0256 0100 ...
Страница 630: ...Section 13 PCI Controller PCIC Rev 1 00 Oct 01 2007 Page 564 of 1956 REJ09B0256 0100 ...
Страница 686: ...Section 14 Direct Memory Access Controller DMAC Rev 1 00 Oct 01 2007 Page 620 of 1956 REJ09B0256 0100 ...
Страница 710: ...Section 16 Clock Pulse Generator CPG Rev 1 00 Oct 01 2007 Page 644 of 1956 REJ09B0256 0100 ...
Страница 732: ...Section 17 Watchdog Timer and Reset WDT Rev 1 00 Oct 01 2007 Page 666 of 1956 REJ09B0256 0100 ...
Страница 752: ...Section 18 Power Down Mode Rev 1 00 Oct 01 2007 Page 686 of 1956 REJ09B0256 0100 ...
Страница 772: ...Section 19 Timer Unit TMU Rev 1 00 Oct 01 2007 Page 706 of 1956 REJ09B0256 0100 ...
Страница 824: ...Section 21 Compare Match Timer CMT Rev 1 00 Oct 01 2007 Page 758 of 1956 REJ09B0256 0100 ...
Страница 1060: ...Section 23 Gigabit Ethernet Controller GETHER Rev 1 00 Oct 01 2007 Page 994 of 1956 REJ09B0256 0100 ...
Страница 1062: ...Section 24 IP Security Accelerator SECURITY Rev 1 00 Oct 01 2007 Page 996 of 1956 REJ09B0256 0100 ...
Страница 1124: ...Section 26 I 2 C Bus Interface IIC Rev 1 00 Oct 01 2007 Page 1058 of 1956 REJ09B0256 0100 ...
Страница 1184: ...Section 27 Serial Communication Interface with FIFO SCIF Rev 1 00 Oct 01 2007 Page 1118 of 1956 REJ09B0256 0100 ...
Страница 1350: ...Section 30 SIM Card Module SIM Rev 1 00 Oct 01 2007 Page 1284 of 1956 REJ09B0256 0100 ...
Страница 1484: ...Section 33 Audio Codec Interface HAC Rev 1 00 Oct 01 2007 Page 1418 of 1956 REJ09B0256 0100 ...
Страница 1560: ...Section 35 USB Host Controller USBH Rev 1 00 Oct 01 2007 Page 1494 of 1956 REJ09B0256 0100 ...
Страница 1720: ...Section 37 LCD Controller LCDC Rev 1 00 Oct 01 2007 Page 1654 of 1956 REJ09B0256 0100 ...
Страница 2025: ......
Страница 2026: ...SH7763 Hardware Manual ...