Clean Shut Down via GPIO


We are developing a battery powered system in which a microcontroller controls power to the Jetson TX2. To perform a ‘clean’ shutdown (e.g. as would be done by sudo shutdown now) we are having the microcontroller send a message to the TX2 asking it to shut down. A program on the TX2 checks for this message and runs the shutdown command when the message is received.

This works, but we’d like to know if there is a way to do a clean shutdown (not abruptly cutting power) simply by having the MCU toggle a GPIO. This would be preferred as it’s probably more robust than the current software-based solution. We are using the Orbitty carrier at the moment but plan to design our own eventually:


hello oliver30sgx,

am I understand correctly you would like to ask about GPIO to control system power-off, and also would like to active as software shutdown commands?

Hi Jerry,

Yes, I want to know about using a GPIO to control system power-off. Thanks

Hello oliver30sgx,

Kernel has a driver for GPIO based tachometer which uses GPIO interrupts to measure speed. When the speed is below a threshold, it initiates (orderly_poweroff()) ordered shutdown(kernel-4.9/drivers/hwmon/gpio-tachometer.c). You can take inspiration from that driver to use GPIO interrupt and initiate orderly shutdown.