cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual COM Port Not Working on NUCLEO-H755?

paatx
Associate

I installed the latest CubeIDE hosted on a Mac to demo a NUCLEO-H755 board over USB.  Starting from a clean CubeMX code generation, I've managed to successfully create a basic application to blink the user LEDs and use the pushbutton  (along with basic use of the debugger), but I would like to be able to configure the Virtual COM Port (VCP) to use as a debugging tool before proceeding to the next step of getting the Ethernet working.  Unfortunately, I have not been able to figure out how to get the VCP to work.  In CubeMX, I have USART3 selected as the VCP with the correct pins per the schematic, but for some reason the only available selection is "disabled".  I suspect this might be because the NUCLEO board support package (bsp) is somehow controlling configuration of the VCP and not allowing changes from CubeMX.  Here are my questions:

1)  Does the NUCLEO bsp automatically configure the VCP, or is there some other way to configure?

2) Do the VCP (over USB) printf's go to the main CubeIDE console in the Eclipse environment, or do I need to use some other terminal window?  I've tried using a generic printf as in the example code as well as trying to use the HAL_UART_Transmit function to COM1 (which seems to be configured to use USART3) but nothing shows up on the debug console.

I am new to STM32 development and the CubeIDE, so any help would be greatly appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,


@paatx wrote:

1)  Does the NUCLEO bsp automatically configure the VCP, or is there some other way to configure?


If at the beginning of the project generation you kept that option selected.. Yes:

SofLit_0-1735807802823.png

If you want to do it yourself, you can go to Bsp section and disable Virtual comport by unchecking "Virtual Com Port" option.  USART3 will be enabled gain in Connectivity.

SofLit_1-1735808366551.png

 


@paatx wrote:

2) Do the VCP (over USB) printf's go to the main CubeIDE console in the Eclipse environment, or do I need to use some other terminal window?  


You could use any HyperTerminal. Just need to configure the right parameters in it.

Data Length = 7 Bits, bitrate: 115200, Stop bit: 1, HW control: none

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
SofLit
ST Employee

Hello,


@paatx wrote:

1)  Does the NUCLEO bsp automatically configure the VCP, or is there some other way to configure?


If at the beginning of the project generation you kept that option selected.. Yes:

SofLit_0-1735807802823.png

If you want to do it yourself, you can go to Bsp section and disable Virtual comport by unchecking "Virtual Com Port" option.  USART3 will be enabled gain in Connectivity.

SofLit_1-1735808366551.png

 


@paatx wrote:

2) Do the VCP (over USB) printf's go to the main CubeIDE console in the Eclipse environment, or do I need to use some other terminal window?  


You could use any HyperTerminal. Just need to configure the right parameters in it.

Data Length = 7 Bits, bitrate: 115200, Stop bit: 1, HW control: none

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

So if I let the BSP configure the Virtual COM Port, shouldn't I just be able to open a new serial console in CubeIDE to see my printfs?  I've tried this and none of my printf outputs show up even though the console says it is connected...

 

I finally got this to work using the default BSP VCP configuration, and a terminal window within CubeIDE.  The trick was to create a "New Command Shell Console" within CubeIDE using USB as the connection type.  This wasn't initially obvious since the only instructions I found online don't seem to completely match the new version of CubeIDE..   Thanks for the help.