Skip to main content
B.Montanari
ST Employee
November 17, 2022

How to use the STM32CubeIDE terminal to send and receive data

  • November 17, 2022
  • 4 replies
  • 67905 views

Introduction

There is an embedded terminal available in the STM32CubeIDE that can be used to send and receive data. This is a very easy to use feature that can be used with most of our evaluation boards that open a VCOM, such as the NUCLEO boards. In this small tutorial, we’ll see how to configure and use it.

 

1. Connect your NUCLEO board

The first step is to connect your NUCLEO board or similar via the USB port to your computer. Then, locate at the bottom right of the STM32CubeIDE this icon:
568.png

2. Create a new Serial Port Connection

Use the arrow to show the list of options and select the “Command Shell Console”:
570.png
This will pop up a new window, where you can create it, make sure to select “Serial Port” and then click “New”:
572.png
Now it is time to configure the UART parameters:
574.png
Once done, click “Finish” and then “OK”


3. Check your if your Serial port is working

You should see the CONNECTED message if everything is correct:
576.png
This also works while in debug mode and you can switch the “Console view” by clicking and expanding this icon:
578.png
Now all you have to do is use any of your application code to either send/print or scan something in the terminal! If you enjoyed my STM32CubeIDE dark theme used in this article or want to learn how to use printf or non-blocking scanf, here are some articles that you might find useful: setting the STM32CubeIDE in dark theme, how to use the printf function and how to use the scanf in a non-blocking way.
Hope you enjoyed it!
 

4 replies

PNewm.1
Associate
March 9, 2023

Thank you for this.

Explorer
March 17, 2024

Elegant explanation. Thanks!

BarryWhit
Lead
July 13, 2024

I had no idea this was bundled with CubeIDE, and I looked for it at the time. I'd been using an external eclipse plugin for this.

"- If someone's post helped resolve your issue, please thank them by clicking ""Accept as Solution"".- Please post an update with details once you've solved your issue. Your experience may help others."
Visitor II
January 7, 2025

Hello, I need to change the baud rate to 10000000 (10Mbits/s) but in the options the maximum is 4000000 (4Mbits/s). Is it possible to add a higher baud rate? Thanks.