I am trying to use the STM32F103RB Nucleo board. I am learning how to do serial comms so started with the classic 'Hello world' printed to a serial monitor.
Eventually, I want to print data to the serial monitor, while receiving data via different UART pins. The Nucleo uses pins 16 & 17 (PA22 & PA3) as the default Tx/Rx pins. I started with them, and had no problem. The code was simple:
#include "mbed.h"
Serial pc(PA_2, PA_3);
int main() {
pc.printf("Hello World \n");
}
Looking through the DATASHEET I can see that pins 42 & 43 (PA9 & PA10) can also be used for UART, with PA9 Tx, & PA10 Rx. I decided to change the pin definitions for Tx and Rx, so the code now looked like this:
#include "mbed.h"
Serial pc(PA_9, PA_10);
int main() {
pc.printf("Hello World \n");
}
And this now doesn't work. Looking through THIS PAGE I don't see why that doesn't work. I have used 'Serial', given it a name (pc), then defined the Tx and Rx pins. I am using the mBed online environment if that makes a difference to anything.
Can anyone see if there is some simple mistakle or something I have overlooked when trying to do what should be a simple task?
If there is any more information required, please ask.