cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 sometimes not booting correctly

RAugu.1
Associate

Hello,

I have a PCB that I have installed an STM32f407 or STM32f427.

The PCB has CAN peripherals, serial peripherals, a status LED, a reset button and other peripherals.

I have seen that on startup sometimes the STM32F4 doesn't startup correctly. When this happens the status LED flashes as it is supposed to, but I get no communication via the CAN and serial port. If I press the reset button, the status LED stops flashing and the STM32F4 is unresponsive. Repeated presses of the reset button do nothing discernible.

If I fully power cycle the PCB, then the STM32F4 will usually boot up correctly. The status LED blinks, and there is communication with the CAN and serial port.

This problem occurs with both an STM32F407 and STM32F427 installed. It sometimes happens more frequently than other times and Im not sure what environmental factors that it could correlate with. My first thought is that I am not powering up the microcontroller correctly.

7 REPLIES 7

BOOT0 pin floating?

Problematic power supply, BOR not set in mcu?

Incorrect/faulty VCAP capacitors? Bad solder joints on those pins?

Bad solder joints on GND/VDD (including VDDA) pins? Or VDDA not connected at all?

JW

BOOT0 is pulled to GND with a 5K resistor.

I think the power supply is good (lm1117-3.3) . I have not set anything with the BOR registers. Also I am using MBED.

The VCAPs are 2.2uF. I think the solder joints are good.

VDDA is connected to 3.3V and I have checked all the pins and tried resoldering them. This is happening on 2 different boards.

The NRST pin has a 10nF cap to GND.

Sounds like a software bug then. Debug as usually with software bugs: instrument your code, trace the execution path. Formulate hypotheses about the problem, and experimentally prove or disprove them. Etc.

JW

TDK
Guru

> When this happens the status LED flashes as it is supposed to, but I get no communication via the CAN and serial port. If I press the reset button, the status LED stops flashing and the STM32F4 is unresponsive. Repeated presses of the reset button do nothing discernible.

Sounds like it's booting up okay the first time. Probably not a wiring or hardware issue.

You can attach a debugger and find out where the code is stuck. Going to be quicker than guessing what might be wrong.

If you feel a post has answered your question, please click "Accept as Solution".

Instrument Error_Handler() and HardFault_Handler() so you can determine if it reaches those. Check any other loops it can get stuck in.

Output checkpoint data so you can follow and see how far into the code you get.​

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

I have a similar problem with a STM32F446xxx did you solve it?

Use basic debugging methods described.

Almost certainly have a different board design than OP. Describe YOURS

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