Functions | |
unsigned char | IntMasterEnable (void) |
unsigned char | IntMasterDisable (void) |
void | IntRegister (IRQn_Type ulInterrupt, void(*pfnHandler)(void *)) |
void | IntUnregister (IRQn_Type ulInterrupt) |
void | IntPrioritySet (IRQn_Type Interrupt, uint32_t Priority) |
uint32_t | IntPriorityGet (IRQn_Type Interrupt) |
void | IntEnable (IRQn_Type ulInterrupt) |
void | IntDisable (IRQn_Type ulInterrupt) |
int | IntIsEnabled (IRQn_Type ulInterrupt) |
void | Cortex_IntInit (void) |
void | CortexExceptHandler (int state) |
Variables | |
void * | _evect |
unsigned char IntMasterEnable | ( | void | ) |
Enables the processor interrupt.
Allows the processor to respond to interrupts. This does not affect the set of interrupts enabled in the interrupt controller; it just gates the single interrupt from the controller to the processor.
References CPUcpsie().
unsigned char IntMasterDisable | ( | void | ) |
Disables the processor interrupt.
Prevents the processor from receiving interrupts. This does not affect the set of interrupts enabled in the interrupt controller; it just gates the single interrupt from the controller to the processor.
References CPUcpsid().
void IntRegister | ( | IRQn_Type | ulInterrupt, |
void(*)(void *) | pfnHandler | ||
) |
Registers a function to be called when an interrupt occurs.
ulInterrupt | specifies the interrupt in question. |
pfnHandler | is a pointer to the function to be called. |
This function is used to specify the handler function to be called when the given interrupt is asserted to the processor. When the interrupt occurs, if it is enabled (via IntEnable()), the handler function will be called in interrupt context. Since the handler function can preempt other code, care must be taken to protect memory or peripherals that are accessed by the handler and other non-handler code.
References NUTASSERT.
Referenced by DMA_Init(), and NutRegisterTimer().
void IntUnregister | ( | IRQn_Type | ulInterrupt | ) |
Unregisters the function to be called when an interrupt occurs.
ulInterrupt | specifies the interrupt in question. |
This function is used to indicate that no handler should be called when the given interrupt is asserted to the processor. The interrupt source will be automatically disabled (via IntDisable()) if necessary.
References NUTASSERT.
Sets the priority grouping of the interrupt controller.
ulBits | specifies the number of bits of preemptable priority. |
This function specifies the split between preemptable priority levels and subpriority levels in the interrupt priority specification. The range of the grouping values are dependent upon the hardware implementation; on the Stellaris family, three bits are available for hardware interrupt prioritization and therefore priority grouping values of three through seven have the same effect.
This function returns the split between preemptable priority levels and subpriority levels in the interrupt priority specification.
ulInterrupt | specifies the interrupt in question. |
ucPriority | specifies the priority of the interrupt. |
This function is used to set the priority of an interrupt. When multiple interrupts are asserted simultaneously, the ones with the highest priority are processed before the lower priority interrupts. Smaller numbers correspond to higher interrupt priorities; priority 0 is the highest interrupt priority.
The hardware priority mechanism will only look at the upper N bits of the priority level (where N is 3 for the Stellaris family), so any prioritization must be performed in those bits. The remaining bits can be used to sub-prioritize the interrupt sources, and may be used by the hardware priority mechanism on a future part. This arrangement allows priorities to migrate to different NVIC implementations without changing the gross prioritization of the interrupts.
References NVIC_SetPriority().
Gets the priority of an interrupt.
ulInterrupt | specifies the interrupt in question. |
This function gets the priority of an interrupt. See IntPrioritySet() for a definition of the priority value.
References NVIC_GetPriority().
void IntEnable | ( | IRQn_Type | ulInterrupt | ) |
Enables an interrupt.
ulInterrupt | specifies the interrupt to be enabled. |
The specified interrupt is enabled in the interrupt controller. Other enables for the interrupt (such as at the peripheral level) are unaffected by this function.
References BusFault_IRQn, MemoryManagement_IRQn, NVIC_EnableIRQ(), SCB, SCB_SHCSR_BUSFAULTENA_Msk, SCB_SHCSR_MEMFAULTENA_Msk, SCB_SHCSR_USGFAULTENA_Msk, SysTick, SysTick_CTRL_TICKINT_Msk, SysTick_IRQn, and UsageFault_IRQn.
Referenced by Cortex_IntInit(), and DMA_Init().
void IntDisable | ( | IRQn_Type | ulInterrupt | ) |
Disables an interrupt.
ulInterrupt | specifies the interrupt to be disabled. |
The specified interrupt is disabled in the interrupt controller. Other enables for the interrupt (such as at the peripheral level) are unaffected by this function.
References BusFault_IRQn, MemoryManagement_IRQn, NVIC_DisableIRQ(), SCB, SCB_SHCSR_BUSFAULTENA_Msk, SCB_SHCSR_MEMFAULTENA_Msk, SCB_SHCSR_USGFAULTENA_Msk, SysTick, SysTick_CTRL_TICKINT_Msk, SysTick_IRQn, and UsageFault_IRQn.
Referenced by Cortex_IntInit().
int IntIsEnabled | ( | IRQn_Type | ulInterrupt | ) |
Check if an interrupt is enabled.
ulInterrupt | specifies the interrupt to check. |
Check if the specified interrupt is enabled in the interrupt controller.
References BusFault_IRQn, HardFault_IRQn, MemoryManagement_IRQn, NonMaskableInt_IRQn, NVIC_GetEnableIRQ, rc, SCB, SCB_SHCSR_BUSFAULTENA_Msk, SCB_SHCSR_MEMFAULTENA_Msk, SCB_SHCSR_USGFAULTENA_Msk, SysTick, SysTick_CTRL_TICKINT_Msk, SysTick_IRQn, and UsageFault_IRQn.
void Cortex_IntInit | ( | void | ) |
References __enable_irq(), g_pfnVectors, IntDisable(), IntEnable(), NULL, SCB, SCB_ICSR_ISRPENDING_Msk, SCB_ICSR_PENDSTCLR_Msk, and SCB_ICSR_PENDSVCLR_Msk.
Referenced by Cortex_Start().
void CortexExceptHandler | ( | int | state | ) |
References __get_CONTROL(), __set_CONTROL(), SCB, SCB_SHCSR_BUSFAULTENA, SCB_SHCSR_MEMFAULTENA, and SCB_SHCSR_USGFAULTENA.
void* _evect |