I've been trying to find some documentation on the status of all GPIOs during boot. I have a relay board permanently connected to the GPIOs, and I've noticed that during boot, there is a lot of switching actions on the relays, meaning the GPIOs must be switching between high/low a lot and pretty quickly.

I'm working with Raspbian Stretch 4.9 with desktop, and would like to know exactly what the status of all the GPIOs is by default at boot, and how it changes during boot, before the desktop etc is loaded. Info regarding Raspbian Jessie would be good too (if different from the info relative to Stretch).

I've found a lot of "user submitted" answers googling around, regarding different patches of Raspbian and quite inconsistent with each other, and not pointing to up to date documentation.

Does anyone know where I could find this information, possibly from official documentation?

  • Use external PU/PD regardless, the boot state does not always match the bootstrap state (after bootloader and kernel), and the only way to guarantee an electrically stable input in the period of time before the CPU completes start up (typ ~100ms) is with an external PU. Sometimes even this is not enough to guarantee safety and other electrical schemes are used to force things to a good state while system boots.
    – crasic
    Nov 10, 2017 at 17:34
  • In other words, it is legitimate to use hardware delays and electronics to sequence critical external components. For example I have used a simple RC to delay the energizing of a 5V rail for an external device by 500ms after power-on when I know control pins are in a good state.
    – crasic
    Nov 10, 2017 at 17:37

1 Answer 1


All pins are configured as input, with various "pulls" as described in http://www.panu.it/raspberry/

This may be modified by settings in config.txt which are implemented by Device Tree. Typically pins for serial and I²C are initialised.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.