This question will be difficult to fully explain, I apologize in advance, but please read the entire description? Thank you.
NOTE: I'm primarily posted this to document it, and only asking for advice on how to identify the part of the Linux image that needs to be updated to fix this issue, and perhaps someone will have seen it and have a workaround. I've never seen a problem like this in 30+ years of working with serial TTL communications.
I have an embedded board which can not be easily updated for security / bandwidth reasons. Small updates my be possible but aren't the goal. More than fixing it, I want to understand what part of the system contains these drivers for my own education. I don't only want to solve the issue, I want to understand the issue.
This board has a USB connector and I can plug in different devices and they generally work. e.g. keyboard, wifi adapter, so on.
One type of device I have commonly used is a serial TTL adapter when I want to talk to an external serial device (e.g. Arduino or whatever).
When I plug those adapters directly into the USB port, they work flawlessly. I normally use CP210x, most often CP2102 / 2104, but have used CH340s, FTDI, etc... no problems.
Recently I had an application where I wanted two USB devices at the same time so I added a small USB hub. With the serial TTL adapter plugged via the HUB, I find that any data being sent after about 678uS is cut off. (!?)
For example, this screenshot of a set of scope traces shows, in grey, the trace when I have the serial TTL adapter plugged in directly, and the blue trace shows when it is plugged in via the hub.
Screenshot of scope traces showing the issue
As you can see, the data cuts off mid byte. Later measurements showed that time to be consistent +/- about 20uS irrespective of data length, or baud rate.
This happened x3 hubs, and x3 adapters.
I tried powering the hubs. One came with its own adapter, another had a standard power in connection, and the 3rd had power pins which I connected to the bench supply. This made no difference.
This is not RS232 so there is no charge pump failing. I've monitored the power supply on the chip and there is no loss of power.
The same hubs and adapters work perfectly when plugged into a PC x2 operating systems (Ubuntu 20.04, Windows 11).
My assumption is that there is a problem in the USB driver in the embedded image. Again, I can't update it, except in small ways, and my real goal is to understand the issue anyway.
- The actual question: What part of the Linux stack controls this?
- Extra credit: How would you update only that part?
- Extra extra credit: Have you ever seen that before?