我两个工程,一个调试串口,另外一个是调试i2c,串口打开了接收中断的话,当串口上有数据要接收时,程序就hard fault,中断产生时,进行任务切换,就挂了,还没有运行到中断服务程序.
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
NVIC_InitStructure.NVIC_IRQChannel = EVAL_COM1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
什么情况? |