Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
How do I increase read buffer size for cdc_acm driver?

Running linux kernel 3.14.43, I am reading from a CDC ACM device (implemented on an LPC4330). The device appears at /dev/ttyACM0, and I can open it and read from it in the normal way.

The device appears to be buffering about 4096 bytes (I get reads of 4095 bytes, typically, after a period of mostly 12 byte reads during the early phase of operation). When running on a fancy schmancy workstation, all goes smoothly. However, when running on an embedded device (AM3352), occasionally data goes missing if I go for a high data rate. I suspect the read buffer is being over-filled - the high data rate is fast enough to fill a 4k buffer in not much more than 1msec (3.8MB/s), and it seems very possible that I'm not coming back to the read() call fast enough to keep up, given that the device is doing a bunch of other stuff in other threads and I'm using SCHED_OTHER across the board.

So - first - is there a way to increase the buffer size of the device? As a supplementary, is there any way to detect that the buffers here have overflowed? I guess I have another option of using real-time scheduling for the read() thread but I'd rather not get into that if possible.

Thanks.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!