Battery backup and automatic shutdown and startup
#6
(05-05-2016, 06:59 AM)caseih Wrote: Right.  I know it can run off battery.  That's not was I was asking about.  

I need to know if the Pine is powered from battery, and if so, I need to initiate a complete shutdown after a certain amount of time, and then when power is restored, boot back up again.

To summarize.  Is it possible to:
1. detect in software if running on battery so I can halt the system
2. completely power down the pine from software
3. turn on when power returns

I realize I could theoretically install a big battery, but I actually want the ability to shut it down by pulling the power for a long period of time (say 20 to 30 seconds).

Even though tllim hasnt had time to get back to us, perusing the boot log from my pine shows me a few noteworthy things. 

Code:
no battery, limit to dc
no battery exist
usbcore: registered new interface driver ums-usbat
The first two are early in boot, I believe before the kernel starts while in u-boot. The last one is well into linux starting but I am unsure if it is what it sounds like.

First is from u-boot-pine64/board/sunxi/common/power_probe.c

Second is from u-boot-pine64/board/sunxi/common/power_check.c


Messages In This Thread
RE: Battery backup and automatic shutdown and startup - by rahlquist - 05-05-2016, 07:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Anyone know can play how long the LITHIUM BATTERY CASING? joe 4 7,164 03-06-2017, 12:01 PM
Last Post: xalius
  Battery and the PlayBox JoeHz 6 9,651 09-13-2016, 12:18 AM
Last Post: gperez1234
  Startup Woes abasel 9 16,162 07-28-2016, 06:34 AM
Last Post: z4v4l
  Photo data backup Jimmy Chiau 7 9,337 01-29-2016, 09:35 PM
Last Post: Jimmy Chiau

Forum Jump:


Users browsing this thread: 4 Guest(s)