Skip to main content
Explorer
June 27, 2025
Question

what do they mean by UART multibuffer communication?

  • June 27, 2025
  • 6 replies
  • 834 views

Tell me about multibuffer communication in the registers of the UART. We have a description of the RXNE flag. "The RXNE flag can also be cleared by writing a zero to it. This clearing sequence is recommended only for multibuffer communication". It turns out that when using DMA, you can reset RXNE this way. But why? After all, DMA does this automatically during operation.


Edited to add 'F4' and 'DMA' Labels.

    This topic has been closed for replies.

    6 replies

    Super User
    June 27, 2025

    Which document are you referring to?

    A screenshot with context would help ...

    RSolo.1Author
    Explorer
    June 27, 2025

    this is from the reference manual:
    Bit 5 RXNE: Read data register not empty
    This bit is set by hardware when the content of the RDR shift register has been transferred
    to the USART_DR register. An interrupt is generated if RXNEIE=1 in the USART_CR1
    register. It is cleared by a read to the USART_DR register. The RXNE flag can also be
    cleared by writing a zero to it. This clearing sequence is recommended only for multibuffer
    communication.
    0: Data is not received
    1: Received data is ready to be read.

    Super User
    June 27, 2025

    @RSolo.1 wrote:

    this is from the reference manual:


    What Reference Manual?

    You haven't given a part number!

    How to write your question to maximize your chances to find a solution.

     

    RSolo.1Author
    Explorer
    June 27, 2025

    I beg your pardon. Here is the document. RM0090

    Graduate II
    June 27, 2025

    Identify the part you're talking about, ST makes literally hundreds of different STM32 parts.

    Multi-Processor mode is a 9-bit comms mode using a bit to Identify command/data in other 8-bits.

    Some parts have FIFO of varying depths for some UART

    RSolo.1Author
    Explorer
    June 27, 2025

    I'm not talking about multi-processor. I speak for multibuffer communication. 
    as I understand it, in this mode in DMA two address spaces are used: DMA stream x memory 0 address register and DMA stream x memory 1 address register.
    otherwise it is called Double buffer mode

    RSolo.1Author
    Explorer
    June 27, 2025

    yes, that's it. I just don't understand in what situation it might be necessary to do this: The RXNE flag can also be cleared by writing a zero to it.

    Super User
    June 27, 2025

    As it says,

    "The RXNE bit must be cleared before the end of the reception of the next character to avoid an overrun error"

    (my emphasis)


    So it's just informing you that, in the multibuffer case, the DMA does take care of it - so you don't have to ?

     

    PS:

    To the question in the title, "what do they mean by UART multibuffer communication?" I agree that the term "multibuffer" is never actually defined  in the document!

    Does it just mean, "any transfer using DMA"?

     
    AndrewNeil_0-1751022872762.png

     

    RSolo.1Author
    Explorer
    June 27, 2025

    I understand, thank you. They just confused me with their text. I already thought that in some cases it needs to be done manually

    Super User
    June 27, 2025

    @RSolo.1 wrote:

    I already thought that in some cases it needs to be done manually


    Indeed it does.