cancel
Showing results for 
Search instead for 
Did you mean: 

connect two stm32 board using uart

Angle
Associate II

Hi, may I know how to connect two stm32 board using uart?

Im using nucleo g071rb to transmit the data to STM32H750-DK. So basically i just want to try simple application using serial but it not successful.

so what i want to do Nucleo G071 transmit data to STM32H750 use simple application like g071 will send word HELLO to stm32h750-dk.

nucleo G071 - transmit

STM32H750 - received

this pin configuration and code for g071

0693W00000YAQ7EQAX.png 

0693W00000YAQ8CQAX.png 

this one is pin configuration and code for stm32h750-dk

0693W00000YAQ7iQAH.png0693W00000YAQ7YQAX.png0693W00000YAQ7sQAH.png 

So i have done wrong? and please someone help me.

5 REPLIES 5
KnarfB
Principal III

RX and TX must be crossed.

Receive must be "always on", so don't HAL_Delay, you may miss char's.

The blocking Receive you are using waits until the buffer is full or timeout, you might want to read single char by single char.

There are more perfomant but complex methods like reading by DMA, see https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx

hth

KnarfB

KDJEM.1
ST Employee

Hello @Angle​ ,

Please check:

-The connection between two boards:

  • Board 1 RX connected to board 2 TX
  • Board 1 TX connected to board 2 RX
  • Board 1 GND connected to board 2 GND

-Try to verify if the  Nucleo-G071rb can be able to transmit data.

May be this example help you UART_TwoBoards_ComPolling.

I hope this help you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

okay what about ADC. so i want to read the voltage on nucleo g071 then send the data to the h750-dk ? mean h750-dk is used to display the voltage from nucleo board. i got confused as i after saw a few of example

HI @Angle​ ,

If your first question has been answered, please close this topic by choosing Select as Best. This will help other users find that answer faster. 

I think it is a new request, so it is recommended to post a new question.

Thank you for your contribution in the ST Community 🙂.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi, Im sorry but I still cannot solve my problem bcs what I try to do is send the serial data (char or any number ) to another uart.

If using the push button or led, i could understand but when serial to serial i'm not really understand how to do that. I mean the code