Jayen
Jayen

Reputation: 6069

Why does my computer keep pausing when I run a progam using the USB-serial ports?

I've written a program that uses three serial ports (two serial ports are on one USB -> serial connector, the other serial port is on its own USB -> serial connector). When I'm running the program, every 5 seconds or so, my computer stops responding, as if the kernel is busy doing something. I'm not writing any files, so it's not flushing to disk, and I'm not running out of memory, so it's not swapping. What else could it be? could it be flushing the serial port or something? That would be weird, because I wait for a response from the serial ports before I write the next bit of data to them.

It happens less if I don't use the last serial port (the one on it's own USB port).

More info:

Upvotes: 1

Views: 305

Answers (1)

Jayen
Jayen

Reputation: 6069

libftd2xx seems to be the problem. It changes its thread's priority and seems to busy wait or something that seems to take over the system. Giving user's access to the usb devices in /proc/bus/usb and running the program as a normal user seems to work fine, so I'm not sure why libftd2xx is changing thread priorities.

Upvotes: 1

Related Questions