STM32 USB speed, finally determined the transmission limit, for the future product design to provide data.

Source: Internet
Author: User

is a custom protocol that uses a bulk in EP1, a bulk out EP2 endpoint


With the advantages of virtual serial port is obvious, the host computer is very convenient to write, in accordance with the regular serial function of the writing can be, and speed is still USB speed USB to 1, the use of custom bulk transmission 2, increase the drive of the buffer just again experiment, Now the driver speed bottleneck has been solved. This is mainly the pipemaxtransfersize relationship, the higher the value the faster. The night notice this value many USB device drivers are set to a large, even hid devices are set to 4096, one of my USB flash drive is also 4096,keil Ulink set to 65535, almost all USB device driver endpoint 0 is set to 65535. Night Test, this value does not affect the data transfer, this maximum regardless of how to set the actual USB device pipeline each time the data received the 64 bytes or 64 bytes, It should be that the Windows core driver receives an IRP from the USB driver and automatically splits it into the size (64 bytes) defined by the device firmware.
Made a comparison of the speed
pipemaxtranfer:64---33kb/s
pipemaxtranfer:512--265kb/s
pipemaxtranfer:1024--349kb/s
pipemaxtranfer:4096--457kb/s
pipemaxtranfer:65535--506kb/s

 mcu can first resolve the data that the PC sends via USB is for the update program, then the MCU exits the running program and goes to the "update program" status, and then runs the updated program after completion

about STM32 speed :
should be used with a dedicated USB reader chip or with a FPGA custom
Many people have misunderstood, think USB2.0 means high speed, not actually. USB2.0 devices (of course, the host is similar to the truth, but the host will support at least full speed), may only support Low speed 1.5m, may also support up to full speed  12M (This is true for many arm chips, including STM32), and of course it can support up to high speed 480m

The USB speed of the

STM32 finally determines the transmission limit and provides data for future product designs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.