ST


A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

STDIO

Choose UART debug pins

NB: this part is available from 5.7.6 version

With the default STM32 MBED configuration, STDIO RX and TX pins are set with the virtual COM pins of ST-Link.

If you want to use some other pins,

  • for a custom board
  • if you don't use or have removed ST-Link PCB part
  • ...

You are able to redefine STDIO RX and TX pins in the json config files.

Here is an example of mbed_app.json :

"target_overrides": {
    "NUCLEO_L073RZ": {
        "target.stdio_uart_tx": "PA_2",
        "target.stdio_uart_rx": "PA_3",
    }
}

Choose UART baud rate

Default baudrate values for STDIO and other UART are set in platform config file: https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed_lib.json

Default value is 9600.

You can change the value for your setup in your mbed_app.json file:

{
    "target_overrides": {
        "NUCLEO_F410RB": {
            "platform.stdio-baud-rate": 115200,
            "platform.default-serial-baud-rate": 115200
        }
    }
}