FTDI Community

General Category => Discussion - Hardware => Topic started by: MattMCSS on December 11, 2020, 06:19:55 PM

Title: FT232L Hangs after running for hours
Post by: MattMCSS on December 11, 2020, 06:19:55 PM
I'm using the DTECH USB to RS485 RS422 Serial Port Converter which uses a FT232L chip.

I've connected it to a Raspeberry Pi and am sending/receiving messages at 1Hz, baud rate 921600, latency 2ms.

After 4 to 8 hours the chip seems to stop sending/receiving. When this occurs:
When I use FT_Read it always reads 0 bytes.
When I use FT_Write it give me error 4 (FT_IO_Error).
I have to reset the device to get it working again.

On a perhaps unrelated note, I have been timing how long it takes to send/receive a couple of bytes and while it is usually around 2ms, occasionaly (1 in 100 times), it goes up to around 12ms. Could that be related to scheduling of the USB bus somehow, I don't have anything else connected on there so I would have expected it to be quite consistent on the response time.
Title: Re: FT232L Hangs after running for hours
Post by: FTDI Community on December 14, 2020, 03:37:39 PM
Hello,

An IO error usually indicates some kind of hardware issue which has caused a disconnect of the USB line. This could be noise from your attached serial device or a dip in the power supply etc. it is worth checking that your RS485/422 device does not cause any noise on the lines. If you use half duplex RS485, also check that your RPi and your other serial device don't try to send at the same time as this can cause collisions on the line.

As you said, the delays can vary depending on the USB scheduling and the application itself which sends and receives the data may also be subject to varying latencies in the operating systems itself.

Best Regards, FTDI Community