
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
Summary of Contents for ML62Q1000 Series
Page 17: ...Chapter 1 Overview...
Page 112: ...Chapter 2 CPU and Memory Space...
Page 154: ...Chapter 3 Reset Function...
Page 166: ...Chapter 4 Power Management...
Page 196: ...Chapter 5 Interrupts...
Page 248: ...Chapter 6 Clock generation Circuit...
Page 274: ...Chapter 7 Low Speed Time Base Counter...
Page 291: ...Chapter 8 16 Bit Timer...
Page 320: ...Chapter 9 Functional Timer FTM...
Page 382: ...Chapter 10 Watchdog Timer...
Page 402: ...Chapter 11 Serial Communication Unit...
Page 456: ...Chapter 12 I2 C Bus Unit...
Page 491: ...Chapter 13 I2 C Master...
Page 512: ...Chapter 14 DMA Controller...
Page 531: ...Chapter 15 Buzzer...
Page 550: ...Chapter 16 Simplified RTC...
Page 559: ...Chapter 17 GPIO...
Page 594: ...Chapter 18 External Interrupt Function...
Page 612: ...Chapter 19 CRC Generator...
Page 632: ...Chapter 20 Analog Comparator...
Page 644: ...Chapter 21 D A Converter...
Page 655: ...Chapter 22 Voltage Level Supervisor...
Page 676: ...Chapter 23 Successive Approximation Type A D Converter...
Page 709: ...Chapter 24 Regulator...
Page 714: ...Chapter 25 Flash Memory...
Page 743: ...Chapter 26 Code Option...
Page 750: ...Chapter 27 LCD Driver...
Page 788: ...Chapter 28 On Chip Debug Function...
Page 795: ...Chapter 29 Safety Function...
Page 813: ...Appendix A...
Page 881: ...Revision History...