Miscellaneous add-on to CMSIS functions(misc)
15 Miscellaneous add-on to CMSIS functions(misc)
15.1 MISC Firmware driver registers structures
15.1.1 NVIC_InitTypeDef
NVIC_InitTypeDef is defined in the stm32f30x_misc.h
Data Fields
uint8_t NVIC_IRQChannel
uint8_t NVIC_IRQChannelPreemptionPriority
uint8_t NVIC_IRQChannelSubPriority
FunctionalState NVIC_IRQChannelCmd
Field Documentation
uint8_t NVIC_InitTypeDef::NVIC_IRQChannel
Specifies the IRQ channel to be enabled or disabled. This parameter can be a
value of IRQn_Type
uint8_t NVIC_InitTypeDef::NVIC_IRQChannelPreemptionPriority
Specifies the pre-emption priority for the IRQ channel specified in
NVIC_IRQChannel. This parameter can be a value between 0 and 15. A lower
priority value indicates a higher priority
uint8_t NVIC_InitTypeDef::NVIC_IRQChannelSubPriority
Specifies the subpriority level for the IRQ channel specified in
NVIC_IRQChannel. This parameter can be a value between 0 and 15. A lower
priority value indicates a higher priority
FunctionalState NVIC_InitTypeDef::NVIC_IRQChannelCmd
Specifies whether the IRQ channel defined in NVIC_IRQChannel will be enabled
or disabled. This parameter can be set either to ENABLE or DISABLE
15.2 MISC Firmware driver API description
The following section lists the various functions of the MISC library.
15.2.1 How to configure Interrupts using driver
This section provide functions allowing to configure the NVIC interrupts (IRQ). The Cortex-
M4 exceptions are managed by CMSIS functions.
1. Configure the NVIC Priority Grouping using NVIC_PriorityGroupConfig() function
according to the following table. The table below gives the allowed values of the pre-
emption priority and subpriority according to the Priority Grouping configuration
performed by NVIC_PriorityGroupConfig function.
2. Enable and Configure the priority of the selected IRQ Channels.