![](http://datasheet.mmic.net.cn/380000/-PD784928Y_datasheet_16744934/-PD784928Y_132.png)
132
CHAPTER 4 INTERRUPT FUNCTIONS
4.1 Kinds of Interrupt Request
There are three kinds of interrupt request, as follows:
Software interrupt requests
Non-maskable interrupt requests
Maskable interrupt requests
4.1.1 Software interrupt requests
An interrupt request by software is generated when a BRK instruction or BRKCS RBn instruction is executed, or
if here is an error in an operand of an MOV WDM, #byte instruction or MOV STBC, #byte instruction, LOCATION
instruction (operand error interrupt). Interrupt requests by software are acknowledged even in the interrupt disabled
(DI) state, and are not subject to interrupt priority control. Therefore, when an interrupt request is generated by
software, a branch is made to the interrupt service routine unconditionally.
To return from a BRK instruction, an RETB instruction is executed.
To return from a BRKCS RBn instruction service routine, a RETCSB !addr16 instruction is executed.
As an operand error interrupt is an interrupt generated if there is an error in an operand, processing is required
for branching to the initialization program by a reset release after the necessary processing has been performed, etc.
4.1.2 Non-maskable interrupt requests
A non-maskable interrupt request is generated when a valid edge is input to the NMI pin or when the watchdog
timer overflows. The provision of the NMI pin and watchdog timer functions varies from product to product. Please
refer to the
User’s Manual — Hardware
for the individual products for details.
Non-maskable interrupt requests are acknowledged unconditionally, even in the interrupt disabled (DI) state. Also,
they are not subject to interrupt priority control, and are of higher priority that any other interrupt.
4.1.3 Maskable interrupt requests
A maskable interrupt request is one subject to masking control according to the setting of the interrupt control
register. In addition, acknowledgment enabling/disabling can be set for all maskable interrupts by means of the IE
flag in the PSW.
The priority order for maskable interrupt requests when interrupt requests of the same priority are generated
simultaneously is predetermined (default priority). Also, multiprocessing can be performed with interrupt priorities
divided into 4 levels in accordance with the specification of the interrupt control register. However, macro service
requests are acknowledged without regard to priority control or the IE flag.