MSPM0C110X Driver Library  2.05.01.00
Modules | Enumerations | Functions
M0P Interrupts
Collaboration diagram for M0P Interrupts:

Modules

 DL_INTERRUPT_GROUP_IIDX
 
 DL_INTERRUPT_GROUP_INTERRUPTS
 

Enumerations

enum  DL_INTERRUPT_GROUP {
  DL_INTERRUPT_GROUP_0 = 0,
  DL_INTERRUPT_GROUP_1 = 1
}
 

Functions

void Default_Handler (void)
 Device default Handler. More...
 
static uint32_t DL_Interrupt_getStatusGroup (DL_INTERRUPT_GROUP group, uint32_t interruptMask)
 Checks interrupt flag status in the selected group of interrupts. More...
 
__STATIC_INLINE uint32_t DL_Interrupt_getPendingGroup (DL_INTERRUPT_GROUP group)
 Get highest priority interrupt pending in the selected interrupt group. More...
 
static void DL_Interrupt_clearGroup (DL_INTERRUPT_GROUP group, uint32_t interruptMask)
 Clear selected interrupt flags in the selected interrupt group. More...
 
void DL_Interrupt_registerInterrupt (uint32_t exceptionNumber, void(*intHandler)(void))
 Register a function to be called when an interrupt occurs. More...
 
void DL_Interrupt_unregisterInterrupt (uint32_t exceptionNumber)
 Unregister a function to be called when an interrupt occurs. More...
 

Detailed Description

Overview

The Cortex-M0+ architecture is limited to 32 device interrupts. To enable interrupt handling on devices that need more than 32 interrupts, the interrupts are grouped together.

For example, "Group 0" contains the interrupt flags for the WWDT0, WWDT1, DEBUGSS, FLASH, and SYSCTL peripherals. Once the interrupt fires for Group 0, the application must check to see which peripheral from Group 0 was the source using the APIs in this module.

This PI module is not for controlling the NVIC or the I-bit in the CPSR register. It's best to use the CMSIS-Core APIs that are delivered as part of CMSIS-Core in the source/third_party/CMSIS/Core/Include/core_cm0plus.h file within the SDK.


Enumeration Type Documentation

§ DL_INTERRUPT_GROUP

Enumerator
DL_INTERRUPT_GROUP_0 

Selects interrupt group 0

DL_INTERRUPT_GROUP_1 

Selects interrupt group 1

Function Documentation

§ Default_Handler()

void Default_Handler ( void  )

Device default Handler.

This function is defined as part of the device startup file.

§ DL_Interrupt_getStatusGroup()

static uint32_t DL_Interrupt_getStatusGroup ( DL_INTERRUPT_GROUP  group,
uint32_t  interruptMask 
)
inlinestatic

Checks interrupt flag status in the selected group of interrupts.

Checks if any of the interrupts in the group are pending. When calling the function, ensure that the interrupts passed in the mask are applicable to the requested interrupt group.

Parameters
[in]groupGroup of interrupts to check. DL_INTERRUPT_GROUP
[in]interruptMaskBit mask of interrupts to check. Bitwise OR of DL_INTERRUPT_GROUP_INTERRUPTS.
Returns
Which of the requested group interrupts are pending
Return values
BitwiseOR of DL_INTERRUPT_GROUP_INTERRUPTS values

§ DL_Interrupt_getPendingGroup()

__STATIC_INLINE uint32_t DL_Interrupt_getPendingGroup ( DL_INTERRUPT_GROUP  group)

Get highest priority interrupt pending in the selected interrupt group.

Parameters
[in]groupGroup of interrupts to check
Returns
The highest priority pending interrupt for the group requested. One of DL_INTERRUPT_GROUP_IIDX

§ DL_Interrupt_clearGroup()

static void DL_Interrupt_clearGroup ( DL_INTERRUPT_GROUP  group,
uint32_t  interruptMask 
)
inlinestatic

Clear selected interrupt flags in the selected interrupt group.

Clears any of the desired interrupts in the group. When calling the function, ensure that the interrupts passed in the mask are applicable to the requested interrupt group.

Parameters
[in]groupGroup of interrupts to check. DL_INTERRUPT_GROUP
[in]interruptMaskBit mask of interrupts to clear. Bitwise OR of DL_INTERRUPT_GROUP_INTERRUPTS.

References DL_Interrupt_registerInterrupt(), and DL_Interrupt_unregisterInterrupt().

§ DL_Interrupt_registerInterrupt()

void DL_Interrupt_registerInterrupt ( uint32_t  exceptionNumber,
void(*)(void)  intHandler 
)

Register a function to be called when an interrupt occurs.

This allows you to register a function to be called during an interrupt, allowing you to override the interrupt handler at run time. The function moves the interrupt vector table from Flash to SRAM so that the interrupt handler functions can be overwritten.

This function should only be used if the application requires specifying the interrupt handler at run time. If it does not need to be changed at run time consider placing the ISR function pointer in the startup file to link the function into the interrupt table.

Example of usage:

DL_Interrupt_registerInterrupt(TIMA0_INT_IRQn, redirectedInterruptHandler);
Parameters
[in]exceptionNumberThe interrupt number to register the handler. Interrupt numbers are device specific, please consult the device datasheet for valid interrupt numbers.
[in]intHandlerA pointer to a function to call for the desired interrupt

Referenced by DL_Interrupt_clearGroup().

§ DL_Interrupt_unregisterInterrupt()

void DL_Interrupt_unregisterInterrupt ( uint32_t  exceptionNumber)

Unregister a function to be called when an interrupt occurs.

Overrides the registered interrupt function to jump into a simple while(1) loop rather than the previously registered interrupt function. Requires that DL_Interrupt_registerInterrupt was previously called so that the interrupt vector table has been moved to RAM.

Example of usage:

Parameters
[in]exceptionNumberThe interrupt number to unregister. Interrupt numbers are device specific, please consult the device datasheet for valid interrupt numbers.

Referenced by DL_Interrupt_clearGroup().

© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale