Hi all,
I have previously designed SH-RPi, a power management board that accepts a 9-32V input and provides a safe shutdown feature using supercaps: when the power input is cut, a daemon process initiates shutdown, and when the shutdown is complete, the board controller cuts the 5V output. This all works very reliably - typical use cases would be deeply embedded marine, automotive computers or even 3D printer servers that log data to local disk and need to safely shut down without user interaction.
The SH-RPi controller communicates with the daemon over I2C and Pi shutdown is detected with a gpio-poweroff dtoverlay.
I am now designing a CM4/5 IO board that incorporates the same power management functionality as SH-RPi. When used with a CM4, the logic would be identical to the SH-RPi, but with the CM5, I am hoping I could make use of the PWR_Button pin and initiate the shutdown by simulating a button press. However, to complete the process, I would need to know when the shutdown is complete. LED_nPWR (the red power LED) is pulled down (turned on) when the device is shut down, but the LED has other functions as well, and relying on it seems haphazard.
Are there any other signals that I could use to detect whether the CM5 has shut down? I just noticed that POWER_OFF_ON_HALT bootloader option is enabled by default - would it be as simple as monitoring the 3.3V rail voltage?
I have previously designed SH-RPi, a power management board that accepts a 9-32V input and provides a safe shutdown feature using supercaps: when the power input is cut, a daemon process initiates shutdown, and when the shutdown is complete, the board controller cuts the 5V output. This all works very reliably - typical use cases would be deeply embedded marine, automotive computers or even 3D printer servers that log data to local disk and need to safely shut down without user interaction.
The SH-RPi controller communicates with the daemon over I2C and Pi shutdown is detected with a gpio-poweroff dtoverlay.
I am now designing a CM4/5 IO board that incorporates the same power management functionality as SH-RPi. When used with a CM4, the logic would be identical to the SH-RPi, but with the CM5, I am hoping I could make use of the PWR_Button pin and initiate the shutdown by simulating a button press. However, to complete the process, I would need to know when the shutdown is complete. LED_nPWR (the red power LED) is pulled down (turned on) when the device is shut down, but the LED has other functions as well, and relying on it seems haphazard.
Are there any other signals that I could use to detect whether the CM5 has shut down? I just noticed that POWER_OFF_ON_HALT bootloader option is enabled by default - would it be as simple as monitoring the 3.3V rail voltage?
Statistics: Posted by mairas — Mon Dec 02, 2024 10:38 am