LAPIS Semiconductor ML62Q1000 Series User Manual page 241

Table of Contents

Advertisement

State B: Non-maskable interrupt is being processed
B-1: When a subroutine is not called in an interrupt routine
• When the script is written in the assembly language
• Processing immediately after the start of interrupt routine execution
Specify "PUSH ELR, EPSW" to save the interrupt return address and the PSW status in the stack.
• Processing at the end of interrupt routine execution
Specify "POP PSW, PC" to return the contents of the stack to PC and PSW.
• When the script is written in C
Define the interrupt routine using the INTERRUPT pragma. Specify "2" in the category field. In this way,
appropriate codes are produced through the C compiler (CCU8).
Example of description:
Status B-1
For assembly language:
Intrpt_B-1;
PUSH ELR, EPSW
:
:
POP PSW, PC
For C language:
static void Intrpt_B_1(void);
#pragma interrupt Intrpt_B_1 0x08 2
static void Intrpt_B_1(void)
{
:
}
FEUL62Q1000
; Status B-1
; Save ELR and EPSW at the
beginning
; Return PC from the stack
; Return PSW from the stack
; Return LR from the stack
; End of interrupt routine
/* End of interrupt routine */
ML62Q1000 Series User's Manual
Chapter 5 Interrupts
5-45

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents