![]() |
![]() |
MSPM0C110X Driver Library
2.05.01.00
|
![]() |
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... | |
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.
enum DL_INTERRUPT_GROUP |
void Default_Handler | ( | void | ) |
Device default Handler.
This function is defined as part of the device startup file.
|
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.
[in] | group | Group of interrupts to check. DL_INTERRUPT_GROUP |
[in] | interruptMask | Bit mask of interrupts to check. Bitwise OR of DL_INTERRUPT_GROUP_INTERRUPTS. |
Bitwise | OR of DL_INTERRUPT_GROUP_INTERRUPTS values |
__STATIC_INLINE uint32_t DL_Interrupt_getPendingGroup | ( | DL_INTERRUPT_GROUP | group | ) |
Get highest priority interrupt pending in the selected interrupt group.
[in] | group | Group of interrupts to check |
|
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.
[in] | group | Group of interrupts to check. DL_INTERRUPT_GROUP |
[in] | interruptMask | Bit mask of interrupts to clear. Bitwise OR of DL_INTERRUPT_GROUP_INTERRUPTS. |
References DL_Interrupt_registerInterrupt(), and DL_Interrupt_unregisterInterrupt().
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:
[in] | exceptionNumber | The interrupt number to register the handler. Interrupt numbers are device specific, please consult the device datasheet for valid interrupt numbers. |
[in] | intHandler | A pointer to a function to call for the desired interrupt |
Referenced by DL_Interrupt_clearGroup().
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:
[in] | exceptionNumber | The interrupt number to unregister. Interrupt numbers are device specific, please consult the device datasheet for valid interrupt numbers. |
Referenced by DL_Interrupt_clearGroup().