Skip to main content
Michael Ruppe
Associate
December 9, 2016
Question

Multiple messages queuing for HAL_UART_Transmit_IT

  • December 9, 2016
  • 1 reply
  • 1042 views
Posted on December 09, 2016 at 11:47

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    1 reply

    toby2
    Senior
    December 24, 2016
    Posted on December 24, 2016 at 17:44

    I don't know if you sorted this but I made a thread recently which might help:

    https://community.st.com/0D50X00009XkeYkSAJ

    basically (looking at your short version only) HAL_UART_Transmit_IT() is not blocking so you are writing to buffer (the second sprintf) before the first lot of data is transmitted.

    You have 3 options:

    1. wait for the 1st transmission to finish before writing to the buffer,
    2. set up a system where you either use separate buffers or unused parts of the buffer the 2nd time
    3. don't user HAL as it is much simpler without