NEC PD17062 User Manual
Page 162
162
µ
PD17062
13.4.5 Releasing the Halt State by an Interrupt
The HALT 1000B instruction specifies an interrupt as halt release condition.
If it is specified that the halt state is to be released according to an interrupt, the halt state is released
immediately when an interrupt request is accepted.
Four interrupt sources, INT
NC
pin, timer, V
SYNC
, and serial interface, can be used as a condition to release
the halt state.
It is necessary to program which interrupt source is to be used as a halt release condition, beforehand.
For an interrupt request to be accepted, besides issuing the interrupt request, it is necessary to enable all
interrupts (EI instruction) and the interrupt that corresponds to the issued interrupt request (to set the interrupt
permission flag).
If interrupts are not enabled, no interrupt request is accepted and therefore the halt state is not released,
even if an interrupt request is issued.
If an interrupt request is accepted and the halt state is released, program control is passed to the vector
address of the corresponding interrupt. After the required interrupt handling is finished, when the RET1
instruction is executed, program control is returned to the instruction just after the HALT instruction.
This is explained in the following example.