Jump to content

Boot issue, pin pullups


garinus

Recommended Posts

Hi,

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? 

 

Thanks 

Simone

Link to comment
Share on other sites

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:

printenv

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 

saveenv

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

boot

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

Link to comment
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.

J.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines