0.5V on PG10

Started by jonas.dorel, February 06, 2019, 09:09:54 pm

Previous topic - Next topic


I noticed that when trying to turn on the UART4 TX (PG10 / GPIO1 25), its voltage is 0.5V, instead of the 3.3V I see on other pins. Does anyone else have this issue ?

I am using the following code

# GPIO Control

from pyA20Lime2.gpio import gpio
from pyA20Lime2.gpio import port
from pyA20Lime2.gpio import connector


de = port.PC20
re = port.PC19
tx = port.PG10
rx = port.PG11

gpio.setcfg(de, 1) # 0 is INPUT, 1 is OUTPUT.
gpio.output(tx, 1) # 0 is LOW, 1 is HIGH.


Technical support and documentation manager at Olimex


February 08, 2019, 11:50:21 am #2 Last Edit: February 08, 2019, 11:52:01 am by jonas.dorel
I don't understand the question as I am using the library from the link.

It also works fine when I put the TX pin to LOW, its voltage is 0v.

Jonathan Fether

February 13, 2019, 05:10:03 am #3 Last Edit: February 13, 2019, 05:12:27 am by Jonathan Fether
Hello Jonas,

   I had a similar problem with the A20-SOM204 which turned out to be a regulator not enabled that supplied the A20's ball E18 "VCC_CSI1/VCC-PG" which resulted in very low voltage levels on port G.


   The fix was a change in the device tree that I pointed to in that message. Edit the device tree source of the board and add a "regulator-always-on;" clause to &reg_ldo4, then recompile the device tree, back up the original, and replace the one in your /boot/dtb directory.

   Probably easier, if you're using Armbian and have a working armbian-add-overlay command, is to just use this Device tree source file:


/ {
    compatible = "allwinner,sun7i-a20";

    fragment@0 {
        target = <&reg_ldo4>;
        __overlay__ {

Save that to a file such as "ldo4-always-on.dts" and use "armbian-add-overlay ldo4-always-on.dts" to compile it and add it to the U-Boot config file (/boot/armbianEnv.txt, the overlay would compile as /boot/overlay-user/ldo4-always-on.dts). Getting the armbian-add-overlay command to work has been a little tricky in my experience due to a kernel headers issue and a wrong version of the device tree compiler that doesn't support symbols (-@ flag). You may need to play with it a bit. That tells the AXP204 to enable 3.3V to the LDO4_3.3V power net and this supplies Port G.

Best regards,


Thanks, it worked like a charm. To be honest I would never have thought about this...

Note: for now, on Debian, the dtc version in the stable repos cannot compile symbols, so I add to get the latest version from the test repos.