Electronics > Microcontrollers

STM32 power-on problems


I have designed a PCB that has an STM32F205VC 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/#OFF 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.

I don't know much about the STM32s so I can only speak in general about what my be the problem...

It sounds like your oscillator is either failing to start or is locking up.  You might switch to the internal RC oscillator just to see if you have start-up issues with it.  If not then that will narrow it down.

An oscillator will fail to start if there is too little or too much capacitance on the oscillator pins.  I assume you have something like figure 31 from the datasheet (page 84.)  You might play around with the values of CL1 and CL2 to see if it helps.

Also, supposedly, an oscillator can lock-up if there is too much noise in the environment.  The recommendation in that case is to use mismatched values for CL1 and CL2, with the capacitor at the input pin being slightly larger.  (I'm guessing that would be CL1.)

OK, I feel really stupid now. Someone on ST forums suggested it might be a wiring problem. To prove them wrong, I looked at the schematic and remembered that I've done something silly with the BOOT0 pin and as a result, it was left floating. Just tied it to ground and the micro started working fine.

I still have a lot to learn :D


[0] Message Index

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod