1
\$\begingroup\$

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.

\$\endgroup\$
  • 1
    \$\begingroup\$ What happens if you do a POR afterwards? Is this an OTS board or your own design? \$\endgroup\$ – Andy aka Nov 28 '16 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 Nov 28 '16 at 17:57
  • \$\begingroup\$ Have you programmed the brownout reset level (BOR)? You might try setting it to level-3. \$\endgroup\$ – Tut Nov 28 '16 at 18:16
2
\$\begingroup\$

Here are a few thoughts on what you can try or improve:

  1. 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.
  2. Reset should be connected to 3.3V via a 10kOhm resistor
  3. Boot0 should be connected to GND via a 10kOhm resistor
  4. 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.
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thank you for your answer, but all of these are good. \$\endgroup\$ – mactro Nov 29 '16 at 7:31

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.