Intel: How do I generate timer interrupts on Nios II?

Nios II

Category: Nios® II
Tools: Nios® II EDS
device:-


There are two methods.

- How to register with an Interrupt Service Routine (ISR) (Register an interrupt using alt_ic_isr_register)

This registers the System Clock in the ISR and uses the timer interrupt based on the Timer settings set on Qsys.
For more information, search for Timer Device Drivers in the Nios II Gen2 Software Developer's Handbook.

・How to use the Alarm function (Register an alarm using alt_alarm_start)

This uses the registered System Clock to enable the use of APIs such as alt_tick, and uses timer interrupts using the HAL alarm function.
Since the timer interrupt can be set by software using the alarm function, it is possible to register multiple timer interrupts.
For more information, search for Alarms in the Nios II Gen2 Software Developer's Handbook.

reference
Nios II Gen2 Software Developer's Handbook
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/nios2/n2sw_nii5v2gen2.pdf



Experienced FAE
Free consultation is available.

From specific product specifications to parts selection, the Company FAE will answer your technical concerns free of charge. Please feel free to contact us.