CMSIS2000
0.0.7
|
Functions that manage interrupts and exceptions via the NVIC. More...
Macros | |
#define | _BIT_SHIFT(IRQn) ( (((uint32_t)(IRQn) ) & 0x03) * 8 ) |
#define | _BIT_SHIFT(IRQn) ( (((uint32_t)(IRQn) ) & 0x03) * 8 ) |
#define | _BIT_SHIFT(IRQn) ( (((uint32_t)(IRQn) ) & 0x03) * 8 ) |
#define | _IP_IDX(IRQn) ( ((uint32_t)(IRQn) >> 2) ) |
#define | _IP_IDX(IRQn) ( ((uint32_t)(IRQn) >> 2) ) |
#define | _IP_IDX(IRQn) ( ((uint32_t)(IRQn) >> 2) ) |
#define | _SHP_IDX(IRQn) ( ((((uint32_t)(IRQn) & 0x0F)-8) >> 2) ) |
#define | _SHP_IDX(IRQn) ( ((((uint32_t)(IRQn) & 0x0F)-8) >> 2) ) |
#define | _SHP_IDX(IRQn) ( ((((uint32_t)(IRQn) & 0x0F)-8) >> 2) ) |
Functions | |
__STATIC_INLINE void | NVIC_ClearPendingIRQ (IRQn_Type IRQn) |
Clear Pending Interrupt. | |
__STATIC_INLINE void | NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t *pPreemptPriority, uint32_t *pSubPriority) |
Decode Priority. | |
__STATIC_INLINE void | NVIC_DisableIRQ (IRQn_Type IRQn) |
Disable External Interrupt. | |
__STATIC_INLINE void | NVIC_EnableIRQ (IRQn_Type IRQn) |
Enable External Interrupt. | |
__STATIC_INLINE uint32_t | NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) |
Encode Priority. | |
__STATIC_INLINE uint32_t | NVIC_GetActive (IRQn_Type IRQn) |
Get Active Interrupt. | |
__STATIC_INLINE uint32_t | NVIC_GetPendingIRQ (IRQn_Type IRQn) |
Get Pending Interrupt. | |
__STATIC_INLINE uint32_t | NVIC_GetPriority (IRQn_Type IRQn) |
Get Interrupt Priority. | |
__STATIC_INLINE uint32_t | NVIC_GetPriorityGrouping (void) |
Get Priority Grouping. | |
__STATIC_INLINE void | NVIC_SetPendingIRQ (IRQn_Type IRQn) |
Set Pending Interrupt. | |
__STATIC_INLINE void | NVIC_SetPriority (IRQn_Type IRQn, uint32_t priority) |
Set Interrupt Priority. | |
__STATIC_INLINE void | NVIC_SetPriorityGrouping (uint32_t PriorityGroup) |
Set Priority Grouping. | |
__STATIC_INLINE void | NVIC_SystemReset (void) |
System Reset. |
Functions that manage interrupts and exceptions via the NVIC.
Definition at line 489 of file core_cm0.h.
Referenced by NVIC_GetPriority(), and NVIC_SetPriority().
Definition at line 600 of file core_cm0plus.h.
Definition at line 620 of file core_sc000.h.
Definition at line 491 of file core_cm0.h.
Referenced by NVIC_GetPriority(), and NVIC_SetPriority().
Definition at line 602 of file core_cm0plus.h.
Definition at line 622 of file core_sc000.h.
Definition at line 490 of file core_cm0.h.
Referenced by NVIC_GetPriority(), and NVIC_SetPriority().
Definition at line 601 of file core_cm0plus.h.
Definition at line 621 of file core_sc000.h.
__STATIC_INLINE void NVIC_ClearPendingIRQ | ( | IRQn_Type | IRQn | ) |
Clear Pending Interrupt.
The function clears the pending bit of an external interrupt.
[in] | IRQn | External interrupt number. Value cannot be negative. |
Definition at line 552 of file core_cm0.h.
References NVIC.
__STATIC_INLINE void NVIC_DecodePriority | ( | uint32_t | Priority, |
uint32_t | PriorityGroup, | ||
uint32_t * | pPreemptPriority, | ||
uint32_t * | pSubPriority | ||
) |
Decode Priority.
The function decodes an interrupt priority value with a given priority group to preemptive priority value and subpriority value. In case of a conflict between priority grouping and available priority bits (__NVIC_PRIO_BITS) the samllest possible priority group is set.
[in] | Priority | Priority value, which can be retrieved with the function NVIC_GetPriority(). |
[in] | PriorityGroup | Used priority group. |
[out] | pPreemptPriority | Preemptive priority value (starting from 0). |
[out] | pSubPriority | Subpriority value (starting from 0). |
Definition at line 1460 of file core_cm3.h.
References __NVIC_PRIO_BITS.
__STATIC_INLINE void NVIC_DisableIRQ | ( | IRQn_Type | IRQn | ) |
Disable External Interrupt.
The function disables a device-specific interrupt in the NVIC interrupt controller.
[in] | IRQn | External interrupt number. Value cannot be negative. |
Definition at line 512 of file core_cm0.h.
References NVIC.
__STATIC_INLINE void NVIC_EnableIRQ | ( | IRQn_Type | IRQn | ) |
Enable External Interrupt.
The function enables a device-specific interrupt in the NVIC interrupt controller.
[in] | IRQn | External interrupt number. Value cannot be negative. |
Definition at line 500 of file core_cm0.h.
__STATIC_INLINE uint32_t NVIC_EncodePriority | ( | uint32_t | PriorityGroup, |
uint32_t | PreemptPriority, | ||
uint32_t | SubPriority | ||
) |
Encode Priority.
The function encodes the priority for an interrupt with the given priority group, preemptive priority value, and subpriority value. In case of a conflict between priority grouping and available priority bits (__NVIC_PRIO_BITS), the samllest possible priority group is set.
[in] | PriorityGroup | Used priority group. |
[in] | PreemptPriority | Preemptive priority value (starting from 0). |
[in] | SubPriority | Subpriority value (starting from 0). |
Definition at line 1432 of file core_cm3.h.
References __NVIC_PRIO_BITS.
Get Active Interrupt.
The function reads the active register in NVIC and returns the active bit.
[in] | IRQn | Interrupt number. |
Definition at line 1375 of file core_cm3.h.
References NVIC.
Get Pending Interrupt.
The function reads the pending register in the NVIC and returns the pending bit for the specified interrupt.
[in] | IRQn | Interrupt number. |
Definition at line 528 of file core_cm0.h.
References NVIC.
Get Interrupt Priority.
The function reads the priority of an interrupt. The interrupt number can be positive to specify an external (device specific) interrupt, or negative to specify an internal (core) interrupt.
[in] | IRQn | Interrupt number. |
Definition at line 589 of file core_cm0.h.
References __NVIC_PRIO_BITS, _BIT_SHIFT, _IP_IDX, _SHP_IDX, NVIC, and SCB.
__STATIC_INLINE uint32_t NVIC_GetPriorityGrouping | ( | void | ) |
Get Priority Grouping.
The function reads the priority grouping field from the NVIC Interrupt Controller.
Definition at line 1296 of file core_cm3.h.
References SCB, SCB_AIRCR_PRIGROUP_Msk, and SCB_AIRCR_PRIGROUP_Pos.
__STATIC_INLINE void NVIC_SetPendingIRQ | ( | IRQn_Type | IRQn | ) |
Set Pending Interrupt.
The function sets the pending bit of an external interrupt.
[in] | IRQn | Interrupt number. Value cannot be negative. |
Definition at line 540 of file core_cm0.h.
References NVIC.
Set Interrupt Priority.
The function sets the priority of an interrupt.
[in] | IRQn | Interrupt number. |
[in] | priority | Priority to set. |
Definition at line 567 of file core_cm0.h.
References __NVIC_PRIO_BITS, _BIT_SHIFT, _IP_IDX, _SHP_IDX, NVIC, and SCB.
Referenced by SysTick_Config().
__STATIC_INLINE void NVIC_SetPriorityGrouping | ( | uint32_t | PriorityGroup | ) |
Set Priority Grouping.
The function sets the priority grouping field using the required unlock sequence. The parameter PriorityGroup is assigned to the field SCB->AIRCR [10:8] PRIGROUP field. Only values from 0..7 are used. In case of a conflict between priority grouping and available priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
[in] | PriorityGroup | Priority grouping field. |
Definition at line 1276 of file core_cm3.h.
References SCB, SCB_AIRCR_PRIGROUP_Msk, SCB_AIRCR_VECTKEY_Msk, and SCB_AIRCR_VECTKEY_Pos.
__STATIC_INLINE void NVIC_SystemReset | ( | void | ) |
System Reset.
The function initiates a system reset request to reset the MCU.
Definition at line 603 of file core_cm0.h.
References SCB, SCB_AIRCR_SYSRESETREQ_Msk, and SCB_AIRCR_VECTKEY_Pos.