Sometimes my STM32F4 board doesn't boot after a power-off, power-on reset. All voltages are fine, but the code does not execute. What is interesting, when I connect to the board with ST-link utility, it shows me that there is read out protection enabled (although I didn't enable it). BOOT0 pin is connected to the ground via 10k resistor, decoupling seems OK.
What can be causing this issue? From what I have read in reference manual page 92, to change option bytes, first one should write two specific key values to two different registers. That seems to be very unlikely to happen by accident even once, and my issue appears once every several dozens of resets.