2016-06-10 03:43 AM
I have a curious problem on my STM32L151. I have the USB running in double buffering mode, and I can get a transfer rate of ~10MBit/sec. But after I unplug the USB cable, and plug it back, the transfer rate drops to ~6MBit/sec. After any subsequenct cable unplug/plug the speed remains at 6MBit. Only the first usb connection results in faster transfer rate.
This is happening 100% of the time. Does anybody has an idea what can go wrong?2016-06-11 08:26 PM
The double-buffer endpoint should be primed twice at the start of a transfer, to make the double buffer work effectively. Does your firmware in this way?
If your firmware would prime just a single buffer at the transfer start up, the transfer speed of double buffer is slightly slower than single-buffer, because of double buffer overhead. Tsuneo2016-06-14 05:43 AM
Thank you, this was the right solution. Now I have consistent speed of USB transfers.