cancel
Showing results for 
Search instead for 
Did you mean: 

USB Virtual Com Port example

dgiovanelli
Associate III

Hello,

I'm trying to evaluate the maximum speed that can be obtained through the USB Virtual Com Port (I need approximately 20Mbps) however I cannot find a working example with System Workbench

For other projects, in the lab I already have:

  • STM32F429 Nucleo 144
  • STM32F407 Discovery kit
  • STM32L476 Discovery

and I would like to test the VCP performance on any of these.

Today I tried to port to SystemWorkbench an example I found for Keil (for STM32F407 discovery) but it didn't work (lot of compilation issues).

I also tried to port STM32Cube_FW_F4_V1.24.0\Projects\STM324x9I_EVAL\Applications\USB_Device\CDC_Standalone to the STM32F429 Nucleo 144 but, even though it compiles without problems, it doesn't work (windows doesn't recognize the serial port).

Then, is there any SystemWorkbench (or CubeMX) project example for USB VCP that targets the aforementioned boards?

Thank you,

Davide.

4 REPLIES 4
Pavel A.
Evangelist III

With internal PHY, both USB controllers work in full-speed mode, that's 12 Mb/s.

So, can you estimate the chance to get 20 Mb/s?

-- pa

Thank you very much Pavel for your response,

I didn't realize that only full-speed is achievable with those controllers. I tried a quick and dirty solution to the problem, but it is better to do a step back and think again.

So I have to design a 8bit-parallel-bus to usb converter. The parallel bus is proprietary (it is a kind of SPI with 8 data lines), and I don't know much about it for now, however it will deliver 20Mb/s of data that needs to be transferred to a computer.

For this project I just have 6 months, then I would like the easiest solution both from hardware and software sides.

Given this:

  • is the VCP implementation capable of handling such throughput if the usb HS PHY is employed?
  • In this, I found that the STM32F7x3 line is the only one to embed the usb HS PHY then probably I will look at those, however what are the trade-off between internal and external PHY? Are there examples (hardware and software) for both solutions?

Thank you,

Davide.

Pavel A.
Evangelist III

With the high speed PHY it can hopefully achieve 20 MB/s.

Virtual com port is however not the optimal interface. If you want to talk to a PC (Windows or Linux) consider a plain bulk pipe. Maybe, with additional interrupt one.

The interface on the PC side will be libusb - or Winusb if you need only Windows.

-- pa

dgiovanelli
Associate III

Ok, thank you Pavel, it's clear.

I don't have experience in low level usb communication (even less in os driver writing...) since most of the times I just have text input/output, then the serial interface is more than enough. That's the main reason why I was oriented to the VCP.

I think I will buy an evaluation board with an STM32F7x3, start with the VCP driver, and then eventually switch to a more appropriate driver.

Thank you for the support.