Showing results for 
Search instead for 
Did you mean: 

STM32F401 does not seem to boot on custom PCB!

Associate III

Hello everyone, I am new to this community and I am starting to use the STM32F401 from the Nucleo platform. Thank you in advance for your indulgence and your help.  

So I programmed a test code on nucleo which works well. For my final project, I need to integrate only the microprocessor, so I cut the V-Link card of the nucleo and used the DFU Mode to program the chip via USB. Everything works fine, I added a "BOOT" button that allows me to pull pin 60 (BOOT) to 3.3V and I can program the STM via STM32CubeProgrammer.

In a second step, I created a test board following the Nucleo schematic indicated in the manual. I just wanted to reproduce the same assembly as on the Nucleo board but with my PCB.

The PCB was assembled by the PCB manufacturer with a Pick & Place.

When I turn on my custom board, I have all the power supply pins receiving 3.3V, I put all the decoupling capacitor as shown on the diagram, check all the connections to the tester, but despite that, the chip does not seem to start. Impossible to start in DFU mode to load the 1st program.

I attach a schematic of my assembly and a picture of the PCB.

I have spent hours reading and searching the various forums but I have not found why my MCU does not boot!

Any help will be welcome, thanks in advance for your answers.





You have not yet answered the important question:

Have you changed the firmware, so that "HSE" is used with a quartz, not an oscillator.

So you have to set:


RCC_OscInitStruct.HSEState = RCC_HSE_ON; // not RCC_HSE_BYPASS

RCC_OscInitStruct.LSEState = RCC_LSE_ON;

You should always keep the SWD pins, for debugging and flashing with STlink.

Especially on your first board...

Associate III


Thank you for your answer,

As I don't have access to the DFU, it is impossible for me to modify the firmware (on my custom card).

I will resolder some wires to access the SWD pin and try to program via ST-Link.

Where do I put the lines of code you provided?

Test tie also PA9 high. You are right, it should work directly with empty mcu.

I just tested with a 1.5K resistor on D+.

The computer recognizes the USB but gives me an error message: The connected usb device has malfunctioned.....

For information, I had already tested this solution on the Nucleo, I had the same error message, I removed the resistor to enter in DFU mode correctly

Associate III

- What do you mean by "Flash STM32" soldered on the board?

- I tested the power supply with the oscilloscope, everything is perfect, no oscillation or noise

- I don't see the oscillators working but I don't see them working on the Nucleo board either

- I replaced the L1 inductance by a 0Ohm resistor, without success

- I still have to solder the SW wires to test the ST-Link

- The 32 Khz quartz is a quartz recovered from a Nucleo board, so it's perfect for my needs

- The 8 Mhz quartz is a SMD quartz "ABM3B".

I just tested with PA9 High, without success

Where does the 3.3 voltages comes ? If from usb, then test so it is present before usb is plugged to pc. In some cases order of power up - usb plugging has been vital.

Senior III

Also, the MCU may be in a Hard Fault state because the external oscillator does not start at the given time. The only way is to connect the STLink from the Nucleo board and see what happens.

The usb provides the 5V and then a voltage regulator is in charge of lowering the voltage to 3.3V. I join you the shema of the power supply.

Yes I will add wires to access the SWD. I finish a spot for work and I put glue...

Thanks for the info!