1 1

Boot issue, pin pullups

Recommended Posts


I'm tring to solve an issue on my Orange Pi Zero: at boot time the pins PA18 and PA19 are stucked to Vcc. I tried a lot of solution, now the best result is to add at the beginning of the file boot.cmd the command to clear the gpio configuration:

gpio clear PA18
gpio clear PA19

and recompile the boot.scr.

Despite this the pins goes HIGH for some seconds until the bootloader reach this line.

What is the boot scheme?

Why i get this pin HIGH? Is it because the I2C1 is configured? Is it possible to disable it? 




Share this post

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Sorry I check a second time on the schematic and I saw the two resistor.  I dissoldered them and now it work as i expected.  

On these pin i have two relays, so when it turns on the relay switch on for some seconds until or the bootloader or the program takes over the control of the pins.


Yesterday I tried other option to clear the pins, I report them here to share:

connecting on serial press space on the reboot until the console of the bootloader came up (it shows a line: Autoboot in 1 seconds, press <Space> to stop.)

write on the console the command:

setenv set-io 'gpio clear PXXX'

where PXXX is the pin to clear, (eg. PA18),  set instead of clear to set high. 

is possible to set two or more pins using:

setenv set-io 'gpio clear PXXX; gpio clear PXXX'

now we add on the line preboot. we need to know what is write on this line so we launch the command:


and we read the line preboot, like:

preboot=usb start

now we store the new command:

setenv preboot 'run set-io; usb start'

and we save 


now is possible to boot and reboot the system as usual from armbian:


this is for me the command that start first. Does anyone know some command that start before the preboot? Or how to put it at the beginning of the bootloader

Share this post

Link to post
Share on other sites

Can someone help me with a way to set the internal pullup resistors on a couple of gpio's on boot up? I want to use a couple of buttons without external resistors and without the resistors I get random triggers.


I want to use command line without something like wiringGPIO


Thanks for any help.


Share this post

Link to post
Share on other sites

I use sunxi-pio (with the legacy kernel), from the sunxi-tools package



#PA20, input, pull-up 
sunxi-pio -m 'PA20<0><1><0><0>'


Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
1 1