uart1中断方式接收后不返回主程序了,但新的中断还能进来,芯片型号STM32F103RCT6
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
uint8_t i;
for(i=0;i<9;i=i+1)
{
tembuffer=rxbuffer;
}
if(HAL_UART_Receive_IT(&huart1, rxbuffer, 5)==HAL_OK )
{Error_Handler();}
HAL_UART_Receive_IT(&huart1, rxbuffer, 5);
//UNUSED(huart);
}
|