Nios® V Processor Software Developer Handbook

ID 743810
Date 2/14/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

8.2.4. Enabling and Disabling Interrupts

The HAL enhanced interrupt API provides the functions:
  • alt_ic_irq_disable(), alt_ic_irq_enable() allow you to to disable and enable individual interrupts.
  • alt_irq_disable_all() disables all interrupts, and returns a context value.
  • Call alt_irq_enable_all() pass in the context parameter to re-enable hardware interrupts.. The interrupts are returned to their state prior to the call to alt_irq_disable_all().
  • alt_irq_enabled() returns nonzero if maskable exceptions are enabled. alt_ic_irq_enabled() determines whether a specified interrupt is enabled.
Note: Disable interrupts for as short a time as possible. Maximum interrupt latency increases with the longest amount of time interrupts are disabled. For more information about disabled interrupts, refer to the Keep Interrupts Enabled chapter.