CHAPTER 6. INTERRUPT FUNCTIONS

(2) When IRQn is set during execution of an instruction other than an interrupt control instruction

(a) When IRQn is set in the last machine cycle of the instruction being executed

In this case, the interrupt routine program is executed after 3 machine cycles of interrupt servicing have been performed following execution of the instruction which follows the instruction being executed.

Instruction other than interrupt control instruction

A

B

C

D

A : Setting of IRQn

B : Execution of next instruction (between 1 and 3 machine cycles depending on instruction)

C : Interrupt servicing (3 machine cycles)

D: Execution of interrupt routine

Note If the next instruction is an interrupt control instruction, the interrupt routine program is executed after 3 machine cycles of interrupt servicing have been performed following execution of the instruction which follows the last interrupt control instruction executed. Also, if the interrupt control instruction executed after IRQn is set is a DI instruction, the interrupt request by which IRQn was set is held pending.

(b) When IRQn is set before the last machine cycle of the instruction being executed

In this case, the interrupt routine program is executed after 3 machine cycles of interrupt servicing have been performed following the instruction being executed.

Instruction other than interrupt control instruction

A

C

D

A : Setting of IRQn

C : Interrupt servicing (3 machine cycles)

D : Execution of interrupt routine

136

Page 147
Image 147
NEC PD75402A, PD75P402 user manual Interrupt Functions, 136