Launched at the tail end of last year, our Raspberry Pi 400 computer has a unique feature that is completely new to Raspberry Pi products. You can turn it off and on again. Or rather, it has an on/off button, which lets you turn it off and on again.
We’ve talked about the design of Raspberry Pi 400 on the blog before, but a recent question on Twitter made us realise that we haven’t really talked about how we implemented the on/off button in any sort of detail.
As you can see on some of the teardowns of the Raspberry Pi 400 that have been published, we use a Holtek HT45R0072 chip as a controller chip for the Raspberry Pi 400’s keyboard. The HT45R0072 is an 8-bit microcontroller chip specifically designed for, and widely used by, computer peripherals like keyboards.
The Holtek controller chip is always powered when USB power is connected to your Raspberry Pi 400, and we use a custom firmware that scans the keyboard when the system is switched off. If the power key (
Fn+F10) is pressed, it wakes up the Power Management Unit (PMU) chip via the GLOBAL_EN pin.
Fn+F10 is pressed while the system is booted and Raspberry Pi OS is running, it sends a
0x66 USB HID message to the Linux kernel to tell it to shut down the computer. Linux will shut down all running applications, and then send an acknowledgement message (an
ACK message) via a GPIO pin to the Holtek chip to tell it to cut the PMU power.
One thing to note is that there was a bug in our custom Holtek firmware where you have to press the button twice to shut down if you’d already used the button to shut your system down in an earlier session. The bug was found pretty quickly, and then fixed in a later version of the silicon.
So, in the immortal words of every sysadmin ever: Hello, IT, have you tried turning it off and on again?