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.