Chapter 6 Using Configurator
- 116 -
[( Interrupt vector definition )]
This definition is necessary to use Interrupt function.
<< Format >>
// Interrupt Vector Definition
interrupt_vector[ Vector No. ]{
os_int = Kernel-managed (OS dependent) interrupt handler ;
entry_address = Start address ;
pragma_switch = Switch passed to PRAGMA extended function ;
};
:
:
The vector number can be written in the range of 0 to 63 and 247 to 255. However, whether or not the defined
vector number is valid depends on the microcomputer used
The relationship between interrupt causes and interrupt vector numbers for the M16C/80 series is shown in
Table 6.3.
Configurator can’t create an Initialize routine (interrupt control register, interrupt causes etc.) for this defined in-
terrupt. You need to create that.
<< Content >>
1. Kernel (OS dependent) interrupt handler
[( Definition format )] Symbol
[( Definition range )] YES or NO
Define whether the handler is a kernel(OS dependent) interrupt handler. If it is a kernel(OS dependent)
interrupt handler, specify YES; if it is a non-kernel(OS independent) interrupt handler, specify No.
If this item is defined as YES, the declaration statement shown below is output to the kernel_id.h file.
#pragma INTHANDLER /V4 function name
If this item is defined as NO, the declaration statement shown below is output to the kernel_id.h file.
#pragma INTERRUPT /V4 function name
2. Start address
[( Definition format )] Symbol or function name
[( Definition range )] None
[( Default value )] __SYS_DMY_INH
Define the entry address of the interrupt handler. When written in the C language, add () at the end or
at the beginning of the function name you have defined.
3. Switch passed to PRAGMA extended function
[( Definition format )] Symbol
[( Definition range )] E, F, or B
[( Default value )] None
Specify the switch to be passed to #pragma INTHANDLER or #pragma INTERRUPT. If "E" is specified,
the "/E" switch is assumed, in which case multiple interrupts (another interrupt within an interrupt) are
enabled. If "F" is specified, the "/F" switch is assumed, in which case the FREIT instruction is output at
return from the interrupt handler. If "B" is specified, the "/B" switch is assumed, in which case register
bank 1 is specified.
Two or more switches can be specified at the same time. For kernel (OS dependent) interrupt han-
dlers, however, only the "E" switch can be specified. For non-kernel (OS independent) interrupt han-
dlers, the "E," "F," and "B" switches can be specified, subject to a limitation that "E" and "B" cannot be