Weird behaviour of UART on Rock 4B+

I’m continuing here my previous topic PD Power supply on Rock 4B+ with some problem when trying to debug over the UART.

We have UART-USB convertor with FTDI FT232RL chip (the same as in the tutorial on Rockpi4 wiki). When using for the debug console, we get only a lot of garbage and the board does not boot up at all (only green light on). Could be wrong baudrate? I recompiled u-boot/dts with lower baudrate but it does not help - no output at all.

However, we are able to use for normal serial communication on UART4 (/dev/ttyS4) but only in one direction (regardless the rate, works even with 1500000). I can send data from PC to Rock but not from Rock to PC. Nothing received.

So we bought different UART-USB convertor - Waveshare based on CH343G. And the problem is exactly opposite - we can send from Rock to PC but not from PC to Rock. It could be fine for the debug console as I need output only. But there is something strange:

When the converter is connected to PC and I connect RX, TX and GND to Rock pins, the Rock’s green power lights on although the power is not connected yet. Why? Now when I connect PD PSU, the board does not start at all. Nothing happens. When I use a standard RPi 5V/3A PSU, the board starts correctly and I receive output on serial console.

Please search for the PD-Problem thread with rock-5B, might be the same problem here. In short: The PD-Power Supply may RESET if the state engine isn’t feed fast enough. As the code yet is in the kernel, it just took too long for the kernel to boot. Happens for instance with my PD capable monitor. Some PS seems to have a longer timeout, for instance the “official” one sold by Allnet.china. A solution offered in the thread is to put the PD logic into U-boot. There was even working patches if I remembered right. I did not try it, as I have the Allnet PS which works fine with my Rock-5’s.

Regarding your UART-problem. Yes, the default value is 1.500.000 baud. Note that for a working debug setup you must also set this baud-rate to the kernel. Do not try to change it (btw, sure you boot YOUR compiled version of u-boot?), makes no sense to slow it down. I have two FTDI based cables, one from Allnet.china (the one from the radxa wiki) and one from Amazon. Both work without problems in both directions, just make sure you connect the pins right. I can for instance stop the boot process in U-boot over the serial console. This was more a problem with the Amazon supplied one. That said, I had similar problems using some GTK-based terminal (cant remember the name). Communication only in one direction. Now using picocom it works as expected.

You are right. It didn’t boot my compiled u-boot, because I didn’t know that just installing the generated DEB is not enough and the bootloader on eMMC must be updated manually.

Nevermind, I got the serial console working properly with a new CH343G and I got the log that I need. However, it works with non-PD PSU only. The board does not start with PD PSU at all (green light does not light on at all). The UART converter has 3.3V/5V VCC switch and when switched to 5V and connecting RX, TX, GND pins looks like it sends some voltage to the board - green LED lights up very slightly although no power is connected. How can this happen?

And connecting the converter to UART4 makes some USB devices malfuncting (tons of -110 errors in kernel log).

Er, you should NOT connect the 5V pin of the converter to the board. You haven’t done this, or? Otherwise you power the board from rhe USB power of the converter which has not enough current for boot. You must connect only RX, TX and GND.

Of course, I didn’t. As I said, only RX, TX and GND pins are connected.

It’s this converter: https://www.waveshare.com/usb-to-ttl-b.htm