Skip to content

SDSIO-Server (on MS Windows) has performace issues with VCOM #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MiloradCvjetkovic opened this issue Mar 20, 2025 · 2 comments
Open
Assignees
Labels
bug Something isn't working sds-core Belongs to SDS-Framework/sds

Comments

@MiloradCvjetkovic
Copy link
Collaborator

If recording is done at a rate of 5 MB/s (on STM32H743 running at 400 MHz with USB HS) there are occasionally gaps between USB transactions for more than 50 ms which causes embedded application to fill in the buffer preventing further writes to the buffer.

SDSIO-Server should provide timely USB transfers to allow sustainable recording.

Screenshot below shows this gap between 2 USB IN transactions:

Image

@MiloradCvjetkovic MiloradCvjetkovic added bug Something isn't working sds-core Belongs to SDS-Framework/sds labels Mar 20, 2025
@MiloradCvjetkovic MiloradCvjetkovic moved this to Backlog in SDS Framework Mar 20, 2025
@DavidLesnjak DavidLesnjak moved this from Backlog to In progress in SDS Framework Apr 9, 2025
@DavidLesnjak
Copy link
Collaborator

I've done an initial investigation and based on our findings, it appears that the root cause is not within the SDSIO-Server itself, but rather related to how USB Virtual COM ports are handled on the Windows side.

To isolate the problem, I ran a test setup without the SDS framework or SDSIO-Server:
On the device (STM32H743), I used the USB Device CDC stack, calling USBD_CDC_ACM_WriteData() in a loop to continuously transmit data. On the Windows PC, I used Tera Term to log the incoming data to a file.

Using a USB analyzer, I observed similar gaps between IN transactions (over 50 ms) as reported in this issue. This confirms that the issue likely originates from the Windows CDC driver or how Windows buffers and handles USB VCOM communication.

@MiloradCvjetkovic
Copy link
Collaborator Author

We should try using PyUSB or WinUsbCDC python packages and avoid using usbserial.sys Windows driver which seems to have issues with loosing packets also.

It is not clear if 50 ms gap between polling IN data on the USB would be resolved by using mentioned packages or if that is inherently a problem of Windows when handling USB.

@MiloradCvjetkovic MiloradCvjetkovic moved this from In progress to Backlog in SDS Framework Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sds-core Belongs to SDS-Framework/sds
Projects
Status: Backlog
Development

No branches or pull requests

2 participants