Skip to content

USB CDC ACM has low throughput #14288

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

Closed
masz-nordic opened this issue Mar 12, 2019 · 4 comments
Closed

USB CDC ACM has low throughput #14288

masz-nordic opened this issue Mar 12, 2019 · 4 comments
Assignees
Labels
area: USB Universal Serial Bus Enhancement Changes/Updates/Additions to existing features

Comments

@masz-nordic
Copy link
Collaborator

Is your enhancement proposal related to a problem? Please describe.
To reproduce:

  • Disable loopback in cdc_acm sample by commenting out write_data(dev, data_buf, *bytes_read);.
  • Build and flash cdc_acm sample.
  • pv --force -B 256 sample.txt 2>&1 > /dev/ttyACM1 where sample.txt is a big file.
  • Observe the throughput.

Results:

  • cdc_acm without loopback: 51 KB/s
  • as above, with disabled logs: 96 KB/s

Describe the solution you'd like
CDC ACM should reach throughput of at least 400 kB/s.

Additional context
Board: nrf52840_pca10056
OS: Ubuntu 16.04, 4.13.0
Zephyr: c78c5e6

@masz-nordic masz-nordic added Enhancement Changes/Updates/Additions to existing features area: USB Universal Serial Bus labels Mar 12, 2019
@masz-nordic
Copy link
Collaborator Author

The bottleneck seems to be located in this read.

@finikorg
Copy link
Collaborator

The bottleneck seems to be located in this read.

Since we do not have it for other classes, we can remove it. This should be handled in the dc code.

@carlescufi
Copy link
Member

@finikorg can you send a PR to remove that read?

@finikorg
Copy link
Collaborator

@finikorg can you send a PR to remove that read?

PR #14677

finikorg added a commit to finikorg/zephyr that referenced this issue Mar 22, 2019
Use ringbuf library for handling RX CDC ACM path. Remove old code
artifacts handling specific hardware.

Fixes zephyrproject-rtos#14288

Signed-off-by: Andrei Emeltchenko <[email protected]>
carlescufi pushed a commit that referenced this issue Mar 25, 2019
Use ringbuf library for handling RX CDC ACM path. Remove old code
artifacts handling specific hardware.

Fixes #14288

Signed-off-by: Andrei Emeltchenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

4 participants