NVIC配置中断的时候,配置一个TIM和一个USART的时候,TIM的中断就失效了呢?单独配置一个TIM就没有问题 下面这样配置就出错 //配置LED灯用的TIM4中断优先级 NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); //配置LED灯用的TIM4中断优先级 NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); |
评分
查看全部评分
NVIC_InitStructure.NVIC_IRQChannelSubPriority=1;
评分
查看全部评分
评分
查看全部评分