2
\$\begingroup\$

I am developing a STM32H7 board which will be programmed via SWD.

I am curious, is there any reason why I should connect BOOT0 pin to GND via resistor and not directly to GND?

I won't be using the bootloader but can it happen that I accidentally disable the debug port from software and then can't program the MCU via SWD anymore and need to use bootloader mode by putting BOOT0 high?

\$\endgroup\$
  • 1
    \$\begingroup\$ if you have a resistor to ground, then you can change the state of the pin by connecting it to Vcc ... if the pin is connected to ground directly, then you have to disconnect it before it can be pulled high \$\endgroup\$ – jsotola Apr 10 at 23:33
4
\$\begingroup\$

If you're making a board, why not provide for a resistor/jumper to connect Boot0 to +V and GND? Then only populate one of them? Leave your options open. You don't need a resistor. I prefer to use a jumper rather than a resistor.

You can use header shunts as jumpers that can be easily changed but that takes more PCB space, components and more assembly work. Or just place an SMD chip footprint you can either choose to use an SMD resistor or SMD jumper (zero ohm resistor) during assembly. Then you can fiddle with things all you want after-the-fact.

\$\endgroup\$
4
\$\begingroup\$

I won't be using the bootloader but can it happen that I accidentally disable the debug port from software and then can't program the MCU via SWD anymore and need to use bootloader mode by putting BOOT0 high?

That's exactly why you might want to use a resistor and not a zero ohm jumper. With a resistor, you can manually override it with a piece of wire to the opposite rail start in bootloader mode once, without having to get out the hot air station and change the resistor.

Granted, if you have the hardware reset line brought out, and an SWD probe that actually drives it, and a suitable SWD software config (both common points of failure - and specifically a failure that may not be noticed in routine use, but only when this kind of recovery fails to work) then that is another way to work around disabled SWD lines.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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