MCUXpresso SDK API Reference Manual  Rev. 1
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
IRQSTEER: Interrupt Request Steering Driver

Overview

The MCUXpresso SDK provides a peripheral driver for the Interrupt Request Steering (IRQSTEER) module of MCUXpresso SDK devices. The IrqSteer module redirects/steers the incoming interrupts to output interrupts of a selected/designated channel as specified by a set of configuration registers.

Macros

#define IRQSTEER_INT_SRC_REG_WIDTH   32U
 IRQSTEER interrupt source register width. More...
 
#define IRQSTEER_INT_SRC_REG_INDEX(irq)
 IRQSTEER interrupt source mapping register index. More...
 
#define IRQSTEER_INT_SRC_BIT_OFFSET(irq)   ((irq - FSL_FEATURE_IRQSTEER_IRQ_START_INDEX) % IRQSTEER_INT_SRC_REG_WIDTH)
 IRQSTEER interrupt source mapping bit offset. More...
 
#define IRQSTEER_INT_SRC_NUM(regIndex, bitOffset)   (((FSL_FEATURE_IRQSTEER_CHn_MASK_COUNT - 1U - (regIndex)) * IRQSTEER_INT_SRC_REG_WIDTH) + (bitOffset))
 IRQSTEER interrupt source number. More...
 

Enumerations

enum  irqsteer_int_group_t {
  kIRQSTEER_InterruptGroup0,
  kIRQSTEER_InterruptGroup1,
  kIRQSTEER_InterruptGroup2,
  kIRQSTEER_InterruptGroup3,
  kIRQSTEER_InterruptGroup4,
  kIRQSTEER_InterruptGroup5,
  kIRQSTEER_InterruptGroup6,
  kIRQSTEER_InterruptGroup7,
  kIRQSTEER_InterruptGroup8,
  kIRQSTEER_InterruptGroup9,
  kIRQSTEER_InterruptGroup10,
  kIRQSTEER_InterruptGroup11,
  kIRQSTEER_InterruptGroup12,
  kIRQSTEER_InterruptGroup13,
  kIRQSTEER_InterruptGroup14,
  kIRQSTEER_InterruptGroup15
}
 IRQSTEER interrupt groups. More...
 
enum  irqsteer_int_master_t {
  kIRQSTEER_InterruptMaster0,
  kIRQSTEER_InterruptMaster1,
  kIRQSTEER_InterruptMaster2,
  kIRQSTEER_InterruptMaster3,
  kIRQSTEER_InterruptMaster4,
  kIRQSTEER_InterruptMaster5,
  kIRQSTEER_InterruptMaster6,
  kIRQSTEER_InterruptMaster7
}
 IRQSTEER master interrupts mapping. More...
 

Driver version

#define FSL_IRQSTEER_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))
 < Version 2.0.1. More...
 

Initialization and deinitialization

void IRQSTEER_Init (IRQSTEER_Type *base)
 Initializes the IRQSTEER module. More...
 
void IRQSTEER_Deinit (IRQSTEER_Type *base)
 Deinitializes an IRQSTEER instance for operation. More...
 

Sources

static void IRQSTEER_EnableInterrupt (IRQSTEER_Type *base, IRQn_Type irq)
 Enables an interrupt source. More...
 
static void IRQSTEER_DisableInterrupt (IRQSTEER_Type *base, IRQn_Type irq)
 Disables an interrupt source. More...
 
static void IRQSTEER_SetInterrupt (IRQSTEER_Type *base, IRQn_Type irq, bool set)
 Sets/Forces an interrupt. More...
 
static void IRQSTEER_EnableMasterInterrupt (IRQSTEER_Type *base, irqsteer_int_master_t intMasterIndex)
 Enables a master interrupt. More...
 
static void IRQSTEER_DisableMasterInterrupt (IRQSTEER_Type *base, irqsteer_int_master_t intMasterIndex)
 Disables a master interrupt. More...
 

Status

static bool IRQSTEER_IsInterruptSet (IRQSTEER_Type *base, IRQn_Type irq)
 Checks the status of one specific IRQSTEER interrupt. More...
 
static bool IRQSTEER_IsMasterInterruptSet (IRQSTEER_Type *base)
 Checks the status of IRQSTEER master interrupt. More...
 
static uint32_t IRQSTEER_GetGroupInterruptStatus (IRQSTEER_Type *base, irqsteer_int_group_t intGroupIndex)
 Gets the status of IRQSTEER group interrupt. More...
 
IRQn_Type IRQSTEER_GetMasterNextInterrupt (IRQSTEER_Type *base, irqsteer_int_master_t intMasterIndex)
 Gets the next interrupt source (currently set) of one specific master. More...
 

Macro Definition Documentation

#define FSL_IRQSTEER_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))
#define IRQSTEER_INT_SRC_REG_WIDTH   32U
#define IRQSTEER_INT_SRC_REG_INDEX (   irq)
Value:
((FSL_FEATURE_IRQSTEER_CHn_MASK_COUNT - 1U) - \
((irq - FSL_FEATURE_IRQSTEER_IRQ_START_INDEX) / IRQSTEER_INT_SRC_REG_WIDTH))
#define IRQSTEER_INT_SRC_REG_WIDTH
IRQSTEER interrupt source register width.
Definition: fsl_irqsteer.h:30
#define IRQSTEER_INT_SRC_BIT_OFFSET (   irq)    ((irq - FSL_FEATURE_IRQSTEER_IRQ_START_INDEX) % IRQSTEER_INT_SRC_REG_WIDTH)
#define IRQSTEER_INT_SRC_NUM (   regIndex,
  bitOffset 
)    (((FSL_FEATURE_IRQSTEER_CHn_MASK_COUNT - 1U - (regIndex)) * IRQSTEER_INT_SRC_REG_WIDTH) + (bitOffset))

Enumeration Type Documentation

Enumerator
kIRQSTEER_InterruptGroup0 

Interrupt Group 0: interrupt source 31 - 0.

kIRQSTEER_InterruptGroup1 

Interrupt Group 1: interrupt source 63 - 32.

kIRQSTEER_InterruptGroup2 

Interrupt Group 2: interrupt source 95 - 64.

kIRQSTEER_InterruptGroup3 

Interrupt Group 3: interrupt source 127 - 96.

kIRQSTEER_InterruptGroup4 

Interrupt Group 4: interrupt source 159 - 128.

kIRQSTEER_InterruptGroup5 

Interrupt Group 5: interrupt source 191 - 160.

kIRQSTEER_InterruptGroup6 

Interrupt Group 6: interrupt source 223 - 192.

kIRQSTEER_InterruptGroup7 

Interrupt Group 7: interrupt source 255 - 224.

kIRQSTEER_InterruptGroup8 

Interrupt Group 8: interrupt source 287 - 256.

kIRQSTEER_InterruptGroup9 

Interrupt Group 9: interrupt source 319 - 288.

kIRQSTEER_InterruptGroup10 

Interrupt Group 10: interrupt source 351 - 320.

kIRQSTEER_InterruptGroup11 

Interrupt Group 11: interrupt source 383 - 352.

kIRQSTEER_InterruptGroup12 

Interrupt Group 12: interrupt source 415 - 384.

kIRQSTEER_InterruptGroup13 

Interrupt Group 13: interrupt source 447 - 416.

kIRQSTEER_InterruptGroup14 

Interrupt Group 14: interrupt source 479 - 448.

kIRQSTEER_InterruptGroup15 

Interrupt Group 15: interrupt source 511 - 480.

Enumerator
kIRQSTEER_InterruptMaster0 

Interrupt Master 0: interrupt source 63 - 0.

kIRQSTEER_InterruptMaster1 

Interrupt Master 1: interrupt source 127 - 64.

kIRQSTEER_InterruptMaster2 

Interrupt Master 2: interrupt source 191 - 128.

kIRQSTEER_InterruptMaster3 

Interrupt Master 3: interrupt source 255 - 192.

kIRQSTEER_InterruptMaster4 

Interrupt Master 4: interrupt source 319 - 256.

kIRQSTEER_InterruptMaster5 

Interrupt Master 5: interrupt source 383 - 320.

kIRQSTEER_InterruptMaster6 

Interrupt Master 6: interrupt source 447 - 384.

kIRQSTEER_InterruptMaster7 

Interrupt Master 7: interrupt source 511 - 448.

Function Documentation

void IRQSTEER_Init ( IRQSTEER_Type *  base)

This function enables the clock gate for the specified IRQSTEER.

Parameters
baseIRQSTEER peripheral base address.
void IRQSTEER_Deinit ( IRQSTEER_Type *  base)

The clock gate for the specified IRQSTEER is disabled.

Parameters
baseIRQSTEER peripheral base address.
static void IRQSTEER_EnableInterrupt ( IRQSTEER_Type *  base,
IRQn_Type  irq 
)
inlinestatic
Parameters
baseIRQSTEER peripheral base address.
irqInterrupt to be routed. The interrupt must be an IRQSTEER source.
static void IRQSTEER_DisableInterrupt ( IRQSTEER_Type *  base,
IRQn_Type  irq 
)
inlinestatic
Parameters
baseIRQSTEER peripheral base address.
intSrcInterrupt source number. The interrupt must be an IRQSTEER source.
static void IRQSTEER_SetInterrupt ( IRQSTEER_Type *  base,
IRQn_Type  irq,
bool  set 
)
inlinestatic
Parameters
baseIRQSTEER peripheral base address.
intSrcInterrupt to be set/forced. The interrupt must be an IRQSTEER source.
setSwitcher of the interrupt set/force function. "true" means to set. "false" means not (normal operation).
Note
This function is not affected by the function IRQSTEER_DisableInterrupt and IRQSTEER_EnableInterrupt.
static void IRQSTEER_EnableMasterInterrupt ( IRQSTEER_Type *  base,
irqsteer_int_master_t  intMasterIndex 
)
inlinestatic

By default, all the master interrupts are enabled.

Parameters
baseIRQSTEER peripheral base address.
intMasterIndexMaster index of interrupt sources to be routed. "irqsteer_int_master_t".

For example, to enable the interrupt sources of master 1:

static void IRQSTEER_DisableMasterInterrupt ( IRQSTEER_Type *  base,
irqsteer_int_master_t  intMasterIndex 
)
inlinestatic
Parameters
baseIRQSTEER peripheral base address.
intMasterIndexMaster index of interrupt sources to be disabled. "irqsteer_int_master_t".

For example, to disable the interrupt sources of master 1:

static bool IRQSTEER_IsInterruptSet ( IRQSTEER_Type *  base,
IRQn_Type  irq 
)
inlinestatic
Parameters
baseIRQSTEER peripheral base address.
intSrcInterrupt source status to be checked. The interrupt must be an IRQSTEER source.
Returns
The interrupt status. "true" means interrupt set. "false" means not.

For example, to check whether interrupt from output 0 of Display 1 is set:

* if (IRQSTEER_IsInterruptSet(IRQSTEER_DISPLAY1_INT_OUT0)
* {
* ...
* }
*
static bool IRQSTEER_IsMasterInterruptSet ( IRQSTEER_Type *  base)
inlinestatic
   The master interrupt status represents at least one interrupt is asserted or not among ALL interrupts.
Parameters
baseIRQSTEER peripheral base address.
Returns
The master interrupt status. "true" means at least one interrupt set. "false" means not.
Note
The master interrupt status is not affected by the function IRQSTEER_DisableMasterInterrupt.
static uint32_t IRQSTEER_GetGroupInterruptStatus ( IRQSTEER_Type *  base,
irqsteer_int_group_t  intGroupIndex 
)
inlinestatic
   The group interrupt status represents all the interrupt status within the group specified.
   This API aims for facilitating the status return of one set of interrupts.
Parameters
baseIRQSTEER peripheral base address.
intGroupIndexIndex of the interrupt group status to get.
Returns
The mask of the group interrupt status. Bit[n] set means the source with bit offset n in group intGroupIndex of IRQSTEER is asserted.
IRQn_Type IRQSTEER_GetMasterNextInterrupt ( IRQSTEER_Type *  base,
irqsteer_int_master_t  intMasterIndex 
)
Parameters
baseIRQSTEER peripheral base address.
intMasterIndexMaster index of interrupt sources. "irqsteer_int_master_t".
Returns
The current set next interrupt source number of one specific master. Return IRQSTEER_INT_Invalid if no interrupt set.