
ML62Q1000 Series User's Manual
Chapter 5 Interrupts
FEUL62Q1000
5-47
5.3.5 Flow Charts When Interrupt Level Control Is Enabled
Figure 5-1 shows flow charts of the software interrupt processing when multiple interrupts are disabled and enabled
respectively with the interrupt level control enabled.
When multiple interrupts are enabled, save ELR1, ECSR (not processed for products with 64 Kbytes or less of program
memory) and EPSW1 in the stack (RAM) so that they are not overwritten by the multiple interrupt. In addition, the EI
and DI instructions enable the execution of multiple interrupts due to a high-level maskable interrupt request while
"execution of the target process" is in progress.
If a non-maskable interrupt is occurred while the maskable interrupt is being processed, the transition to non-maskable
interrupt takes place regardless of multiple interrupts enabled/disabled and the execution of the EI instruction.
Figure 5-1 Maskable Interrupt Processing Flow
[Note]
Ÿ
For processing of non-maskable interrupt, follow the flow chart "When multiple interrupts are enabled".
Registers that should be saved in the stack are ELR2 and EPSW2.
Ÿ
When programming in C, it is not required to write program codes for saving/restoring registers because
they are generated in the C compiler. However, program codes for enabling/disabling interrupts through
EI and DI instructions and for writing to the current interrupt request level register (CIL) must be written.
See Section 5.3.6 "How To Write Interrupt Processing When Interrupt Level Control Enabled" for the
specific program description.
Interrupt processing end
Return "return PC" to PC and
"pre-interrupt
PSW" to PSW from the stack
Restore general-purpose registers from the stack
Write to the current
interrupt request level
register (CIL)
DI instruction: Disable interrupt
RTI instruction
Save ELR1 (return PC)
and EPSW1
(pre-interrupt PSW) in
the stack
EI instruction: Enable interrupt
Maskable interrupt request
Save general-purpose registers in the stack
When multiple interrupts are disabled
When multiple interrupts are enabled
Maskable interrupt request
Save general-purpose registers in the stack
Execute target processing
Write to the current interrupt
request level register (CIL)
Restore general-purpose registers from the stack
Interrupt processing end
Execute target processing
Содержание ML62Q1000 Series
Страница 17: ...Chapter 1 Overview...
Страница 112: ...Chapter 2 CPU and Memory Space...
Страница 154: ...Chapter 3 Reset Function...
Страница 166: ...Chapter 4 Power Management...
Страница 196: ...Chapter 5 Interrupts...
Страница 248: ...Chapter 6 Clock generation Circuit...
Страница 274: ...Chapter 7 Low Speed Time Base Counter...
Страница 291: ...Chapter 8 16 Bit Timer...
Страница 320: ...Chapter 9 Functional Timer FTM...
Страница 382: ...Chapter 10 Watchdog Timer...
Страница 402: ...Chapter 11 Serial Communication Unit...
Страница 456: ...Chapter 12 I2 C Bus Unit...
Страница 491: ...Chapter 13 I2 C Master...
Страница 512: ...Chapter 14 DMA Controller...
Страница 531: ...Chapter 15 Buzzer...
Страница 550: ...Chapter 16 Simplified RTC...
Страница 559: ...Chapter 17 GPIO...
Страница 594: ...Chapter 18 External Interrupt Function...
Страница 612: ...Chapter 19 CRC Generator...
Страница 632: ...Chapter 20 Analog Comparator...
Страница 644: ...Chapter 21 D A Converter...
Страница 655: ...Chapter 22 Voltage Level Supervisor...
Страница 676: ...Chapter 23 Successive Approximation Type A D Converter...
Страница 709: ...Chapter 24 Regulator...
Страница 714: ...Chapter 25 Flash Memory...
Страница 743: ...Chapter 26 Code Option...
Страница 750: ...Chapter 27 LCD Driver...
Страница 788: ...Chapter 28 On Chip Debug Function...
Страница 795: ...Chapter 29 Safety Function...
Страница 813: ...Appendix A...
Страница 881: ...Revision History...