
ML62Q1000 Series User's Manual
Chapter 5 Interrupts
FEUL62Q1000
5-49
In the interrupt function, the register (here, only ER0) that may be used in the interrupt routine is saved in the stack.
"RTI" instruction is used to return from the interrupt function to disable multiple interrupts.
The example below shows how to call other functions from an interrupt function.
Example of description
static void intr_fn_10 (void);
#pragma interrupt intr_fn_10 0x10 1
void func (void);
static void intr_fn_10 (void)
{
func ( );
CIL = 0;
/*Clear the highest current interrupt request level*/
}
Example of output
_intr_fn_10 :
push
lr
,
ea
push
xr0
l
r0
,
DSR
push
r0
;; func
()
;
bl
_func
;;}
;; CIL = 0;
mov
r0,
#00h
st
r0,
0f022h
;;}
pop
r0
st
r0,
DSR
pop
xr0
pop
ea,
lr
rti
When another function is called from an interrupt function, the output code becomes redundant compared with the case
where another function is not called from the interrupt function. Thus the processing time of the interrupt becomes also
longer. This is because CCU8 does not know which registers the function func ( ) should use and it save the all registers
that may be changed by calling the func ( ) in the stack.
[Note]
Ÿ
Do not enable interrupts in a function called from a function for which multiple interrupts are disabled.
Otherwise, the program may run out of control when the multiple interrupts occur.
Содержание 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...