MSP432E4 DriverLib API Guide
1.11.00.03
|
Functions | |
void | SysExcIntRegister (void(*pfnHandler)(void)) |
void | SysExcIntUnregister (void) |
void | SysExcIntEnable (uint32_t ui32IntFlags) |
void | SysExcIntDisable (uint32_t ui32IntFlags) |
uint32_t | SysExcIntStatus (bool bMasked) |
void | SysExcIntClear (uint32_t ui32IntFlags) |
The system exception module driver provides methods for manipulating the behavior of the system exception module that handles system-level Cortex-M4 FPU exceptions. The exceptions are underflow, overflow, divide by zero, invalid operation, input denormal, and inexact exception. The application can optionally choose to enable one or more of these interrupts and use the interrupt handler to decide upon a course of action to be taken in each case. All the interrupt events are ORed together before being sent to the interrupt controller, so the System Exception module can only generate a single interrupt request to the controller at any given time.
The system exception module interrupts are managed with SysExcIntRegister(), SysExcIntUnregister(), SysExcIntEnable(), SysExcIntDisable(), SysExcIntStatus(), and SysExcIntClear().
The following example shows how to use the system exception module API to register an interrupt handler and enable an interrupt.
void SysExcIntRegister | ( | void(*)(void) | pfnHandler | ) |
Registers an interrupt handler for the system exception interrupt.
pfnHandler | is a pointer to the function to be called when the system exception interrupt occurs. |
This function places the address of the system exception interrupt handler into the interrupt vector table in SRAM. This function also enables the global interrupt in the interrupt controller; specific system exception interrupts must be enabled via SysExcIntEnable(). It is the interrupt handler's responsibility to clear the interrupt source.
void SysExcIntUnregister | ( | void | ) |
Unregisters the system exception interrupt handler.
This function removes the system exception interrupt handler from the vector table in SRAM. This function also masks off the system exception interrupt in the interrupt controller so that the interrupt handler is no longer called.
void SysExcIntEnable | ( | uint32_t | ui32IntFlags | ) |
Enables individual system exception interrupt sources.
ui32IntFlags | is the bit mask of the interrupt sources to be enabled. |
This function enables the indicated system exception interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
The ui32IntFlags parameter is the logical OR of any of the following:
void SysExcIntDisable | ( | uint32_t | ui32IntFlags | ) |
Disables individual system exception interrupt sources.
ui32IntFlags | is the bit mask of the interrupt sources to be disabled. |
This function disables the indicated system exception interrupt sources. Only sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.
The ui32IntFlags parameter is the logical OR of any of the following:
uint32_t SysExcIntStatus | ( | bool | bMasked | ) |
Gets the current system exception interrupt status.
bMasked | is false if the raw interrupt status is required and true if the masked interrupt status is required. |
This function returns the system exception interrupt status. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.
References HWREG, SYSEXC_MIS, and SYSEXC_RIS.
void SysExcIntClear | ( | uint32_t | ui32IntFlags | ) |
Clears system exception interrupt sources.
ui32IntFlags | is a bit mask of the interrupt sources to be cleared. |
This function clears the specified system exception interrupt sources, so that they no longer assert. This function must be called in the interrupt handler to keep the interrupt from being recognized again immediately upon exit.
The ui32IntFlags parameter is the logical OR of any of the following: