//NVIC配置
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn;// | TIM4_IRQn;一起配置会出错!!!
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 3;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel = TIM4_IRQn;
NVIC_Init(&NVIC_InitStructure);
如上, NVIC_InitStructure.NVIC_IRQChannel = TIM3_IRQn | TIM4_IRQn这样一起配置TIM3/4的NVIC,会出错,结果是配置不成功。本来想偷点懒,看来不能这样配置。请教为何? |