程序如下,单独使用一个都可以 同时打开两个程序就死掉了
麻烦朋友帮我看下是那里搞错了
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1); //嵌套分组为组0,均为响应优先级
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn; //中断通道为通道0
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; //抢断优先级为0
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //响应优先级为0
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //开中断
NVIC_Init(&NVIC_InitStructure);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); |