Trouble connecting via uart

Hi everyone

I’ve been trying to connect to my VF2 1.3B via UART for a while now with little success.
I’ve connected pins on the board to usb serial adaptor as written in get started guide. I’ve been playing around with all combinations of jumpers on the board, and I’ve been playing around with various minicom settings.

I can see the output from my board, but I can not type anything. Plus the output is distorted

I’ve tried enabling and disabling software and hardware flow control in various combinations, but nothing has changed.
I also tried different host PCs, different adaptors, Manjaro, macOS, Ubuntu.

Other than that, the board seems to work fine.

Has anyone faced a similar issue? Is there a solution?

1 Like

It’s probably the wiring between the adapter and VF5, causing bad signalling.

Switch everything off before checking the wiring.

Use the shortest possible cables, make sure they have good contact. Especially the earth contact, and are not routed close to power, usb or video cables.

At the high baudrate used (115200) it is easy to get occasional electrical/capacitive interference on the unshielded connecting wires.

2 Likes

I can see the output from my board, but I can not type anything. Plus the output is distorted

What adapter are you using?

If it’s a ch340, I know they’re not very tolerant to small clock differences, and would suggest ordering one based on cp2104. (many $2 options on aliexpress)

As for the wiring, you should connect TX<>RX, RX<>TX and GND<>GND, and nothing else, especially not any 3v3 or 5v headers.

I’ve tried enabling and disabling software and hardware flow control in various combinations

No flow control is used. It should be set to NONE.

3 Likes

Thank you @easytarget @rvalles

Changing the wires certainty has an impact: I get less distortion if any now.
But typing commands still fails. I’ve tried two adaptors: one is CH340, the other has no markings on it, solid grey metal housing, but I guess it’s a PL2303 something. I’ll try buying a different adaptor. As for flow control, I tried both off, both on, one on. I see no changes.

2 Likes

I have tried booting my new VisionFive2 v1.3b using Image-55, Image-69, sdcard.img without success. I have tried connecting to a USB TTY converter pins 6,8,10 using minicom and get the output from the VF, but can’t transmit to it. I can’t stop the boot process or transfer the username and password.

Have you tried switching to something other than minicom. I had the same problem of receiving from the VF2 over the USB-serial link no problem but could not send to the VF2. Replacing the USB-serial convertor and the connecting wires changed nothing. However when I used something other than minicom everything worked fine.

In my case as I’m using Linux I used screen. The following command worked for me:

screen /dev/ttyUSB0 115200 8N1

Hope this helps.

2 Likes

On Linux, by basic recommendation is tio.

As an alternative, the python-serial or pyserial package (pip install pyserial) bundles a basic terminal:

python -mserial

But both screen and minicom should be totally fine.

3 Likes

I just got a new adapter based on CP2104 and it just works fine now: with old cables and minicom. No output distortions, input works. Thanks everyone for help.

3 Likes

I succeeded in getting the VisionFive2 to boot using VF2.11.5 wayland.img after SCP u-boot-spl.bin.normal.out and visionfive_fw_payload.img to the mtdblock files. I changed the color from pink and tried to install other programs and dependencies but can’t find the script. Need firefox.
Now SDH and SCP seem to be blocked from my host Ubuntu 22.04 machine and from the VF.

1 Like

Good to hear.

pl2303 always had a bad rep, so I avoided them. ch340g I have some and know for a fact from practice that they are problematic as they have both a low quality internal clock (can be seen with logic analyzer) and poor clock tolerance.

They’re popular in budget solutions because if the clock is low enough they’re fine, and having an internal oscillator means lower cost overall. For a usb to ttl serial adapter, they make no sense as what you want is a tool you can rely on.

cp2104 is cheap and trouble-free like the venerable cp2102 was but supporting higher speeds. And as it has great driver support across OSs too, I always recommend these.

3 Likes