cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 power-on problem

jarusauskas
Associate II
Posted on May 30, 2012 at 10:45

I have designed a PCB that has an 

http://www.st.com/internet/mcu/product/250189.jsp

 microcontroller. It kind of works, but the micro has a weird power-on/startup problem. Basically, when the power is applied the micro will not start on it's own and the crystal will not oscillate. Pressing reset helps, but only if it's done 1.5-2 seconds after the power is applied. Before that, the micro is unresponsive.

I am using a 24Vdc SMPS to provide power to the board. Then an LM2674 brings that down to 3.3V for the micro and other devices. Below is the lost of things that I have tried:

  • Adding capacitor to the reset line. A small cap, like 1uF, does not make any difference. A BIG cap (I soldered a 1000uF just for the laughs) adds a long enough delay to help.
  • Soft starting the regulator. When I plug in the 24V PSU, I see a 6V spike on the 3.3V line. I was not sure if this was real, so I tried adding a 9ohm resistor to ground - it did not affect the spike. I thought that this spike might be upsetting the micro, so I used the ON/&sharpOFF pin on the LM2674 to enable the regulator after applying the power. This solved the spike problem, the voltage now rises linearly in about 2ms. The microcontroller still does not start.
  • Setting different BOR (brown-out reset) levels. The STM32 has programmable BOR thresholds, which defaults to 1.8-2.1V. I tried setting level 2 (2.4-2.7V) and level 3 (2.7-3.6V), but neither helped to resolve the problem.
  • I also tried using a bench PSU to apply power directly to 3.3V line. The result is the same. However, I noticed that if I wind up the voltage slowly, the micro does start.

I have tried everything I can think of, but I was not able to resolve the problem. I hope that some of you will be able to give me a good advice based on the above clues.

#power-on #startup #stm32
4 REPLIES 4
frankmeyer9
Associate II
Posted on May 30, 2012 at 12:00

Are you sure that the reason is the power supply and its dynamics ?

Caps of 100...1000uF at the Reset pin are not a viable solution...

I would try to inject a stable 3.3V at the output point of your supply, and observe the startup.

If the problem still exists, you might have a problem in the schematics or wiring around the uC.

jarusauskas
Associate II
Posted on May 30, 2012 at 13:18

You are correct. I just went over the schematic and it turns out I had BOOT0 pin floating. Tied it to ground and it works.

Thanks!

frankmeyer9
Associate II
Posted on May 30, 2012 at 14:15

The boot configuration would have been my next guess, after ruling out the power supply...

Posted on May 30, 2012 at 17:09

I should point out that the external oscillators not start when the part comes up, they must be started explicitly by user code that is being run from HSI (8 MHz or 16 MHz depending on the part). The system loader, at least in the F103 uses the HSI+PLL.

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