cancel
Showing results for 
Search instead for 
Did you mean: 

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.

wwgww
Associate II
 
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);
 
  }
 
}

1 REPLY 1
Bruno_ST
ST Employee

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.