Nios® V Processor Software Developer Handbook

ID 743810
Date 10/06/2025
Public
Document Table of Contents

9.3.1.2.1. Using Altera HAL Trap Handler in CLINT-Direct or CLIC Interrupt Mode

The Altera HAL trap handler (at exception vector) receives control from the processor upon a trap. The trap handler performs tasks such as saving the stack pointer, saving registers and calling RTOS context-switch routines, and transfers control to the dispatcher. When the dispatcher returns, the trap handler performs tasks such as calling RTOS process-dispatch routines and restoring registers, and transfers control to the appropriate foreground task.