# Strange issue on Raspberry Pi UART (with FTDI USB <--> RS-232 adapter)

I'm trying to establish a high speed UART communication on Raspberry Pi board. Since internal UART is not quite good at 1+ Mbaud, decided to use FTDI adapter (based on FT232RL chip) instead.

I've tested an adapter on my laptop running Debian 8 and reached stable transmission speed at 3 Mbaud (with a cat * >> /dev/ttyUSB0). Then plugged it to Pi2 doing exactly the same, and noticed this:

(at 3 Mbaud)

(at 1 Mbaud)

There are wide (up to 1 second at 3 Mbaud) gaps in transmission at regular time intervals. Transmitting data is not corrupted, just delayed. Any suggestion on how to overcome a problem? Thank you.

• Perhaps your data source is too slow, try cat /dev/zero >> /dev/ttyUSB0 – Jasen Nov 16 '15 at 10:29
• I've tried all kinds of data including UDP, TCP traffic over PPP. Gaps are staying the same. – Alexey918331 Nov 16 '15 at 10:36
• What has UDD,TCP to do with UART? As your Rpi does also other things it can't send the data without gaps. Perhaps doing a custom kernel that uses all resources from RPi just to send data, the gaps would vanish, but what's the point of that? – Marko Buršič Nov 16 '15 at 12:58

The RPi has only one USB Bus. One second long gaps sould be very rare, but you would see them if your data source for cat * uses the same USB bus to tranfer data into the RPi at the same time.

Something with more buffer like dd if=/dev/zero of=/dev/ttyUSB0 bs=1M should show less gaps, unless there are more USB devices active.

• Does internal microSD card reader use the USB Bus? There are no USB devices connected to the board except the adapter. – Alexey918331 Nov 16 '15 at 11:21
• I've tried to do output with your command - gaps are exactly the same. – Alexey918331 Nov 16 '15 at 14:08
• The Ethernet port is on the USB 2.0 Bus. Do you see the gaps when ethernet is disconnected? – Turbo J Nov 16 '15 at 18:06
• Yes. Ethernet is disconnected. – Alexey918331 Nov 17 '15 at 5:23

## Solved

The problem was in RPi's USB driver.

After disabling NAK holdoff (by adding dwc_otg.nak_holdoff=1 to /boot/cmdline.txt) it works perfect at 3 Mbaud.