We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 54128

Are Nested interrupts supported on the Zynq interrupt controller (GIC)?


Are Nested Interrupts supported on the Zynq interrupt controller (GIC)?


Nested Interrupts is currently supported in the GIC Interrupt Controller on the Zynq SoC in version 2013.4/14.7. If you are using this version, then proceed to step 3.

If you are using an older version and would like to add nested interrupt capability, then unzip the ZIP file that is attached at the end of this answer record) into your local EDK install directory:

Copy standalone_v3_10_a from 54128.zip to:


Copy scugic_v1_04_a from 54128.zip to:

Then follow these two steps:

  1. Create BSP

    Create a Board Support Package

    In SDK, File -> New -> Board Support Package and select the standalone from the dropdown

    Configure the BSP to match your application settings, and make sure that the ps7_scugic_0 driver version is set to 1.04.a:
  2. Create, or Link your existing application to the newly created BSP.

    To link a pre-existing application, right-click on the application, select Properties -> Project References and untick the old BSP and add the newly created BSP allowing Nested Interrupts

  3. Add Nested Interrupt capability to your application

    To allow Nested Interrupts in your application, add the function below during the GIC initialization before XilExceptionInit is called:
    XScuGic_CPUWriteReg(IntcInstancePtr, XSCGIC_BIN_PT_OFFSET,0x03);

    In the Interrupt handler, the user must ensure that the source of the current interrupt is cleared and enable Nested Interrupts using the function:

    After calling this macro, Nested Interrupts will be allowed. However, only interrupts with higher group priority than the existing interrupt being processed.

    The user must include the header file:
    #include "xil_exception.h"

    Similarily, before exiting the Interrupt handler, the Nested Interrupts must be disabled:

Note: Added to this AR there is a nested_interrupt_demo.c that can be used to verify the nested interrupts. To test this create a simple zc702 with two timers on the Zynq SoC Processor Subsystem.

Export to SDK, follow the instructions above. Create an Empty application and import the nested_interrupt_demo.c.


Associated Attachments

Name File Size File Type
AR54128.zip 492 KB ZIP
AR# 54128
Date Created 02/05/2013
Last Updated 01/10/2014
Status Active
Type General Article
  • Zynq-7000
  • EDK - 14.4
  • EDK - 14.3
  • EDK - 14.5
  • More
  • EDK - 14.6
  • EDK - 14.7
  • Vivado Design Suite - 2013.4
  • Vivado Design Suite - 2013.3
  • Vivado Design Suite - 2013.2
  • Less