11 years, 6 months ago.

Cannot get change serial to PA_2 and PA_3 on Nucleo F401RE

if I define serial as :-

Serial s(PA_2, PA_3);

If I do the following

s.printf("Hello\n\r");

The serial still comes out on the PC link.

On the board PA_2 and PA_3 are defined as TX and RX.

What am I doing wrong?

1 Answer

11 years, 6 months ago.

PA_2 and PA_3 are the stdio serial pins: they are the ones used for the PC link, so it comes out on both PC and those pins at the same time.

Accepted Answer

Thanks for the answer. Reading the Nucleo manual I found by default the tx and rx pins are not not connected. To disconnect the PC link you have to remove link SB13 & SB14. To connect rx and tx you have to link SB62 & SB63.

posted by David House 09 Mar 2014