The thing is: The PMIC already sends an interrupt when input voltage drops
under 5V.  Same as when the power button is pressed. Aside from losing USB
until you reboot, this is not the problem. Then problem is when you have
power connected, and issue a shutdown now -h( or halt ). The board will be
stuck until it is hard reset. This also occasionally happen when issuing
shutdown now -r( reboot ). There is no pin out for the hard reset line on
the processor. So we're forced to make due by completely disconnecting
power.

In cases where power goes away all together, this again is not a problem.
But when one uses a battery, the board will have power for hours. So a
bullet proof solution needs a GPIO + power relay to completely disconnect
power good for a few seconds. Otherwise you'll be stuck for up to several
hours without a running system.

So again, the smart move is to use a low cost, low power MCU to handle all
of this automatically. For remote applications. If the board is sitting on
your desk, then the application is no big deal anyway, as well as giving
you the ability to physically remove power yourself. At a remote site
however . . .

Anyway, you all can debate all this until you're blue in the face. I know
what the issues are because we've discussed, and have tested for all these
situations. So do as you please.

On Mon, May 16, 2016 at 12:09 PM, evilwulfie <[email protected]> wrote:

> not enough time for a clean shutdown
>
>
>
> On 5/16/2016 9:41 AM, 'Mark Lazarewicz' via BeagleBoard wrote:
>
> Exactly.  These cheap external chips have a rc time constant and are
> pulsed by a GPIO . Output can generate an Interrupt back to Bbb to save
> important data.
>
> Sent from Yahoo Mail on Android
> <https://overview.mail.yahoo.com/mobile/?.src=Android>
>
> On Mon, May 16, 2016 at 3:50 AM, Micka
> <[email protected]> <[email protected]> wrote:
> You dont need an external microcontroller....  Some watchdog from Texas do
> a good job like the uccx946.
>
> Le lun. 16 mai 2016 09:01, arsi <[email protected]> a écrit :
>
>> Hi,
>>
>> I use this:
>>
>>
>>
>>
>>
>> PIC 10F200 source code:
>>
>> /*
>>    File:   main.c
>>    Author: arsi
>>
>>    Created on May 22, 2015, 10:32 AM
>>  */#include <xc.h>#include <stdbool.h>#include <stdint.h>#define _XTAL_FREQ 
>> 4000000#pragma config WDTE = ON        // Watchdog Timer (WDT 
>> enabled)#pragma config CP = OFF         // Code Protect (Code protection 
>> off)#pragma config MCLRE = OFF      // Master Clear Enable (GP3/MCLR pin 
>> fuction is digital I/O, MCLR internally tied to VDD)
>> void delay1() {
>>     __delay_ms(1000);
>> }bool flag = false;int counter = 0;
>> void main(void) {#asm
>>     CLRWDT
>>     CLRF TMR0
>>     CLRWDT
>>     MOVLW 0b00001111
>>             OPTION#endasm
>>             CLRWDT();
>>     TRIS = 0b1110;
>>     CLRWDT();
>>     GP0 = 0;
>>     __delay_ms(500);
>>     CLRWDT();
>>     TRIS = 0b1111;
>>     CLRWDT();
>>     //pause for BBB boot up
>>     for (int i = 0; i < 120; i++) {
>>         delay1();
>>         CLRWDT();
>>     }
>>     counter = 0;
>>     while (true) {
>>         delay1();
>>         if (counter < 120) {
>>             CLRWDT();
>>         }
>>         if (flag != GP1) {
>>             counter = 0;
>>             flag = GP1;
>>         } else {
>>             counter++;
>>         }
>>
>>     }
>> }
>>
>>
>>
>> *******************************************************************************************
>> wd script on BBB:
>>
>> #!/bin/bash
>> sleep 10
>> echo 60 > /sys/class/gpio/export
>> echo "out" > /sys/class/gpio/gpio60/directionwhile :do
>> echo "0" > /sys/class/gpio/gpio60/value
>> sleep 1
>> echo "1" > /sys/class/gpio/gpio60/value
>> sleep 1
>>
>> done
>>
>>
>>
>> ***********************************************************************************************
>>
>> Arsi
>>
>> ------------------------------
>>
>> *From:* Kb2pnm
>> *Sent:* Saturday, March 22, 2014 6:08PM
>> *To:* Beagleboard
>> *Subject:* [beagleboard] Hardware watchdog for BBB
>>
>>
>> HI, I have been working for a wile on safe power supply for BBB with
>> backup power provided by supercapacitors. In case of power failure there
>> is  just enough  time to safely and nicely shut down BBB. For some reason
>> BBB does not always wake up fully. I need hardware dogwatch. Did anybody
>> design such a thing? I was able to find some design for ardunio:
>> http://www.playwitharduino.com/?p=291.
>> Anybody has any experience with hardware dogwatch for BBB??
>> Thanks in advance
>> Robert
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> <https://groups.google.com/d/msgid/beagleboard/57397009.2000005%40chello.sk?utm_medium=email&utm_source=footer>
>> https://groups.google.com/d/msgid/beagleboard/57397009.2000005%40chello.sk
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> <https://groups.google.com/d/msgid/beagleboard/CAF%2BMRtmfNSrCXk-egMpz-gGqzjt%3D8qRgsrzv2FbrQUqrLAw0Lw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> https://groups.google.com/d/msgid/beagleboard/CAF%2BMRtmfNSrCXk-egMpz-gGqzjt%3D8qRgsrzv2FbrQUqrLAw0Lw%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> <https://groups.google.com/d/msgid/beagleboard/587089779.3315783.1463416888133.JavaMail.yahoo%40mail.yahoo.com?utm_medium=email&utm_source=footer>
> https://groups.google.com/d/msgid/beagleboard/587089779.3315783.1463416888133.JavaMail.yahoo%40mail.yahoo.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/8c341d52-63ca-04b3-a13a-1db3720e371a%40gmail.com
> <https://groups.google.com/d/msgid/beagleboard/8c341d52-63ca-04b3-a13a-1db3720e371a%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrG_FaNB%3D5sCAYZ4sj%3D8%3DkFRwxBVZQzSHTao0NB4Wk89w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to