You might be able to modify the shutdown script so that the last thing it
does is drive your gpio to unset the power supply. I've never done that
before; we in fact used an msp430 to do what you need and more.

You can probably find more information about modifying the shutdown
procedure elsewhere. It would be standard Linux stuff, if anybody has done
something like it.

In the old days you could do init 1 to go to single user mode, and then
safely power off from there. In systemd labs I don't know if you can
specify something to be the last thing you do during shutdown.

You could also put an RC filter on the gpio output to give you a little
time. That's pretty janky though I think. I wouldn't sell something like
that (well, I probably wouldn't) but maybe it'll suit your needs.

Have fun googling!

J

On Fri, Jun 19, 2020, 9:15 AM evilwulfie <[email protected]> wrote:

> IF you want power supply control like that. You will need a small
> low power mcu like an msp430 running off of a small coin cell
> to manage power.
>
> On 6/19/2020 12:37 AM, [email protected] wrote:
>
> Hello Dennis,
>
> I much appreciate your reply.
> The point is that I have an external power supply that powers the BB and
> some other peripheral devices.
> So if I make shutdown -h the BB turns off but the external power supply
> still remains on. This is why I have a GPIO pin on the BB to turn off the
> external power supply. But I cannot use this pin if the BB itself is off!
> Hope it is clear now.
> Best rgds,
> G
>
> Il giorno giovedì 18 giugno 2020 23:06:54 UTC+2, Dennis Bieber ha scritto:
>>
>> On Thu, 18 Jun 2020 10:58:55 -0700 (PDT), in
>> gmane.comp.hardware.beagleboard.user
>> [email protected] wrote:
>>
>> >Hello everybody,
>> >I have a GP output of a Beaglebone Green that turns the power off when
>> it
>> >is asserted by SW. It does its job well.
>> >However, I would like to power the Beagle off after having done a
>> shutdown
>> >(rather than turn it off suddenly).
>> >Is there any SW/HW trick to get this behavior?
>>
>>         Are you talking about something that turns off an external power
>> supply? On the BBB, and BBAI, "shutdown -h now" ends with the circuits
>> behind the regulator chip being unpowered.
>>
>>         Anything cutting power to the board itself likely needs to have a
>> sense
>> lead (maybe to one of the 5V header pins) which holds the power supply
>> "active", and opens when it loses the 5V. Of course, that also implies
>> one
>> would need a momentary contact NO switch to the input of the power
>> supply,
>> bridging to an always-on 5V source in order to "jump-start" the system
>> (hold down the NO switch to get the power supply to provide power to the
>> board, release switch when the header 5V pin feeds back to the power
>> supply
>> control). Of course, you may have to find some way to prevent any voltage
>> from the NO switch feeding back to the header pin. Maybe a pair of
>> transistors -- one transistor controlling the power supply input, with
>> the
>> control lead shared by the output of the other transistor and the NO
>> switch; the second transistor controlled by the header 5V pin. IE: this
>> second transistor in/out is parallel with the NO switch.
>>
>>
>> --
>> Dennis L Bieber
>>
>> --
> 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/83df0e35-6a5e-408f-902a-c3cd97453e49o%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/83df0e35-6a5e-408f-902a-c3cd97453e49o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> 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/0c2a8459-c25b-98a8-caa2-7bc88d183fdc%40gmail.com
> <https://groups.google.com/d/msgid/beagleboard/0c2a8459-c25b-98a8-caa2-7bc88d183fdc%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAGS%2B2h-ag8E599D2jHhb833r3VdAN_BtRYy3gm1B3bZtGwJ1aA%40mail.gmail.com.

Reply via email to