Skip to main content
SWu.2354
Visitor II
December 4, 2019
Question

open serial port failed? (virtual com port debug)

  • December 4, 2019
  • 1 reply
  • 683 views

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?

This topic has been closed for replies.

1 reply

Julien D
ST Employee
December 18, 2019

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.

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.