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.