STM32F4 doesn't boot after reset and enables read out protection
Here are a few thoughts on what you can try or improve:


Stability of the power supply: when the STM powers up, it needs more power compared to normal operation. Can your power supply these ~100mA? Under and over voltage causes resets or strange behavior.
Reset should be connected to 3.3V via a 10kOhm resistor
Boot0 should be connected to GND via a 10kOhm resistor
Crystal should work correct: we use 22pF capacitors for a 8MHz crystal. If it's mismatched there can be temperature dependency, perhaps the explanation for your problem. Also soldering issues within the crystal circuit are likely to fail sometimes.