Communication between two STM32F407G with UART

Hello,
I want to communicate with two STM32F407G cart. However, i dont know how can i do that.
REQUEST:
One STM32 will send regular data with using UART( like 5 7 3 2 9 25 41 etc) and other STM32 will receive those data and multiply with 2 and than display in the terminal ( putty or other terminals )

Preview:
first STM32 sending data : 5 7 3 2 9 25 41
second STM32 multiply with 2 and display in the terminal : 10 14 9 4 18 50 82

Can someone help me on that point ?
Thank you…

Hello,

and how far you are? What is your progress?

BR, Jan

I have two STM32f407G cart and i started like 1 week ago. The essential process is receive data but i didnt do that and also i didnt find any information about receive data from usart and doing calculations then sending back to terminal.

Actually my main purpose is ;
One board should transmit 11 veriables and second board should receive those veriables and doing calculations ( like multiply ). After that second board should transmit those veriables to the Terminal with using uart.

If I understand correctly then… In general one board is sender and the second board is an UART repeater with a calculation/conversion. That mean the first board will have one Serial object what will send some data (string) via UART to second board.
The second one will have two Serial objects. The first serial object will received data from the first board and after some stuff (string to int → some stuff → int to string) it will send the data (string) to a PC via another UART connected to a UART to USB convertor (ST-link of Nucleo/Disco board or FTDI chip and so on).

My recommendation is - do not try make final state until you will understand all its parts.

  1. board to PC comunication - easy
  2. one board to second board communication via UART - easy
  3. convert a received string to number, multiply it and convert it back to string, than send it to another destination - most difficult part

So take one board and use BufferedSerial API . On its page you will found a basic documentation and also basic example. In this case a serial echo, that will help you with point 1. and also it is also good for point2.

For point two is important UART basics. Both sides (both boards) must run on same baud rate and wires must be crossed (TX->RX and RX->TX).

For point three:

BR, Jan