This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Serial port drops bytes when USB HID device is connected

Other Parts Discussed in Thread: OMAP-L138

I have an OMAP-L138 and an MSP430 communicating using their UARTs at 115,200 baud.  The MSP430 is sending a 27-byte data packet every 13.5 milliseconds.  While the MSP430 is sending data packets, I connect a USB HID device (I have tried a GPS and a mouse) and errors occur when parsing a couple of the data packets.  An extra byte equal to 0 appears after the first byte of the packet and only the first 16 bytes of the packet are received.  I have confirmed that the bytes are missing when they enter my application via a system read of /dev/ttyS1 (i.e. the errors are not a bug in my application).  The same errors occur when I disconnect the USB device.

Any thoughts on what is going on?  The UART has a 16-byte FIFO in hardware, which is enabled.  Is a USB interrupt taking too long?

Any ideas on solutions?  The hardware can't change, so I can't add HW flow control.

The OMAP-L138 is clocked at 300 MHz and is running the 2.6.33 Linux kernel (DaVinci PSP 02.20.00.12).

Thanks,

abkirchhoff

  • Can anyone confirm that this is an issue?  Is the USB interrupt the problem or just the system load when a USB device is plugged in?  I would like to understand the problem more fully before I work on a solution.

    I temporarily reduced my packet size from 27 bytes to 12 bytes and no errors occurred when using the 12-byte packet.  I assume this is because the packet fits within the 12-byte FIFO in the UART hardware module.

    Any help would be appreciated.

    Thanks,

    abkirchhoff