
This example show the mode to use UASRT1 and USART2 on NUCLEO-L152RE. USART2 it is used for debug (connected to the PC) using TeraTerm. USART1 it is used for show the way to use another USART.
Revision 1:676a504fc5e7, committed 2014-06-28
- Comitter:
- emcu
- Date:
- Sat Jun 28 18:17:43 2014 +0000
- Parent:
- 0:fb2930dc304c
- Commit message:
- 28-06-2014; Change SERIAL1_TX from D8 (PA_9) to D10 (PB_6)
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r fb2930dc304c -r 676a504fc5e7 main.cpp --- a/main.cpp Fri Jun 27 23:31:38 2014 +0000 +++ b/main.cpp Sat Jun 28 18:17:43 2014 +0000 @@ -42,7 +42,7 @@ ++++++++++++++++++++++ How to use this example ++++++++++++++++++++++ - For test this example connect with a jumper D2 to D8. + For test this example connect with a jumper D2 (SERIAL1_RX) to D10 (SERIAL1_TX). Press and release the Blue Button and you must see the green LED ON for 1 second. At the same time some message are displayed via USB Virtual COM on your PC. @@ -50,6 +50,11 @@ Similar, if you press E on your Tera Term (PC) you must see the green LED ON for 1 second. + ++++++++++++++++++++++ Changes + + 28-06-2014 + Change SERIAL1_TX from D8 (PA_9) to D10 (PB_6) + */ @@ -58,7 +63,7 @@ #include "mbed.h" Serial pc(SERIAL_TX, SERIAL_RX); // This is USART2 tx, rx -Serial Serial1(PA_9, PA_10); // This is USART1 tx, rx +Serial Serial1(PB_6, PA_10); // This is USART1 tx, rx DigitalOut myled(LED1); // This LED is on NUCLEO-L152RE DigitalIn BlueButton(USER_BUTTON); // This is Blue-Button and is on NUCLEO-L153RE