ST


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

You are viewing an older revision! See the latest version

STDIO

Choose UART debug pins

NB: this part is available from 5.7.4 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 :

{
	  "config": {
	      "stdio_uart_tx": {
	          "value": "PA_2"
	      },
	      "stdio_uart_rx": {
	          "value": "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
        }
    }
}

All wikipages