DISABLE INTERRUPT — Disable External Interrupt Input

R

DISABLE INTERRUPT — Disable External Interrupt Input

The DISABLE INTERRUPT instruction clears the interrupt enable (IE) flag. Consequently, the PicoBlaze microcontroller ignores the INTERRUPT input. Use this instruction to temporarily disable interrupts during timing-critical code segments. Use the ENABLE INTERRUPT instruction to re-enable interrupts.

Example

DISABLE INTERRUPT; Disable interrupts

Pseudocode

INTERRUPT_ENABLE Å 0

PC Å PC + 1

Registers/Flags Altered

Registers: PC

Flags: INTERRUPT_ENABLE

Notes

PBlazIDE Equivalent: DINT

ENABLE INTERRUPT — Enable External Interrupt Input

The ENABLE INTERRUPT instruction sets the interrupt enable (IE) flag. Consequently, the PicoBlaze microcontroller recognizes the INTERRUPT input. Before using this instruction, a suitable interrupt service routine (ISR) must be associated with the interrupt vector address, 3FF.

Never issue the ENABLE INTERRUPT instruction from within an ISR.

Example

ENABLE INTERRUPT; Enable interrupts

Pseudocode

INTERRUPT_ENABLE Å 1

PC Å PC + 1

Registers/Flags Altered

Registers: PC

Flags: INTERRUPT_ENABLE

Notes

PBlazIDE Equivalent: EINT

PicoBlaze 8-bit Embedded Microcontroller

www.xilinx.com

97

UG129 (v1.1.2) June 24, 2008

Page 97
Image 97
Xilinx UG129 manual Disable Interrupt Disable External Interrupt Input, Enable Interrupt Enable External Interrupt Input