Nios® II Processor Reference Guide

ID 683836
Date 8/28/2023
Public
Document Table of Contents

3.7.9.3. Exception Flow with the Internal Interrupt Controller

A general exception handler determines which of the pending interrupts has the highest priority, and then transfers control to the appropriate ISR. The ISR stops the interrupt from being visible (either by clearing it at the source or masking it using ienable) before returning as well as before re-enabling PIE. The ISR also saves estatus and ea (r29) before re-enabling PIE.

Interrupts can be re-enabled by writing one to the PIE bit, thereby allowing the current ISR to be interrupted. Typically, the exception routine adjusts ienable so that IRQs of equal or lower priority are disabled before re-enabling interrupts.

Refer to "Handling Nested Exceptions” for more information.