Skip to main content
Visitor II
November 23, 2023
Question

UART communication between two Nucleo Board using DMA receive

  • November 23, 2023
  • 2 replies
  • 1424 views

I use two Nucleo-G0B1RE to communicate with each other using UART. UART5 of the master board is connected with UART1 of the slave board and both of the UARTs use DMA receive. When I first pressed the reset button of the slave board and then the master board, they could communicate successfully, but when I first pressed reset of master board and then slave board, the slave could transmit message but the master could NOT receive it. The only difference is the Power-on Sequence. what is the difference between UART detected another UART as soon as it is power on   and   UART detected after a short time.

    This topic has been closed for replies.

    2 replies

    Super User
    November 23, 2023

    If the receiver sees an invalid signal, it may enter an error state which you have to address before receiving more characters. Resetting mid-way is likely to push out an invalid signal on the UART TX line.

    JAcksonPiAuthor
    Visitor II
    November 27, 2023

    When master is initialized first, it could transmit correct message to slave and salve could send correct message (as least in txBuf) ,however master cannot receive this response. Maybe I should continously detect slave in while loop of  master code. 

    Technical Moderator
    November 24, 2023

    Hello @JAcksonPi 

     

    Could you explain "both of the UARTs use DMA receive"? Could you share your UARTs configuration and DMA initiation?

     

    JAcksonPiAuthor
    Visitor II
    November 27, 2023

    JAcksonPi_0-1701048813803.pngJAcksonPi_1-1701048844769.pngUART5 of master is connected with UART1 of salve. I used exactly the same program for both MCUs. Maybe I should add some statement to continuously detect if slave exists in master code?