
ML62Q1000 Series User's Manual
Chapter 5 Interrupts
FEUL62Q1000
5-48
5.3.6 How To Write Interrupt Processing When Interrupt Level Control Enabled
This section describes examples of program scripts of interrupt function when ILE of the interrupt level control enable
register (ILEN) is set to enable the interrupt level control. See "CCU8 Programming Guide" for the detailed scripting
method of and notes on interrupt processing.
5.3.6.1 Description of Interrupt Function to Disable Multiple Interrupts
To describe the interrupt function to disable multiple interrupts, specify 1 in the category field of the INTERRUPT
pragma and SWI pragma. When built-in function_EI is called in the interrupt function to disable multiple interrupts,
CCU8 displays an error.
After completion of the target interrupt processing, it is necessary to write to the CIL register and clear the highest
current interrupt request level (CILN bit) to "0". Otherwise, interrupts equivalent to or less than the current interrupt
request level is unacceptable.
Example of description
static void intr_fn_0A (void);
#pragma interrupt intr_fn_0A 0x0A 1
volatile unsigned short TM1msec;
static void intr_fn_0A (void)
{
+;
CIL = 0; /*Clear the highest current interrupt request level*/
}
When described as in the example, intr_fn_0A is handled as an interrupt processing function to disable multiple
interrupts. CCU8 outputs the assembly code as shown below.
Example of output
_intr_fn_0A :
push
er0
;; +;
l
er0, NEAR _TM1msec
add
er0, #1
st
er0, NEAR _TM1msec
;;}
;; CIL = 0;
mov
r0, #00h
st r0, 0f022h
;;}
pop
er0
rti
Содержание 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...