Skip to main content
wwgww
Associate
November 8, 2021
Question

How to stop receive data in this code? or How to stop a get char? I used Interrupt to scan WiFi Information. I need only SSID. To input a buffer (Ring or FIFO) but it keeps bringing inform.

  • November 8, 2021
  • 1 reply
  • 781 views
 
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
 
 
 
 if(huart->Instance == USART2)
 {
 RX_Data[Rx_Index] = RXD;
 Rx_Index++;
 HAL_UART_Receive_IT(&UART2_WIFI,&RXD,1);
 
 }
 
}

This topic has been closed for replies.

1 reply

ST Employee
November 8, 2021

Hello @wwgww​ 

Just call HAL_UART_AbortReceive_IT() function to abort any ongoing Rx transfer started in Interrupt.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.