Skip to main content
Pedram
Associate III
June 15, 2017
Question

How cancel HAL_UART_Receive_IT

  • June 15, 2017
  • 6 replies
  • 1509 views
Posted on June 15, 2017 at 13:54

Hello to all friends,

I want If not receive the data In the specified time , cancel The HAL_UART_Receive_IT And re-send request 

command

I don't want use HAL_UART_Receive I want use HAL_UART_Receive_IT How make timeout for this ?

Many thanks

    This topic has been closed for replies.

    6 replies

    Zt Liu
    Senior III
    June 15, 2017
    Posted on June 15, 2017 at 16:26

    Hi, you may try to setup a Timer to check timeout.

    If timeout occurs, just called HAL_UART_AbortReceive_IT();

    Pedram
    PedramAuthor
    Associate III
    June 15, 2017
    Posted on June 15, 2017 at 17:20

    Hi, thank you very much 

    This function, in which File located? I looked but could not be found

    Zt Liu
    Senior III
    June 15, 2017
    Posted on June 15, 2017 at 17:36

    stm32xx(your-device)xx_hal_uart.c, and .h

    (so it your device is STM32L0xx, it is located in stm32l0xx_hal_uart.c/.h)

    ST Technical Moderator
    April 18, 2018
    Posted on April 18, 2018 at 13:58

    Hello

    Azadfalah.Sajjad

    ,

    Please update the last version of STM32CubeF1 firmware package updated to use the

    HAL_UART_AbortReceive_IT

    function.

    Best Regards,

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks