|
MG32F157 Standard Peripherals Firmware Library
|
Functions that manage interrupts and exceptions via the NVIC. More...
Macros | |
| #define | NVIC_SetPriorityGrouping __NVIC_SetPriorityGrouping |
| #define | NVIC_GetPriorityGrouping __NVIC_GetPriorityGrouping |
| #define | NVIC_EnableIRQ __NVIC_EnableIRQ |
| #define | NVIC_GetEnableIRQ __NVIC_GetEnableIRQ |
| #define | NVIC_DisableIRQ __NVIC_DisableIRQ |
| #define | NVIC_GetPendingIRQ __NVIC_GetPendingIRQ |
| #define | NVIC_SetPendingIRQ __NVIC_SetPendingIRQ |
| #define | NVIC_ClearPendingIRQ __NVIC_ClearPendingIRQ |
| #define | NVIC_GetActive __NVIC_GetActive |
| #define | NVIC_SetPriority __NVIC_SetPriority |
| #define | NVIC_GetPriority __NVIC_GetPriority |
| #define | NVIC_SystemReset __NVIC_SystemReset |
| #define | NVIC_SetVector __NVIC_SetVector |
| #define | NVIC_GetVector __NVIC_GetVector |
| #define | NVIC_USER_IRQ_OFFSET 16 |
| #define | EXC_RETURN_HANDLER (0xFFFFFFF1UL) /* return to Handler mode, uses MSP after return */ |
| #define | EXC_RETURN_THREAD_MSP (0xFFFFFFF9UL) /* return to Thread mode, uses MSP after return */ |
| #define | EXC_RETURN_THREAD_PSP (0xFFFFFFFDUL) /* return to Thread mode, uses PSP after return */ |
Functions | |
| __STATIC_INLINE void | __NVIC_SetPriorityGrouping (uint32_t PriorityGroup) |
| Set Priority Grouping. More... | |
| __STATIC_INLINE uint32_t | __NVIC_GetPriorityGrouping (void) |
| Get Priority Grouping. More... | |
| __STATIC_INLINE void | __NVIC_EnableIRQ (IRQn_Type IRQn) |
| Enable Interrupt. More... | |
| __STATIC_INLINE uint32_t | __NVIC_GetEnableIRQ (IRQn_Type IRQn) |
| Get Interrupt Enable status. More... | |
| __STATIC_INLINE void | __NVIC_DisableIRQ (IRQn_Type IRQn) |
| Disable Interrupt. More... | |
| __STATIC_INLINE uint32_t | __NVIC_GetPendingIRQ (IRQn_Type IRQn) |
| Get Pending Interrupt. More... | |
| __STATIC_INLINE void | __NVIC_SetPendingIRQ (IRQn_Type IRQn) |
| Set Pending Interrupt. More... | |
| __STATIC_INLINE void | __NVIC_ClearPendingIRQ (IRQn_Type IRQn) |
| Clear Pending Interrupt. More... | |
| __STATIC_INLINE uint32_t | __NVIC_GetActive (IRQn_Type IRQn) |
| Get Active Interrupt. More... | |
| __STATIC_INLINE void | __NVIC_SetPriority (IRQn_Type IRQn, uint32_t priority) |
| Set Interrupt Priority. More... | |
| __STATIC_INLINE uint32_t | __NVIC_GetPriority (IRQn_Type IRQn) |
| Get Interrupt Priority. More... | |
| __STATIC_INLINE uint32_t | NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) |
| Encode Priority. More... | |
| __STATIC_INLINE void | NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t *const pPreemptPriority, uint32_t *const pSubPriority) |
| Decode Priority. More... | |
| __STATIC_INLINE void | __NVIC_SetVector (IRQn_Type IRQn, uint32_t vector) |
| Set Interrupt Vector. More... | |
| __STATIC_INLINE uint32_t | __NVIC_GetVector (IRQn_Type IRQn) |
| Get Interrupt Vector. More... | |
| __NO_RETURN __STATIC_INLINE void | __NVIC_SystemReset (void) |
| System Reset. More... | |
Functions that manage interrupts and exceptions via the NVIC.
| __STATIC_INLINE void __NVIC_ClearPendingIRQ | ( | IRQn_Type | IRQn | ) |
Clear Pending Interrupt.
Clears the pending bit of a device specific interrupt in the NVIC pending register.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE void __NVIC_DisableIRQ | ( | IRQn_Type | IRQn | ) |
Disable Interrupt.
Disables a device specific interrupt in the NVIC interrupt controller.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE void __NVIC_EnableIRQ | ( | IRQn_Type | IRQn | ) |
Enable Interrupt.
Enables a device specific interrupt in the NVIC interrupt controller.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE uint32_t __NVIC_GetActive | ( | IRQn_Type | IRQn | ) |
Get Active Interrupt.
Reads the active register in the NVIC and returns the active bit for the device specific interrupt.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE uint32_t __NVIC_GetEnableIRQ | ( | IRQn_Type | IRQn | ) |
Get Interrupt Enable status.
Returns a device specific interrupt enable status from the NVIC interrupt controller.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE uint32_t __NVIC_GetPendingIRQ | ( | IRQn_Type | IRQn | ) |
Get Pending Interrupt.
Reads the NVIC pending register and returns the pending bit for the specified device specific interrupt.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE uint32_t __NVIC_GetPriority | ( | IRQn_Type | IRQn | ) |
Get Interrupt Priority.
Reads the priority of a device specific interrupt or a processor exception. The interrupt number can be positive to specify a device specific interrupt, or negative to specify a processor exception.
| [in] | IRQn | Interrupt number. |
| __STATIC_INLINE uint32_t __NVIC_GetPriorityGrouping | ( | void | ) |
Get Priority Grouping.
Reads the priority grouping field from the NVIC Interrupt Controller.
| __STATIC_INLINE uint32_t __NVIC_GetVector | ( | IRQn_Type | IRQn | ) |
Get Interrupt Vector.
Reads an interrupt vector from interrupt vector table. The interrupt number can be positive to specify a device specific interrupt, or negative to specify a processor exception.
| [in] | IRQn | Interrupt number. |
| __STATIC_INLINE void __NVIC_SetPendingIRQ | ( | IRQn_Type | IRQn | ) |
Set Pending Interrupt.
Sets the pending bit of a device specific interrupt in the NVIC pending register.
| [in] | IRQn | Device specific interrupt number. |
| __STATIC_INLINE void __NVIC_SetPriority | ( | IRQn_Type | IRQn, |
| uint32_t | priority | ||
| ) |
Set Interrupt Priority.
Sets the priority of a device specific interrupt or a processor exception. The interrupt number can be positive to specify a device specific interrupt, or negative to specify a processor exception.
| [in] | IRQn | Interrupt number. |
| [in] | priority | Priority to set. |
| __STATIC_INLINE void __NVIC_SetPriorityGrouping | ( | uint32_t | PriorityGroup | ) |
Set Priority Grouping.
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. |
| __STATIC_INLINE void __NVIC_SetVector | ( | IRQn_Type | IRQn, |
| uint32_t | vector | ||
| ) |
Set Interrupt Vector.
Sets an interrupt vector in SRAM based interrupt vector table. The interrupt number can be positive to specify a device specific interrupt, or negative to specify a processor exception. VTOR must been relocated to SRAM before.
| [in] | IRQn | Interrupt number |
| [in] | vector | Address of interrupt handler function |
| __NO_RETURN __STATIC_INLINE void __NVIC_SystemReset | ( | void | ) |
System Reset.
Initiates a system reset request to reset the MCU.
| __STATIC_INLINE void NVIC_DecodePriority | ( | uint32_t | Priority, |
| uint32_t | PriorityGroup, | ||
| uint32_t *const | pPreemptPriority, | ||
| uint32_t *const | pSubPriority | ||
| ) |
Decode Priority.
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 smallest 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). |
| __STATIC_INLINE uint32_t NVIC_EncodePriority | ( | uint32_t | PriorityGroup, |
| uint32_t | PreemptPriority, | ||
| uint32_t | SubPriority | ||
| ) |
Encode Priority.
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 smallest 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). |