2026-02-23 7:09 AM
Hello
I want to create sort of application that transmit and receive messages between 2 STM32F407 DISC0 and echo the transmited and received messages in PC screen(sort of chatbox)
any hints how can I do it?
and is it easier using USART or SPI?
2026-02-23 7:40 AM - edited 2026-02-23 7:44 AM
Of course, transmitting and receiving messages is exactly what UARTs are for!
You will need:
PS:
@avatar_ang wrote:and is it easier using USART or SPI?
That depends on how familiar you are with SPI...
Connecting to a PC is certainly easier via UART.
2026-02-23 7:56 AM
The simplest PC side would use UART to USB adapter cables and either two Terminal programs in the PC or one terminal program in each of two PCs.
2026-02-23 8:10 AM
@Hal3 wrote:The simplest PC side would use UART to USB adapter cables
Simpler still: the VCPs in the ST-Links on the Disco boards.
Except that @avatar_ang seems to be using STM32F407G-DISC1 - where the VCP is not connected.
@avatar_ang if you're specifically wanting to do UART comms with PCs, it would make a lot more sense to choose a different board which does have a working VCP.
eg, NUCLEO-F411RE if you want to keep in the F4 family ...
2026-02-23 8:26 AM
If the Chat application will be ultimately on a custom board and requires one PC with one connection, connect the two processors with a 485 bus using uart to 485 transceivers and connect the PC with a 485 to USB adapter. That will minimize ground problems and easily expand to more processors.