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.
-
1\$\begingroup\$ What happens if you do a POR afterwards? Is this an OTS board or your own design? \$\endgroup\$Andy aka– Andy aka2016年11月28日 14:07:09 +00:00Commented Nov 28, 2016 at 14:07
-
3\$\begingroup\$ Many devices won't power-on-reset if you have one of their I/Os held high by something external (like a logic level serial port) while they are off. Often this is also a data sheet operating conditions violation. \$\endgroup\$Chris Stratton– Chris Stratton2016年11月28日 17:57:51 +00:00Commented Nov 28, 2016 at 17:57
-
\$\begingroup\$ Have you programmed the brownout reset level (BOR)? You might try setting it to level-3. \$\endgroup\$Tut– Tut2016年11月28日 18:16:59 +00:00Commented Nov 28, 2016 at 18:16
1 Answer 1
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.
-
\$\begingroup\$ Thank you for your answer, but all of these are good. \$\endgroup\$mactro– mactro2016年11月29日 07:31:17 +00:00Commented Nov 29, 2016 at 7:31