2023-09-11 05:37 AM - edited 2023-09-12 01:18 AM
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 :(
Solved! Go to Solution.
2023-09-11 06:25 AM
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).
2023-09-11 06:25 AM
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).
2023-09-11 06:27 AM
> 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.
2023-09-11 06:30 AM
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
2023-09-11 06:50 AM
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
2023-09-11 08:02 AM
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?
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 :)
2023-09-11 08:10 AM
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:)
2023-09-11 08:34 AM
> 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
2023-09-11 10:21 AM
@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.
2023-09-11 12:35 PM