Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

218
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda