Skip to main content
Associate
December 4, 2024
Solved

Change STLINK-V3EC VCP Baud rate on NUCLEO-H7S3L8

  • December 4, 2024
  • 2 replies
  • 1566 views

Hello,

is it possible to change the baud rate VCP to USART bridge of the STLINK-V3EC on the Nucleo STM32H7S evalboards?

The documentation states the following:
Virtual COM port
The serial interface UART3 (PD8/PD9) that supports the bootloader is directly available as a Virtual COM port of
the PC connected to the STLINK-V3EC USB connector (CN5). The VCP configuration is the following:
• 115200 bps
• 8-bit data
• No parity
• One-stop bit
• No flow control

Since the stand-alone STLINKs have the feature to change the baud rate of the VCP to UART bridge I was wondering if this is also possible on the STLINK-V3EC.

 

Basti__0-1733321441627.png

 

Best regards

Basti

 

Best answer by Andrew Neil


That's the baud rate of the VCP; ie, the baud rate of the UART in the ST-Link on which the signals emerge.

EDIT - Here:

AndrewNeil_0-1733754235869.png

 

So you set your MCU's baud rate to match that.

 


@Basti_ wrote:

Normally VCP ignores baudrate settings anyway.


No, it defines the baudrate of the physical connection emerging from the ST-Link.

2 replies

Andrew Neil
Super User
December 4, 2024

It would be easy to try it - just change the baud rate setting in your terminal app, and see what happens ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Basti_Author
Associate
December 5, 2024

Hello Andrew,

assuming I would do so, what UART Baudrate is exactly set? The baud rate of the MCU is derived from the MCO clock and the prescaler settings. So I cannot set any baud rate value. What will happen if I set something like 1.2345 MBaud?

Normally VCP ignores baudrate settings anyway.

Best regards

Basti

Andrew Neil
Andrew NeilBest answer
Super User
December 9, 2024


That's the baud rate of the VCP; ie, the baud rate of the UART in the ST-Link on which the signals emerge.

EDIT - Here:

AndrewNeil_0-1733754235869.png

 

So you set your MCU's baud rate to match that.

 


@Basti_ wrote:

Normally VCP ignores baudrate settings anyway.


No, it defines the baudrate of the physical connection emerging from the ST-Link.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Mike_ST
Technical Moderator
December 9, 2024

Hello

The baudrate that you set in the PC application (600,1200..., 921600) is transmitted to the ST-Link on the VCP interface, it is automatic. From that baudrate, the ST-Link will compute its prescaler (see below) to use for the UART interface that communicates with the MCU.

 

The ST-Link V3 Documentation section 14.2 tries to explain what baurates are possible:

in "high perf" mode (default configuration of the ST-Link):

"384 MHz / prescaler with prescaler = [24 to 31]"
i.e. 12 387 096, ..., 16 000 000 bauds

or

"192 MHz / prescaler with prescaler = [16 to 65535]"
i.e. 2929, ..., 12 000 000 bauds

So, to reuse your example of 1.2345 MBaud (assuming you have an app that allow to configure such a baurate), the ST-Link firmware should compute a prescaler of 192000000/1234500 ~= 155.

 

The level shifters on the Nucleo boards can introduce frequency limitation, I think this is the case for the H7S one.

 

For the baudrate to use to communicate with the bootloader please see AN2606 

Andrew Neil
Super User
December 9, 2024

@Mike_ST wrote:

The baudrate that you set in the PC application (600,1200..., 921600) is transmitted to the ST-Link on the VCP interface, it is automatic.


Indeed.

So it is misleading of the document to say, "The VCP configuration is the following..."

AndrewNeil_0-1733753559398.png

because that is set by the host application - not the target.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Mike_ST
Technical Moderator
December 9, 2024

Hi Andrew,

>> So it is misleading of the document to say, "The VCP configuration is the following..."

Yes, I know.

The intention of the writer was to say that the "out of the box" demonstration software, when there is one, is configured that way.