void USART1_IRQHandler(void)
{
unsigned char data;
u8 val = taskENTER_CRITICAL_FROM_ISR();
if (USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
data = USART_ReceiveData(USART1); // clear IDLE flag
// USART_SendData(USART1,data);
USART_ClearITPendingBit(USART1, USART_IT_RXNE);
}
taskEXIT_CRITICAL_FROM_ISR( val );
}
void configcom_task(void *pvParameters)
{
// unsigned char txData;
USART1_Init(115200);
while(1)
{
if(xQueueReceive(xRxQueue,&txData, portMAX_DELAY) == pdTRUE){--串口发送数据后,在这里就卡死了
taskENTER_CRITICAL();
printf("Received data:%s\n ",txData);
taskEXIT_CRITICAL();
}
}