一个按键中断,按一下key1去执行里面的函数,执行到printf ( "\r\n正在配置 ESP8266 ......\r\n" );这句就不往下执行了?为什么啊?因为ESP8266_Rst ();这句里面也有中断么?还是因为延时的中断(bsp_SysTick.c)?求解答!!!!我觉得问题出在延时上了!调试把延时屏蔽就能往下运行!怎么设置他们三个的优先级?按键中断,延时中断,和串口中断?还是别的修改方法?
void EXTI0_IRQHandler (void)
{
if(EXTI_GetITStatus(EXTI_Line0) != RESET)
{
printf("\r\n按键测试\r\n");
printf ( "\r\n正在配置 ESP8266 ......\r\n" );
ESP8266_Rst ();
printf ( "\r\n测试0\r\n" );
......
}
EXTI_ClearITPendingBit(EXTI_Line0);
}
wifi串口的中断
void macESP8266_USART_INT_FUN ( void )
{
uint8_t ucCh;
if ( USART_GetITStatus ( macESP8266_USARTx, USART_IT_RXNE ) != RESET )
{
ucCh = USART_ReceiveData( macESP8266_USARTx );
if ( strEsp8266_Fram_Record .InfBit .FramLength < ( RX_BUF_MAX_LEN - 1 ) ) //预留1个字节写结束符
strEsp8266_Fram_Record .Data_RX_BUF [ strEsp8266_Fram_Record .InfBit .FramLength ++ ] = ucCh;
}
if ( USART_GetITStatus( macESP8266_USARTx, USART_IT_IDLE ) == SET ) //数据帧接收完毕
{
strEsp8266_Fram_Record .InfBit .FramFinishFlag = 1;
ucCh = USART_ReceiveData( macESP8266_USARTx ); //由软件序列清除中断标志位(先读USART_SR,然后读USART_DR)
ucTcpClosedFlag = strstr ( strEsp8266_Fram_Record .Data_RX_BUF, &quot;CLOSED\r\n&quot; ) ? 1 : 0;
}
} |