element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog Developing Zynq UltraScale+ MPSoC Software with Xilinx SDK Lab 09
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: buffteethr
  • Date Created: 11 Nov 2019 11:16 PM Date Created
  • Views 1670 views
  • Likes 4 likes
  • Comments 0 comments
Related
Recommended

Developing Zynq UltraScale+ MPSoC Software with Xilinx SDK Lab 09

buffteethr
buffteethr
11 Nov 2019

The goal of this lab was to learn:

• How to enable the interrupt subsystem to allow hardware interrupts to interrupt software execution

• Create an interrupt service routine to handle the hardware interrupt

 

An interrupt handler, also known as an Interrupt Service Routine (ISR), is a callback subroutine in microcontroller firmware, operating system, or device driver whose execution is triggered by the reception of a hardware interrupt. Interrupt handlers have a multitude of functions, which vary based on the reason the interrupt was generated and the speed at which the interrupt handler completes its task.

 

An interrupt handler is a low-level counterpart of event handlers. These handlers are typically initiated by hardware interrupts and are used for servicing hardware devices and transitions between protected modes of operation such as system calls.

In this lab we will perform steps to import a known good code base to access a piece of custom hardware built into the system. This hardware will control the back light on the LCD mini click allowing the backlight intensity to be increased and decreased. From that point, we will modify the application code to respond to an interrupt generated by the custom hardware platform when an incorrect PWM value is written to the PWM controller.

 

This was the first lab I did that utilized the Click Mezzanine and Click boards. It used the LCD Mini Click and the lab software was used to change its brightness of the LCD back lighting, showcasing an interrupt service routine when an invalid value is entered.

image

In the first experiment of the lab I walked through a sample application that allowed me to control the backlight brightness of the LCD. The brightness was select via a keyboard entry using the serial terminal.

 

image

 

The second experiment in the lab involved adding interrupt support to the application imported and used in the first experiment. Acheck was also added to prevent a user from entering a value that excedded the allowed range. The follwoing api calls used to support Interrupts were highlighted:

 

int XScuGic_CfgInitialize

(XScuGic *InstancePtr, XScuGic_Config *ConfigPtr, u32 EffectiveAddr)

• CfgInitialize a specific interrupt controller instance/driver.

• The function initializes the field of XscuGic structure and the initial vector table with stub function calls.

• All interrupt sources are disabled when initialization occurs.

 

int XScuGic_Connect

(XScuGic *InstancePtr, u32 Int_Id, Xil_InterruptHandler Handler, void *CallBackRef)

• Makes the connection between the Int_Id of the interrupt source and the associated handler that is to run when the interrupt is recognized.

 

void XScuGic_Enable

(XScuGic *InstancePtr, u32 Int_Id)

• Enables the interrupt source provided as the argument Int_Id.

• Any pending interrupt condition for the specified Int_Id will occur after this function is called.

 

void XScuGic_SetPriorityTriggerType

(XScuGic *InstancePtr, u32 Int_Id, u8 Priority, u8 Trigger)

• Sets the interrupt priority and trigger type for the specified IRQ source.

 

XScuGic_Config * XScuGic_LookupConfig (u16 DeviceId)

• Looks up the device configuration based on the unique device ID.

• A table contains the configuration info for each device in the system.

 

void XScuGic_InterruptHandler (XScuGic *InstancePtr)

• This function is the primary interrupt handler for the driver.

• It must be connected to the interrupt source such that it is called when an interrupt of the interrupt controller is active.

• It will resolve which interrupts are active and enabled and call the appropriate interrupt handler.

imageimage

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube