cancel
Showing results for 
Search instead for 
Did you mean: 

open serial port failed? (virtual com port debug)

SWu.2354
Associate

i used CUBEIDE to config my board's VCP function,but virtual com port always open failed,when the board is running in debug mode.so i used CUBEMX to generate my project again, but this time i generate keil project and everything is ok. so what's the problem?

1 REPLY 1
Julien D
ST Employee

Hi SWu.2354,

If this topic is about the usage of the MPU serial console for non MPU devices the answer is no this can't work, or at least needs specifics settings.0690X00000BukCiQAJ.png

This console has hard-coded settings for MPU purpose.

Hence either the UART handle init should respect the following settings and you can use above console

UartHandle.Init.BaudRate = 115200;
UartHandle.Init.WordLength = UART_WORDLENGTH_8B;
UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE;

or you may have to define your own board connection from the Connection view:

Window > Show View > Other

0690X00000BukGkQAJ.png

0690X00000BukGaQAJ.png

And then right click on your defined connection > open command shell.

Hope this helps.