[–] USBSerial tx speed issue [SOLVED BY UPDATING TO THE LATEST VERSION OF THE REPO]

Pito
Sat Jul 15, 2017 6:03 pm
While messing with the TEK graphics emulator, which sends vector data to PC (Win7) via SerialUSB (under libmaple and Generic as well), the speed the F103 sends the data to the PC is highly questionable.. :?
The speed at 115k2 Serial is maybe 10x faster than the one via USB.
With the same code sending chars (via Serial.write(byte);).
Can somebody confirm?? (Updated the TEK demo sketch with elapsed time measurement).
PS: to draw the TEK demo screen takes
4998 msecs via USB
433 msecs via 115k2
108 msecs via 460k8
63 msecs via 921k6

RogerClark
Sat Jul 15, 2017 10:05 pm
USB seems to have issues if you send it individual bytes

If you send long strings it goes much faster.

I thought this had been investigated and the issue partially lies with the host driver.
Your serial USB adapter probably uses its own driver.


Pito
Sun Jul 16, 2017 5:59 am
So you say when tx data from F103 via Serial.write() the Win7 USB host is 10x slower than the Prolific USB/Serial dongle at 115k2?

FYI: I tested the “USB read speed” with help of PaulS benchmark and I get ~230kB/second (the F103 reads data from PC via Serial.read()).
That is consistent with his measurements with Maple.


RogerClark
Sun Jul 16, 2017 6:08 am
That dongle uses its own driver.

We use window’s built in CDC ACM driver

BTW. I’m saying there are no bugs, but please see if you can find the other thread about this, because it has been discussed at length in the past.


Pito
Sun Jul 16, 2017 6:12 am
Ok, that means the window’s built in CDC ACM driver is 10x slower than the Prolific’s at 115k2 serial.. :shock:
In other words, the window’s built in CDC ACM works 9k6 when receiving bytes via Serial.write() from F103..

BTW, the window’s built in CDC ACM works 2.3Mbit/sec when sending bytes to F103 (F103 receives them via Serial.read() in a loop)..
:o


stevestrong
Sun Jul 16, 2017 6:19 am
http://www.stm32duino.com/viewtopic.php?f=9&t=1477

Pito
Sun Jul 16, 2017 6:44 am
@stevestrong: great work! 82x faster :shock:

4998 msecs via USB -- OLD CDC ACM driver
433 msecs via 115k2
108 msecs via 460k8
63 msecs via 921k6
61 msecs via USB -- NEW CDC ACM Steve's patch


RogerClark
Sun Jul 16, 2017 7:34 am
I’m a bit confused about the status of the PR for this,

Is there another PR that I need to merge ?


Pito
Sun Jul 16, 2017 7:45 am
@Roger – sorry I’ve put this thread in maybe a wrong board.. I have nothing to add re any PR’s..

stevestrong
Sun Jul 16, 2017 7:45 am
Honestly, I am also confused about what and how exactly Pito tested.
As I can see, this commit should have solved the USB speed issue.

Pito, which core/files did you test?


Pito
Sun Jul 16, 2017 7:49 am
This thread should be moved in other board, as I’ve written above – I put it here by my mistake.
I did not test any PR, I only complained on USB TX performance and applied your patch then manually..
My local libmaple repo is old.

stevestrong
Sun Jul 16, 2017 8:24 am
Does this mean that this issue is not relevant for libmaple anymore?
In this case please remove libmaple from the title.

Pito
Sun Jul 16, 2017 8:36 am
@steve: again, I do not test nor comment any PRs here, I do not know whether your latest PR re USBSerial TX speed issue works with the latest libmaple core, as I do not use the latest libmaple core..

RogerClark
Sun Jul 16, 2017 10:25 am
OK.

So this has been fixed ages ago

Its because @Pito was using a fairly old version of the repo.

I guess this is something we should also everyone when the report a bug, i.e “Are you using the latest version of the repo”

PS. I changed the thread title to show this is solved


Leave a Reply

Your email address will not be published. Required fields are marked *