20.07.2015 Views

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

InterruptMitsubishi microcomputers<strong>M16C</strong> / <strong>62</strong> <strong>Group</strong>SINGLE-CHIP 16-BIT CMOS MICROCOMPUTERReturning from an Interrupt RoutineExecuting the REIT instruction at the end of an interrupt routine returns the contents of the flag register(FLG) as it was immediately before the start of interrupt sequence and the contents of the program counter(PC), both of which have been saved in the stack area. Then control returns to the program that was beingexecuted before the acceptance of the interrupt request, so that the suspended process resumes.Return the other registers saved by software within the interrupt routine using the POPM or similar instructionbefore executing the REIT instruction.Interrupt PriorityIf there are two or more interrupt requests occurring at a point in time within a single sampling (checkingwhether interrupt requests are made), the interrupt assigned a higher priority is accepted.Assign an arbitrary priority to maskable interrupts (peripheral I/O interrupts) using the interrupt priority levelselect bit. If the same interrupt priority level is assigned, however, the interrupt assigned a higher hardwarepriority is accepted.Priorities of the special interrupts, such as Reset (dealt with as an interrupt assigned the highest priority),watchdog timer interrupt, etc. are regulated by hardware.Figure 1.14.8 shows the priorities of hardware interrupts.Software interrupts are not affected by the interrupt priority. If an instruction is executed, control branchesinvariably to the interrupt routine._______________Reset > NMI > DBC > Watchdog timer > Peripheral I/O > Single step > Address matchFigure 1.14.8. Hardware interrupts prioritiesInterrupt resolution circuitWhen two or more interrupts are generated simultaneously, this circuit selects the interrupt with the highestpriority level. Figure 1.14.9 shows the circuit that judges the interrupt priority level.63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!