can USB be used to create a virtual com port?

Post here first, or if you can't find a relevant section!
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: can USB be used to create a virtual com port?

Post by fpiSTM »

fpiSTM wrote: Thu Dec 01, 2022 10:42 am OK I found why and it is normal (at least with the current implementation).
As Serial is no more mapped to SerialLP1 then the default pins defined in the variant_NUCLEO_L4R5.h (PIN_SERIAL_RX/PIN_SERIAL_TX) are not used as they are defined for the "Serial" instance.
So the correct way is to use setRX/TX.

I will check if I can use those defined pins when Serial is mapped to USB.
I've made a PR to fix this. Now when USB sepersed Serial, pins defined are used.
Lord123
Posts: 2
Joined: Wed Dec 07, 2022 9:36 am
Contact:

Re: can USB be used to create a virtual com port?

Post by Lord123 »

No, the USB functionality on a controller cannot be used to create a virtual com port (VCP). This type of functionality is typically only available on controllers that have an onboard ST-Link interface.FM Whatsapp
STM32_Newbbe
Posts: 50
Joined: Thu Nov 05, 2020 10:26 am

Re: can USB be used to create a virtual com port?

Post by STM32_Newbbe »

In that case, I just achieved the impossible!
I must be the most terrific hacker of the whole planet :twisted:
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: can USB be used to create a virtual com port?

Post by GonzoG »

Lord123 wrote: Wed Dec 07, 2022 9:39 am No, the USB functionality on a controller cannot be used to create a virtual com port (VCP). This type of functionality is typically only available on controllers that have an onboard ST-Link interface.FM Whatsapp
And how do you think VCP works on ST-Link??
Post Reply

Return to “General discussion”