DevTerm R-01 Ext Board UART is read only?

Hello,
I’m working on porting buildroot to all the various risc-v boards that are hitting the market. I’m starting to bring up the R-01 devterm but I don’t get the LCD screen to work. I did find a UART connector on the extension board next to the printer and camera ribbon cable connectors.

This allows me to see output of the boot logs from OpenSBI all the way until I get a prompt to login. However I am unable to send keyboard input over the UART connector. At first I thought it might be because the console is moved to a different tty during the boot process. But I am also unable to pause booting in the two second window on U-Boot where I should be able to hit any key to bring up a console on U-Boot.

Is the RX line enabled on this UART port? Does anyone have suggested settings? I’m using 115200/N/8/1 for the settings. I do see output just fine without issue. Using this image on a different brand of risc-v board (lichee 86 panel) and am able to send input which leads me back to the UART connector on the DevTerm board.

Any help appreciated,

-Grant

3 Likes

The problem is that the CH340C provides 5 V logic levels, whereas the D1 only supports 3.3 V I/O. This is just a bad situation overall, and I am surprised there is no level shifting or even any resistors on the R-01 core module to compensate.

Additionally, the LED circuit creates a voltage divider from VBUS, so even if the CH340C drives TxD to ground, the voltage at UART_RX is about 50% of VBUS, or 2.5 V. The D1 still sees this as a high level (it’s over 75% of VCC-IO!), so that explains why the D1 never receives any data.

You can partially fix the issue by grabbing a soldering iron and removing R15 and R16 from the expansion board. This removes the voltage divider, so the CH340C can now pull UART_RX all the way to ground. This will allow you to use the USB-UART in both directions.

However, I still measure 3.75 volts on the D1 end of R18. While this is below the absolute maximum voltage for the VCC-IO domain (3.96 V), it is well above the recommended maximum VCC-IO voltage (3.63 V), and you will be feeding power from the UART pins back in to the SoC. So I still cannot recommend using the USB-UART even with this fix.

A better solution would be to solder wires to pins 2 and 3 of the CH340C and use a different USB-UART adapter that runs at the correct voltage.

2 Likes

Are R15 and R16 correct for this?


UART2
DevTerm/Schematics/clockwork_DevTerm_Ext_Schematic.pdf

2 Likes

That’s right. Remove those resistors and make sure the pads underneath are separated (not shorted).

I suggested using a soldering iron, since that’s what I used, but pulling the resistors off with tweezers would probably work as well.

2 Likes

Great to have your wisdom.
I’ve received my DevTerm R-01 kit today and I’ve been worrying the USB malfunction issue since the July 3 initial report. My goal is to use the R-01 for general RISCV development project. Working serial console is must for me. I will report the result of register desoldering hack when I complete.

I was able to input with USB-UART. I removed Part with a nipper.
Thanks! :smiley:
https://github.com/emutyworks/DevTerm-R01/wiki/Connect-with-USB-UART

1 Like

Thanks a million. That’s great. I was going to try to remove D2 when I had a moment, thinking along similar lines. Hadn’t thought of the logic levels.

Seems C11 can be removed and that pad can be tied to a 3.3 volt source to fix the logic levels per the CH340 datasheet. Will crack open my case and find a good place to connect the other end of a wire to fix that.

No no no no!

C11 should be changed, yes, but for a bigger cap, but not connected to 3.3V.

The chip is using that for an internal LDO and need a cap there, not an external power supply. If you do that you are likely to damage the chip.

The data sheet is clear and you can only connect that pin to an external 3.3V if the whole chip is powered using 3.3V which is not the case here as it is powered by the 5V/VBUS.

From the data sheet:

CH340 chip supports 5V and 3.3V power voltage. When using 5V source power, the VCC input 5V power and the pin of V3 must connect with 4700pF or 0.01uF decoupling capacitance. When using 3.3V power voltage, connects V3 with VCC, and input 3.3V power voltage.

The problem is 1nF is way too small for the LDO to work properly and need to be replaced by at least a 10nF capacitor.

1 Like

I’ve connected the UART port to a Mac USB port (without modifying the resistors). However, the serial connection seems to keep dropping (disconnecting) during the boot sequence. I’ve set this to 115200 baud 8N1 per your screenshot. Is this also related to the power and other issues mentioned in this thread?

Try a short USB cable (about 20cm). I failed with long USB cables.

2 Likes

The problem are the capacitor on the board, the length of the cable will have no impact (well it may but that’s complicated to explain, it’s more the quality of the cable that would have an impact, but bad quality shorter = chance it may work, better quality but longer would also chances it may work)

One capacitor on the board has to be replaced for the USB Serial bridge chip to work properly.

C11 here:

The CH340 recommend at least a capacitor 10x that size (0.01uF aka 10nF), but a bit higher is fine too, but too small will create brown out and the chip is likely to not work properly.

1 Like