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.
8 years, 4 months ago.
additional UART devices
Hi, I want to add more UART devices to my nucleo F401RE. I checked on my compiler that USBRX and USBTX is mapped to P0_2 and P0_3, what I cant seem to find out is what port pins are these? because according to the datasheet, these pins are connected to PA13 and PA14. but where is it declared that P0_2 or P0_3 is either PA13 or PA14?
essentially I wish to connect 2 UARTs to read from a uart RFID reader. is there any tutorials that you can suggest I look at for inter board communications instead of PC to PC?
thanks
Question relating to:
2 Answers
8 years, 4 months ago.
One way is to look up the board in MBED-SRC and see what the definitions are in PinNames.h.
P0_2, P0_3 looks more like NXP notation, it looks as if STM give their ports letters.
Looking in:
SERIAL_TX = PA_2, SERIAL_RX = PA_3, USBTX = PA_2, USBRX = PA_3,
Looking further it looks as if there may be further UART devices on pins PA_9,PA_10 (alts at PB_6,PC_7) and PA_11, PA_12 (alts at PC_6,PC_7)
8 years, 4 months ago.
Where did you get this P0_2 and P0_3, since the F401 does not have these pins it is incorrect. They are connected to PA_2 and PA_3 according to the pinout (D0 and D1, and no it makes no sense to connected USBTX/USBRX to D0 and D1). https://developer.mbed.org/platforms/ST-Nucleo-F401RE/
Next question, where in the datasheet does it say it is PA_13 and PA_14.
Now that pinout graph does not show all Serial (UART) connections, but it does show some of those you can use. Serial 2 is used by USBTX/USBRX, so you can use the Serial 1 and Serial 6 ones printed there. Otherwise check the reference manual for example to get other UART pins.
Hi there, I went ahead and checked on what you said, helped me look for what I needed. noticed I was looking at the code for some other board. found the right code and found my PA_2 and PA_3. also saw that PA13 and PA14 which were 2 nets in the schematics were there for programming the nucleo via ST_link and had nothing to do with uart in the first place (d'oh). ive spent a bit of time scanning through the uart section in the manual, i am a bit confused but I think I can make it work, would i be able to connect a uart to any IO pins by setting the class in mbed? like Serial dev2(PC_2, PC_3);?
posted by 25 May 2016