Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 1 month ago.
Second serial port for Nucleo F401
RE: Nucleo F401RE I just got this board and want to experiment with bluetooth for which I need 2nd serial port. I want to send message from my smartphone via 2nd serial line.
I need to send my received message via SERIAL_TX and SERIAL_RX pins ( Tera Term) to check my received message.
How do I set up the second comport ? Thanks.
1 Answer
10 years, 1 month ago.
I had problems getting the second serial port on my Nucleo F030R8 to work - it wasn't obvious how to do this.
Eventually, I found that the second serial port appears on pins PA-9 (USART1_TX) and PA-10 (USART1_RX).
The setup code at the beginning at the beginning of my program is:
Serial pc(SERIAL_TX, SERIAL_RX); mbed STDIO serial port Serial pc2(PA_9, PA_10); second serial port for your use.
A quick look at the STM32F401 data book suggests that the USART1 pins are the same on both devices, so this should work for you (hopefully!)