cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual COM Port with Nucleo F103RB on Windows 11

acm1122
Associate

I followed this tutorial https://medium.com/@pasindusandima/stm32-usb-virtual-com-port-vcp-bc7cb1bd5f5 to set up a USB data transmission from my board to a Virtual COM Port.

 

After building the project and running with debugger, I only see "STMicroelectronics STLink Virtual COM Port (COM5)" and "ST-Link Debug" on my device manager. After using PuTTY to listen to serial port COM5, I see no activity in the terminal.

 

However, I noticed that the tutorial does not use COM5 and instead uses "STMicroelectronics Virtual COM Port (COM10)". But when I run my program, no new USB devices show up, and only the original two mentioned before are present. How can I get the correct COM port to show up on my device manager?

 

3 REPLIES 3
Pavel A.
Evangelist III

That tutorial is about  STM32F4 Discovery board. Yours is something different. So no wonder that the instructions for for different hardware don't work as is. 

The "STMicroelectronics STLink Virtual COM Port" is part of the on-board debugger, it is indeed not your device.

 

Can you direct me to a solution for configuring USB functionality for my board?

Sorry, not really clear what your issue is:

  • Do you implement your own USB VCP on a SR USB port (and this fails)?
  • Or do you want to use the USB VCP provided by the ST-LINK?

If you do not do anything with the ST-LINK VCP UART - nothing will be there.

Usually it works this way with ST-LINK:

  • The ST-LINK provides a VCP UART (COM port, what you see)
  • but from the debugger chip on board (or where the UART pins from ST-LINK are connected), it goes as regular UART Tx and Rx to MCU, e.g. using UART1 pins
  • You have to configure UART1 (as example here, check the schematics) as a regular UART with Rx and Tx.
  • If you do not implement UART1 - nothing will happen (the ST-LINK would send to MCU but if not configured it will not receive neither respond).

I think, you assume, even you see ST-LINK VCP UART, the MCU will do something. NO - it does not, if you do not implement the "counterpart" on your board (e.g UART1 Rx and Tx, a SW loop to echo back the received characters...)

There is not any code generated, even using CubeMX and configuring UART1: you have to write code for reception and transmission (e.g. a simple echo loopback).