Interrupt Peripheral Library for Harmony v2

This library allows you to:

  • Enable, disable, and prioritize a source that may interrupt the core operation,
  • Identify the source of an interrupt request or exception, usually generated by a peripheral,
  • Control the edge transition (high-to-low or low-to-high) on which the interrupts are generated,
  • Associate a programmable priority with the interrupt source.

Description of Hardware Controlled by this Library

Introduction:

This library provides a low-level abstraction of the Interrupt Controller module on Microchip microcontrollers with a convenient C language interface. It can be used to simplify low-level access to the module without the necessity of interacting directly with the module's registers, thus hiding differences from one microcontroller variant to another.

Description:

The Interrupt Controller is a key component of a microcontroller. The Interrupt Controller reduces the numerous peripheral interrupt request signals to a single interrupt request signal to the microcontroller core.

The key features present on an Interrupt Controller are:

  • Interrupt source configuration: Provides the ability to enable, disable, and prioritize a source that may interrupt the core.
  • Interrupt status flags: Identifies the source of an interrupt request or exception, usually generated by a peripheral.

The interrupt will be sent to the core only if the source is enabled to generate an interrupt and interrupts have been enabled (if supported). Sources will be prioritized so that the highest priority interrupt will be sent to the core if multiple sources cause interrupts at the same time.

Many interrupt controllers also include other optional features:

  • Global enable configuration: Controls the generation of any interrupt to the core from the Interrupt Controller
  • Choice of edge transition: Controls the edge transition (high-to-low or low-to-high) on which the interrupts are generated
  • Priority configuration: Associates a programmable priority with the interrupt source

Interrupts can be handled inside the core in the following ways:

  • Vectored: Each interrupt has an associated interrupt handler routine
  • Non-vectored: All interrupts have a single (shared) interrupt handler routine. The software determines the interrupt source based on the interrupt status-flags register.
  • Combination of vectored and non-vectored: Interrupts combined in groups. Each group has a single common interrupt vector or handler, but there are multiple groups (i.e., multiple vectors). Within a specific vector group, software determines which one in the group sources caused the interrupt.

A microcontroller can support one, or more than one of the these modes.

Library Overview

The library interface routines are divided into various sub-sections, which address one of the blocks or the overall operation of the Interrupt module.

Library Interface Section Description
General Configuration Functions Provides setup, configuration, and status interface routines for the overall operation of the Interrupt Controller module.
Interrupt Source Control Functions Provides setup and status routines for: 1) Setting up the source enable configuration, 2) Setting up the vector priority configuration, 3) Querying a source's interrupt status flag.
Other Status and Control Functions Provides setup and status routines for: 1) Global interrupt enable status, 2) Vector number and priority of the current Interrupt Service Routine (ISR), 3) Proximity timer, 4)Trap handling.
Feature Existence Functions Determine whether certain features are available.

 Learn More

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.