tmp86fh09amg TOSHIBA Semiconductor CORPORATION, tmp86fh09amg Datasheet - Page 47

no-image

tmp86fh09amg

Manufacturer Part Number
tmp86fh09amg
Description
8 Bit Microcontroller Tlcs-870/c Series
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
tmp86fh09amg(C
Manufacturer:
TOSHIBA/东芝
Quantity:
20 000
Part Number:
tmp86fh09amg(C,ZHZ
Manufacturer:
TOSHIBA/东芝
Quantity:
20 000
Example 1 :Returning from address trap interrupt (INTATRAP) service program
Example 2 :Restarting without returning interrupt
3.5
3.5.1
(INTSW is highest prioritized interrupt).
Software Interrupt (INTSW)
Executing the SWI instruction generates a software interrupt and immediately starts interrupt processing
Use the SWI instruction only for detection of the address error or for debugging.
PINTxx:
PINTxx:
restarting address, during interrupt service program.
(In this case, PSW (Includes IMF) before interrupt acceptance is discarded.)
rupt can be accepted immediately after the interrupt return instruction is executed.
ory address during single chip mode. Code FFH is the SWI instruction, so a software interrupt is generated
and an address error is detected. The address error detection range can be further expanded by writing FFH
to unused areas of the program memory. Address trap reset is generated in case that an instruction is fetched
from RAM, DBR or SFR areas.
Address error detection
Note 1: It is recommended that stack pointer be return to rate before INTATRAP (Increment 3 times), if return in-
Note 2: When the interrupt processing time is longer than the interrupt request generation time, the interrupt serv-
As for address trap interrupt (INTATRAP), it is required to alter stacked data for program counter (PC) to
Interrupt requests are sampled during the final cycle of the instruction being executed. Thus, the next inter-
FFH is read if for some cause such as noise the CPU attempts to fetch an instruction from a non-existent mem-
Note:If [RETN] is executed with the above data unaltered, the program returns to the address trap area
and INTATRAP occurs again. When interrupt acceptance processing has completed, stacked data
for PCL and PCH are located on address (SP + 1) and (SP + 2) respectively.
terrupt instruction [RETN] is not utilized during interrupt service program under INTATRAP (such as Exam-
ple 2).
ice task is performed but not the main task.
POP
LD
PUSH
(interrupt processing)
RETN
INC
INC
INC
(interrupt processing)
LD
JP
WA
WA, Return Address
WA
SP
SP
SP
EIRL, data
Restart Address
1. Program counter (PC) and program status word
(PSW, includes IMF) are restored from the stack.
2. Stack pointer (SP) is incremented by 3.
[RETI]/[RETN] Interrupt Return
Page 37
; Recover SP by 2
;
; Alter stacked data
; RETURN
; Recover SP by 3
;
;
; Set IMF to “1” or clear it to “0”
; Jump into restarting address
TMP86FH09AMG

Related parts for tmp86fh09amg