Benchmark testing for my USB serial code

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!

About Luigi Di Fraia

I am a Senior DevOps Engineer so I get to work with the latest technologies and open-source software. However, in my private time I enjoy retro-computing.
This entry was posted in Embedded systems, Retrocomputing, Technical and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s