Miscellaneous add-on to CMSIS functions(misc)
When the NVIC_PriorityGroup_0 is selected, it will no any nested interrupt, the
IRQ priority will be managed only by subpriority. The sub-priority is only used to
sort pending exception priorities, and does not affect active exceptions.
Lower priority values gives higher priority.
Priority Order:
1. Lowest Preemption priority.
2. Lowest Subpriority.
3. Lowest hardware priority (IRQn position).
15.2.2 MISC functions
15.2.2.1 NVIC_PriorityGroupConfig
void NVIC_PriorityGroupConfig ( uint32_t
NVIC_PriorityGroup)
Configures the priority grouping: pre-emption priority and
subpriority.
ï‚· NVIC_PriorityGroup : specifies the priority grouping bits
length. This parameter can be one of the following values:
ï€ NVIC_PriorityGroup_0 : 0 bits for pre-emption priority.
4 bits for subpriority.
ï€ NVIC_PriorityGroup_1 : 1 bits for pre-emption priority.
3 bits for subpriority.
ï€ NVIC_PriorityGroup_2 : 2 bits for pre-emption priority.
2 bits for subpriority.
ï€ NVIC_PriorityGroup_3 : 3 bits for pre-emption priority.
1 bits for subpriority.
ï€ NVIC_PriorityGroup_4 : 4 bits for pre-emption priority.
0 bits for subpriority.
ï‚· When NVIC_PriorityGroup_0 is selected, it will no be any
nested interrupt. This interrupts priority is managed only with
subpriority.