Showing results for 
Search instead for 
Did you mean: 

STM32F401RCT6 requires a reset to run code

andrew sauter
Associate II
We have a new revision that has a significant population of boards with this intermittent power issue.
steps to reproduce
  • press power button
  • power applied to the MCU 
  • the MCU only prints a single debug message, then halts
  • press reset: device works normally


resolves issue
  • If I enable the hardware watchdog is takes a variable time period where I see these single debug statements before running normally
  • This issue appears to be related to the rate of change of the MCU VDD. If the VDD changes very slowly e.g. walking a bench PSU up 100 mv per sec it works, else it halts
  • replace the MCU, since most of the boards seem to work

  • with various brown out levels
  • I have tried using older code w/ and without a bootloader
  • manully undoing some of our changes in this board revision
  • with other power rails and peripherals not enabled / connected
  • reading the SCD registers one device showed a hardware fault and one did not
  • my nRST rises after 3.3V and if I force hold nRST low while applying power and then release, it does not resolve issue
many thanks
andrew sauter
Associate II

These boards are built with this crystal  Raltron 32 kHz 12.5 pF

Layout: there is a continuous return on adjacent to the top and bottom side, but we change reference as it goes from top to bottom layer (no transitional via) there are two series elements both zero ohm, no ground cut, no guard trace, but also no significant adjacent noise sources.

My parasitic allowance was ~3 pF perhaps it is much higher. Which is surprising and the bare board does not measure higher using LCR meter DE-5000



Lot going on there, I wouldn't have gone with the via's like that, just straight to the crystal


Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I don't quite understand how the return is arranged, but it should not be tied to common ground but should be separate and as short as possible. Plus what @Tesla DeLorean said above. See AN2867.

OTOH, a really well designed crystal oscillator start up time *is* long (this is an implication not an equivalence, i.e. long startup does not mean the design is good). Thing is, that the oscillator starts up from picking up and amplifying noise, and well designed oscillator doesn't have too much noise to start from. 10 seconds is quite normal (and timeout should be even longer), so the application has to deal with this.


AN2867 is great, I will also be performing the gain margin test, by adding 5x the crystal ESR and verifying it still works, also


It appears we have two MCUs that are outliers in that they require more stabilization time for their RTC. Swapping crystals, capacitors and bare boards, the issues seem to track with these two MCUs.


Perhaps we were just marginal to begin with as there was much more parasitic capacitance. I can even omit the load caps, with the outlier MCUs and it starts up in 300 ms. Yet to replicate on a more typical MCU. I presume the more typical MCUs will just want a lower value capacitance. I think this could be caused by gate propagation delay in the MCU crystal amp, not sure.