cancel
Showing results for 
Search instead for 
Did you mean: 

About using uart in interrupt mode

xmart
Associate II

Hi

When I configure uart in interrupt mode, can I use it in polling mode in the future? (For any reason)

my other question, when is the HAL_UART_RxCpltCallback function called, is it when all data is received ? or when byte by byte is received?

Thank you

2 REPLIES 2
TDK
Guru

You can configured UART in interrupt or polling mode at will, but it can't really be in both modes at the same time. And if you have it in interrupt mode, you will need to stop it before using it in polling mode.

In interrupt or DMA mode, HAL_UART_RxCpltCallback is called when all bytes are received.

If you feel a post has answered your question, please click "Accept as Solution".
xmart
Associate II

Thanks for yore reply

(you will need to stop it before using it in polling mode) well,how stop it?