UPGRADE YOUR BROWSER

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# 59842

2013.4 - SDK - Zynq Nested Interrupt Example designs

Description

This Answer record details two nested interrupt software applications that can be used as a reference to add nested interrupt functionality to Zynq systems.

These are:

  • Dual interrupt (FIQ/IRQ), where the FIQ will interrupt the IRQ.
  • Interrupt Re-entrant, where the IRQ connected to CoreX_nIRQ can re-enter the handler upon another interrupt.

 

Note: These example designs are to be used as a reference only, and are not supported by Xilinx Technical Support.

Solution

To allow for ease of use, the same hardware platform can be used for both applications.

This design uses three AXI Timer interrupts; 

  • Timer0 is connected to the IRQ port (used in app1)
  • Timer 1 is connected to the FIQ port of Core0 (used in app1)
  • Timer 2 is connected to the IRQ port of Core0 (used in app2)

To build the hardware, launch Vivado 2013.4, targeting the ZC702 board, and source the "build_hw.tcl" file in the hw_tcl folder in the attached zip.

Once the Board Design is created, create a wrapper and export to SDK and follow the respective flows below for each Application.


Dual interrupt (FIQ/IRQ), where the FIQ will interrupt the IRQ.

To build the application (app1) in SDK, select File -> New -> Application Project

Name the project, and select Next to continue.

Create an empty application and select Finish to continue.

Once the empty application has been built, right click on the .src file in your application and select import.

In the import GUI, drop-down General and select "File System", then navigate to the app1 folder in the attached zip and add the main.c, and lscript.ld files.


Interrupt Re-entrant, where the IRQ connected to CoreX_nIRQ can re-enter the handler upon another interrupt.

This system does not use the GIC. 

To allow re-entrant capability, the user will need to use the BSP attached to this AR. 

To add the BSP, select Xilinx Tools -> Repositories.

Then point to the "repo" folder in the attached zip. 

Re-scan the repositories, Apply, and click OK to continue.

To build this application (app2) in SDK, select File -> New -> Application Project

Name the project, and select Next to continue.

Create an empty application and click Finish to continue.

Once the empty application has been built, right click on the .src file in your application and select import.

In the import GUI, drop-down General and select "File System", then navigate to the app2 folder in the attached zip and add the main.c, and lscript.ld files.

 

Restrictions: The Re-entrant application uses a modified BSP to allow for nested interrupts. However, a caveat of this, is that the SP is saved in an unused R8.

(See line 111 in the asm_vector.S ). If your application uses this register, then this application may not work.

Attachments

Associated Attachments

Name File Size File Type
AR59842.zip 946 KB ZIP
AR# 59842
Date Created 03/19/2014
Last Updated 10/15/2014
Status Active
Type General Article
Devices
  • Zynq-7000
Tools
  • Vivado Design Suite - 2013.4
IP
  • Processing System 7