新手入门
- 积分
- 8
- 金钱
- 8
- 注册时间
- 2023-6-14
- 在线时间
- 1 小时
|
发表于 2023-9-22 13:05:48
|
显示全部楼层
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=7;//抢占优先级
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; //子优先级
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; //IRQ通道使能
NVIC_Init(&NVIC_InitStructure); //根据指定的参数初始化VIC寄存器
void USART1_IRQHandler(void)//串口1中断服务程序
{
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
Res =USART_ReceiveData(USART1);
USART_ClearFlag(USART1,USART_IT_RXNE);
}
//xTaskNotifyFromISR(USART_Receivedata,1,eSetValueWithOverwrite,pdFALSE);
}
调用API马上报错 |
|