cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] Virtual COM port on STM32F411 discovery

sanathhere
Associate III

Hi, I am trying to access the Virtual COM port on my STM32F411 VET discovery board but I am not able to find the instructions to do so. I am trying to use serial communication in Simulink where for the STM32F4xx they used the USART2 and VCP com number from device manager. I have two doubts as the user manual is pretty confusing,

1) do i need to make any soldering or changed on the board or change the jumpers to activate the Virtual COM Port.

2) which cable does Vitual com port connect to? the mini USB port or the USB TTL cable, if USB TTL then what pins? 

3) I am trying to access data from the MEMs accelerometer, will the USART be the same for this as well since there is only one USART for serial communication on the board? if yes, which USART?

Help please :(

I am stuck very bad :(

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

This board? https://www.st.com/en/evaluation-tools/32f411ediscovery.html

This is an older board that doesn't have the VCP functionality with modification, but you can close SB10 and SB11 to get it. Then, it will be available on USART2 (PA2/PA3).

The VCP would be available on the same USB connector as the st-link (CN1).

TDK_0-1694438638696.png

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

10 REPLIES 10
TDK
Guru

This board? https://www.st.com/en/evaluation-tools/32f411ediscovery.html

This is an older board that doesn't have the VCP functionality with modification, but you can close SB10 and SB11 to get it. Then, it will be available on USART2 (PA2/PA3).

The VCP would be available on the same USB connector as the st-link (CN1).

TDK_0-1694438638696.png

 

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

> I am trying to access data from the MEMs accelerometer

You can read accel data and ship it out on USART2 if that's what you want. You'll need to program the code that does this.

If you feel a post has answered your question, please click "Accept as Solution".

I don't think so. According to UM and also the schematics even for rev.D, the STLink is V2 (STM32F103C8T6), i.e. not V2-1, i.e. it does not have VCP.

JW

Issamos
Lead II

Hello @sanathhere 

The best option for your board is to collect data on the board and send them using serial port (uart2) as serial data to a com port of your pc and then take the data and analyse them. Or change to a newer board that include VCP.

Best regards.

II

Sorry I am a Beginner in electronics, I am not sure what you mean by close the port? do i have to solder pins there because i see those two with no pins like other terminals. Can i use a jumper cable male to male? like this and simple insert in those holes? 

WR-JW-4020MM-b.jpg

 

On the other end the USB TTL cable, right?

and lastly, I am using simulink for serial communication, if i give it the correct peripheral addresses in blocks then it should communicate via usart2 or i need to connect directly to the i2c1 pb6 and pb9? 

Thank you for replying 🙂

How can i access a COM port in that case? my simulink program with Embedded coder support package wont detect my board for serial communication.

Would appreciate and thank you for the reply:)

> How can i access a COM port in that case?

You can't. You need either some external USB-to-UART converter, or some different board (e.g. Nucleo) which does have the newer STLinkV2-1, which supports VCP.

JW

@waclawek.jan I have a USB TTL 232 cable and i tried connecting in to PB6 and PB9, it won’t detect my board, where should i connect the USB TTL cable? PA2 and PA3? In the user manual it does not state anything regarding this.