The STM32 microcontroller series is a family of 32-bit ARM Cortex-M based microcontrollers designed by STMicroelectronics. These microcontrollers are widely used in various embedded applications, from simple projects to complex systems. STM32 devices are known for their performance, low power consumption, and a wide range of peripherals. They are commonly programmed using the STM32CubeIDE integrated development environment (IDE).
Connection
We will use the STM32 MCU to send the data to the computer. Some of the Nucleo and Discovery dev boards from ST supports the virtual com port. This feature enables the USB connected for the ST link to be also used for the data transmission between the MCU and the computer.
The Virtual Com Port is supported by many Nucleo and Discovery boards but not all. You need to check the schematic of the board to confirm whether the respective board supports it.
Below are the images from the schematic of the Nucleo F446RE and Discovery F412.
The STM32 microcontroller series is a family of 32-bit ARM Cortex-M based microcontrollers designed by STMicroelectronics. These microcontrollers are widely used in various embedded applications, from simple projects to complex systems. STM32 devices are known for their performance, low power consumption, and a wide range of peripherals. They are commonly programmed using the STM32CubeIDE integrated development environment (IDE).
As you can see in the images above, both Nucleo F446RE and Discovery F412 supports the USB Virtual Com Port. So if you are using either of these boards, you do not need to use an additional module to communicate to the computer. The USB used for the ST link can also be used for the communication.
Not all the boards support this Virtual Com port feature. Below is the image from the schematic of the very famous STM32F4 Discovery board.
As you can see in the image above, there is no virtual com port in the F4 Discovery board. In such cases we can use some module to convert the UART signals to the USB, which is connected to the computer.
Below is the image showing the connection between the MCU and the FT232 USB to UART converter.