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.

using gpio to inform system has shutdown

Featured Replies

hi guys,

i'm using NanoPi neo core using a battery and a volt booster.

and I want to control the voltage booster to turn off all peripherals to conserve power and prevent battery drainage.

I figured there's a PWR-LED pin connected to GPIOL10, which turns off when the system shut down.

is there a way to map another GPIO in the same way so i could know when the system has shut down - so it will be safe to cut power off?

 

thank you so much.

 

You can use "gpio-poweroff"  https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/gpio-poweroff.txt

 

PA2 will be High when shutdown complete:

/dts-v1/;
/plugin/;
/ {
    compatible = "allwinner,sun8i-h3";

    fragment@0 {
	target = <&pio>;
	__overlay__ {
	    poweroff_pins:poweroff_pins {
    	    allwinner,pins = "PA2";
    	    allwinner,function = "gpio_out";
	    };
	};
    };

    fragment@1 {
	target-path = "/";
    	__overlay__ {
    	    poweroff: poweroff {
            	compatible = "gpio-poweroff";
            	gpios = <&pio 0 2 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.