cancel
Showing results for 
Search instead for 
Did you mean: 

How cancel HAL_UART_Receive_IT

Pedram
Associate III
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

6 REPLIES 6
Zt Liu
Senior III
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();

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

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)

Posted on June 15, 2017 at 19:20

I using STM32CubeMX-4.21.0 and Firmware STM32F1 1.4.0  There is no such a function 

Why this function does not exist?

0690X00000607MNQAY.png
Posted on June 16, 2017 at 01:47

I'd never used a F1 series, there is really NO such function.

:(

Perhaps you can build a similar one.That would includes:

clear the IT bits,

and clear error flags bits and

reset the Handle parameters.

Imen.D
ST Employee
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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen