9 years, 3 months ago.

connecting two nucleo f401re through serial

I need to connect two nucleo boards and in the pin-outs figures of the board, I found "TX STDIO1, RX STDIO6, TX STDIO1, RX STDIO1, TX STDIO2, and TX STDIO1"

It is ok to see TX, RX STDIO2 in pair but why there is only one RX STDIO6 and RX STDIO1 ; and two TX STDIO1... I mean they don't come in pair. and What does STDIO here means - std input output??

And in the example program

Serial pc(USBTX, USBRX);

do USBTX and USBRX represent some specific pins on the board?

The pinouts of the necleo board is as follow:

/media/uploads/princekham/arduino_headers.png

1 Answer

9 years, 3 months ago.

The diagram above seems outdated. Check the platform page here

STDIO X means that UART hardware port X is connected to those pins.

USBTX and USBRX are connected to UART2 port and they are hardwired to the nucleo PC interface for serial/printf communication with your host PC. The pins D0/D1 in the diagram above are NOT connected by default and you cant use them.

The easily available UART serial ports are UART1 and UART6. Connect TX on one F401 to RX on the other and vice versa. Also make sure you have a common ground between the two boards.

Select the port in your code by picking the proper pinname.

Serial uart1(PB_6, PA_9);

Accepted Answer

This example will not work since both pins PB_6 and PA_9 are assigned to UART_TX Something like this will work much better: Serial uart1(PB_6, PA_10);

posted by Mihai Indricean 29 Jul 2016