E20C - Serial baud rate is too high

Hello there.

I bought this device to use for a networking project. Unfortunately, I found out that the serial link (USB-C debug port) is very unstable and mostly prints mangled output to my terminal with many of characters missing and lines of text overwritten. This is especially prominent when trying to print large amounts of text like a syslog or the contents of a folder (/etc). Changing the PC USB port from USB-A (3.0) to USB-C somewhat reduces the issue, but doesn’t completely eliminate it. The baud rate is set to 1500000 by default, which is unusually high for a serial link. Manually reducing this baud rate down to about 115200 completely eliminates the issue.

I don’t know why it was decided that a 1.5M baud was a good idea, but I found some sources that the WCH CH340 serial chips are having problems dealing with this speed. Unfortunately, the baud rate has to be manually reduced each time the device boots. Is there a way to permanently set the baud rate to 115200, so that the setting persists across reboots? I think it has to be done at two separate places - for uBoot, and separately for the kernel.

Thanks

1.5 Mbauds is the default speed on Rockchip devices. I think their bootrom runs at that speed, so it’s not changed afterwards. Of course you could decide to change your uboot config to switch to 115k and pass that to the kernel as well, but I’d instead advise to find a better USB adapter. I’ve also faced similar issues in the past with certain adapters losing some chars, I think they were CH340 as well, though I’m mostly using that nowadays and haven’t faced this issue in a while, so I’m wondering if it’s not just some of the models that are bad (likely too small a FIFO, I seem to remember it’s 32B only).

Other chips may have more, e.g. 64 for FT232R. FT232H has 1kB I think. The CH347 has 12kB Rx and 4kB Tx! CP2102 is said to have 640 bytes. Just my two cents.

It actually can be changed to 115200, but it was already established as the standard Baud when I joined Radxa, and I was only made aware of this possibility much later. Changing it will be more confusing for users when they are trying to figure out the boot issue.

1 Like

@willy What do you mean by “find a better USB adapter”? I’m connecting my Radxa device directly to the PC over a USB cable (USB-A to USB-C). There is no adapter here. The serial chip is built into the E20C, which then has a “debug” USB-C port. It doesn’t seem to play well with USB-C to USB-A connections, even on USB-3 ports. Works somewhat better on direct USB-C to USB-C cable, but still drops characters here and there.

Ah OK sorry, indeed I’m doing the same, but with so many devices I never remember on which ones I’m having an external adapter! The one included in the E20C works fine for me. However I’ve definitely faced issues with certain other adapters featuring too small rx buffers.