On reference designs, BOOT0 is being pulled down with a 10k resistor. If I know I only want to boot from the main flash memory, can I connect BOOT0 directly to GND? How would you get into a situation where you need to boot from system memory or SRAM?
Should I connect the BOOT0 pin on STM32 directly to GND if it's only booting from main flash?
2\$\begingroup\$ Does this answer your question? STM32 programming and BOOT0 pin \$\endgroup\$– Simon RichterMar 18 at 22:09
You can connect it directly to ground.
It just means if you manage to get into a situation where the only exit is to use the BOOT0 pin to go into bootloader, it depends on your PCB and MCU package if you can access the BOOT0 pin any more to set it high.
\$\begingroup\$ How would you get into a situation where you need to boot from system memory or SRAM? \$\endgroup\$– donutMar 18 at 19:20
\$\begingroup\$ It depends how you upload code to STM32 anyway, and if you or someone else writes a piece of code which accidentally locks you out of using that code upload mechanism. \$\endgroup\$– JustmeMar 18 at 19:30