Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Interrupt Manager (Interrupt)

The Kinetis SDK Interrupt Manager provides a set of API/services to configure the Interrupt Controller (NVIC). More...

Overview

Files

file  fsl_interrupt_manager.h
 

Enumerations

enum  interrupt_status_t
 interrupt status return codes. More...
 

interrupt_manager APIs

void * INT_SYS_InstallHandler (IRQn_Type irqNumber, void(*handler)(void))
 Installs an interrupt handler routine for a given IRQ number. More...
 
static void INT_SYS_EnableIRQ (IRQn_Type irqNumber)
 Enables an interrupt for a given IRQ number. More...
 
static void INT_SYS_DisableIRQ (IRQn_Type irqNumber)
 Disables an interrupt for a given IRQ number. More...
 
void INT_SYS_EnableIRQGlobal (void)
 Enables system interrupt. More...
 
void INT_SYS_DisableIRQGlobal (void)
 Disable system interrupt. More...
 

Interrupt Manager

Overview

The Interrupt Manager provides a set of APIs so that the application can enable or disable an interrupt for a specific device and also set/get interrupt status, priority, and other features. Additionally, it provides a way to update the vector table for a specific device interrupt handler.

Interrupt Names

Each chip has its own set of supported interrupt names defined in the chip-specific header file. For example, for K70, the header file is MK70F12.h or MK70F15.h as an IRQn_Type.This is an example to set/update the vector table for the I2C0_IRQn interrupt handler:

#include "interrupt/fsl_interrupt_manager.h"
interrupt_register_handler(I2C0_IRQn, irq_handler_I2C0_IRQn);
This is an example to enable/disable an interrupt for the I2C0_IRQn:

#include "interrupt/fsl_interrupt_manager.h"
interrupt_enable(I2C0_IRQn);
interrupt_disable(I2C0_IRQn);

Enumeration Type Documentation

Function Documentation

void* INT_SYS_InstallHandler ( IRQn_Type  irqNumber,
void(*)(void)  handler 
)

This function lets the application register/replace the interrupt handler for a specified IRQ number. The IRQ number is different than the vector number. IRQ 0 starts from the vector 16 address. See a chip-specific reference manual for details and the startup_MKxxxx.s file for each chip family to find out the default interrupt handler for each device. This function converts the IRQ number to the vector number by adding 16 to it.

Parameters
irqNumberIRQ number
handlerInterrupt handler routine address pointer
Returns
Whether the installation succeed or not
static void INT_SYS_EnableIRQ ( IRQn_Type  irqNumber)
inlinestatic

This function enables the individual interrupt for a specified IRQ number. It calls the system NVIC API to access the interrupt control register. The input IRQ number does not include the core interrupt, only the peripheral interrupt, from 0 to a maximum supported IRQ.

Parameters
irqNumberIRQ number
static void INT_SYS_DisableIRQ ( IRQn_Type  irqNumber)
inlinestatic

This function enables the individual interrupt for a specified IRQ number. It calls the system NVIC API to access the interrupt control register.

Parameters
irqNumberIRQ number
void INT_SYS_EnableIRQGlobal ( void  )

This function enables the global interrupt by calling the core API.

void INT_SYS_DisableIRQGlobal ( void  )

This function disables the global interrupt by calling the core API.