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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-11-07 10:41 PM
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);
}
}
Labels:
- Labels:
-
UART-USART
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-11-08 3:57 AM
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.
