Functions
Sysexc_api

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)
 

Detailed Description

Function Documentation

§ SysExcIntRegister()

void SysExcIntRegister ( void(*)(void)  pfnHandler)

Registers an interrupt handler for the system exception interrupt.

Parameters
pfnHandleris 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.

See also
IntRegister() for important information about registering interrupt handlers.
Returns
None.

§ SysExcIntUnregister()

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.

See also
IntRegister() for important information about registering interrupt handlers.
Returns
None.

§ SysExcIntEnable()

void SysExcIntEnable ( uint32_t  ui32IntFlags)

Enables individual system exception interrupt sources.

Parameters
ui32IntFlagsis 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:

  • SYSEXC_INT_FP_IXC - Floating-point inexact exception interrupt
  • SYSEXC_INT_FP_OFC - Floating-point overflow exception interrupt
  • SYSEXC_INT_FP_UFC - Floating-point underflow exception interrupt
  • SYSEXC_INT_FP_IOC - Floating-point invalid operation interrupt
  • SYSEXC_INT_FP_DZC - Floating-point divide by zero exception interrupt
  • SYSEXC_INT_FP_IDC - Floating-point input denormal exception interrupt
Returns
None.

References HWREG, and SYSEXC_IM.

§ SysExcIntDisable()

void SysExcIntDisable ( uint32_t  ui32IntFlags)

Disables individual system exception interrupt sources.

Parameters
ui32IntFlagsis 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:

  • SYSEXC_INT_FP_IXC - Floating-point inexact exception interrupt
  • SYSEXC_INT_FP_OFC - Floating-point overflow exception interrupt
  • SYSEXC_INT_FP_UFC - Floating-point underflow exception interrupt
  • SYSEXC_INT_FP_IOC - Floating-point invalid operation interrupt
  • SYSEXC_INT_FP_DZC - Floating-point divide by zero exception interrupt
  • SYSEXC_INT_FP_IDC - Floating-point input denormal exception interrupt
Returns
None.

References HWREG, and SYSEXC_IM.

§ SysExcIntStatus()

uint32_t SysExcIntStatus ( bool  bMasked)

Gets the current system exception interrupt status.

Parameters
bMaskedis 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.

Returns
Returns the current system exception interrupt status, enumerated as the logical OR of SYSEXC_INT_FP_IXC, SYSEXC_INT_FP_OFC, SYSEXC_INT_FP_UFC, SYSEXC_INT_FP_IOC, SYSEXC_INT_FP_DZC, and SYSEXC_INT_FP_IDC.

References HWREG, SYSEXC_MIS, and SYSEXC_RIS.

§ SysExcIntClear()

void SysExcIntClear ( uint32_t  ui32IntFlags)

Clears system exception interrupt sources.

Parameters
ui32IntFlagsis 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:

  • SYSEXC_INT_FP_IXC - Floating-point inexact exception interrupt
  • SYSEXC_INT_FP_OFC - Floating-point overflow exception interrupt
  • SYSEXC_INT_FP_UFC - Floating-point underflow exception interrupt
  • SYSEXC_INT_FP_IOC - Floating-point invalid operation interrupt
  • SYSEXC_INT_FP_DZC - Floating-point divide by zero exception interrupt
  • SYSEXC_INT_FP_IDC - Floating-point input denormal exception interrupt
Note
Because there is a write buffer in the Cortex-M processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (because the interrupt controller still sees the interrupt source asserted).
Returns
None.

References HWREG, and SYSEXC_IC.

Copyright 2017, Texas Instruments Incorporated