STM32 power-on problems - Page 1
Forum section: electronics / general

author: armandas
author_rank: Frequent Contributor
timestamp: May 30, 2012, 08:34:54 am
content: I have designed a PCB that has anSTM32F205VCmicrocontroller. 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.

author: TerminalJack505
author_rank: Super Contributor
timestamp: May 30, 2012, 09:33:26 am
content: 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 CL1and CL2to 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 CL1and CL2, with the capacitor at the input pin being slightly larger. (I'm guessing that would be CL1.)

author: armandas
author_rank: Frequent Contributor
timestamp: May 30, 2012, 11:26:50 am
content: 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