English
Language : 

CC78K4 Datasheet, PDF (343/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
Interrupt Functions
#pragma vect
#pragma interrupt
RESTRICTIONS
• An interrupt request name must be described in uppercase letters.
• A duplication check on interrupt request names will be made within only one module.
• If the same or another interrupt occurs because of the contents of the priority specification flag register and
interrupt mask flag register while a vectored interrupt is being processed, the contents of the registers may be
changed if a register bank is specified or no change is specified, resulting in an error. The compiler, however,
cannot check this error.
• callt/callf/noauto/norec/_ _callt/_ _callf/_ _leaf/_ _rtos_interrupt/_ _pascal/_ _flash cannot be specified
as the interrupt function.
• An interrupt function is specified with void type (example: void func (void);) because it cannot have an
argument or a return value.
• Even if an ASM statement exists in the interrupt function, codes saving all the registers and variable areas are
not output. If an area reserved for the compiler is used in the ASM statement in the interrupt function,
therefore, or if a function is called in the ASM statement, the user must save the registers and variable areas
on their own responsibility.
• If a function specifying no change, register bank, or stack change as the saving destination via a #pragma
vect/#pragma interrupt specification is not defined in the same module, a warning message is output and
the stack change is ignored. In this case, the default stack is used.
• When stack change is specified, the stack pointer is changed to the location where offset is added to the array
name symbol. The area of the array name is not secured by the #pragma directive. It needs to be defined
separately as a global unsigned char type array.
• The code that changes the stack pointer is generated at the start of a function, and the code that sets the
stack pointer back is generated at the end of a function.
• When the keywords sreg/_ _sreg are added to the array for stack change, it is regarded that two or more
variables with the different attributes and the same name are defined, and a compilation error occurs. It is
possible to allocate an array in saddr area using the -RD option, but code and speed efficiency will not be
improved because the array is used as a stack. It is recommended to use the saddr area for purposes other
than a stack.
• A stack change cannot be specified simultaneously with “no change”. If specified so, an error occurs.
• The stack change must be described before the stack use/register bank specification. If the stack change is
described after the stack use/register bank specification, an error occurs.
User’s Manual U15556EJ1V0UM
343