Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Boot issue, pin pullups

Featured Replies

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

  • Author

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

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.

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

 

#!/bin/bash

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

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.