Skip to main content
Vu.Andy
Associate III
July 1, 2016
Question

Question on USART interrupt and when it occurs

  • July 1, 2016
  • 1 reply
  • 440 views
Posted on July 01, 2016 at 20:26

For example, if I call the function HAL_UART_Receive_IT() with a buffer size of 16.

When will the interrupt be triggered?

Is it when all 16 bytes are filled up?  Or when the Usart finished received all the data?

Will the interrupt get triggered in the middle of receiving a message?

Also when the interrupt is finished, how do I clear the buffer?

Thanks.

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    July 1, 2016
    Posted on July 01, 2016 at 21:02

    The architecture will INTERRUPT for each byte, the library CALLBACK will occur when it has the 16 you asked for, right?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..