Download M32150 datasheet

Transcript
EIT
4.6 Save and return of PC and PSW
4.6 Save and return of PC and PSW
Operation is as follows when the EIT event occurs and when the RTE instruction is executed.
(1) Hardware pre-processing when the EIT event occurs
➀ SM, IE and C bits saving
The SM, IE and C bits are saved in the PSW register.
BSM ‹
SM
BIE ‹
IE
BC ‹
C
➁ SM, IE and C bits updating
The SM, IE and C bits are updated in the PSW register.
SM ‹
not changed (RIE, AE, TRAP),
or cleared to "0" (SBI, EI, RI)
IE
‹
cleared to "0"
C
‹
cleared to "0"
➂ PC saving
The PC is saved.
BPC ‹
PC
Vector address setting
Vector address is set in the PC.
Processing switches to the EIT handler, after branching to the EIT vector and executing the branch
instruction (BRA instruction) stored there.
(2) Hardware post-processing when the RTE instruction is executed
1 BSM, BIE and BC bits restoring
The BSM, BIE and BC bits are returned from the PSW register.
SM ‹
BSM
IE
‹
BIE
C
‹
BC
2 BPC value restoring
The BPC value is returned from the BPC.
PC ‹
BPC
Note: After executing the RTE instruction, the values of the BSM, BIE and BC bits in the BPC and the PSW
register are undefined.
M32150F4TFP User's Manual
4-7