void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct)
typedef struct { uint8_t NVIC_IRQChannel; uint8_t NVIC_IRQChannelPreemptionPriority; uint8_t NVIC_IRQChannelSubPriority; FunctionalState NVIC_IRQChannelCmd; } NVIC_InitTypeDef
NVIC_PriorityGroup | NVIC_IRQChannel PreemptionPriority | NVIC_IRQChannel SubPriority | 説明 |
NVIC_PriorityGroup_0 | 0 | 0-15 | 0 bits for pre-emption priority 4 bits for subpriority |
NVIC_PriorityGroup_1 | 0-1 | 0-7 | 1 bits for pre-emption priority 3 bits for subpriority |
NVIC_PriorityGroup_2 | 0-3 | 0-3 | 2 bits for pre-emption priority 2 bits for subpriority |
NVIC_PriorityGroup_3 | 0-7 | 0-1 | 3 bits for pre-emption priority 1 bits for subpriority |
NVIC_PriorityGroup_4 | 0-15 | 0 | 4 bits for pre-emption priority 0 bits for subpriority |
NVIC_InitTypeDef NVIC_InitStructure; /* Enable the TIM4 Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x03; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);