Today after work I was able to quickly put together the test code I needed to measure the transfer speed of my “stdio redirection to USB” implementation for the STM32F411 board I am developing with.
I haven’t got a baseline to compare against for my setup, but using a nearly 10 year old Laptop running Windows 10 64-bit, I measured a modest:
Total bytes read in 10 seconds: 2473855 Speed: 241.59 kilobytes/s
The test is not perfect and I’d like to repeat it using my RPi 3 as the USB host device. I expect things might pan out to be better with that setup, however for what I need, even just nearly 240 KiB/s is more than adequate for data exchange and control commands in Retroverse.
Another likely overhead is the use of HAL in ST’s USB_Device implementation: that’s something I am not going to be able to optimize in any reasonable amount of time, so I will have to put up with it.
I will also have to check that data is not altered, by checking that the sequence transmitted by the MCU is not altered when received by the host.
Stay tuned for more!