Showing results for 
Search instead for 
Did you mean: 

STM32L412 issues...


I have built many STM32 boards and usually bringing them up is a snap.

This time I'm having trouble.... The chip is the 48-pin STM32L412CB.

When I boot in DFU mode (it does so by default) I get

dfu-util: Error during special command "ERASE_PAGE" get_status

When I hook up the STLINK-V2 debugger, I seem to get ONE chance where the chip claims to get programmed ok. After that I always get:

ERROR flash_loader.c: flash loader run error

but in both cases... nothing gets programmed.

In the debugger I can dump memory at 0x20000000: RAM and I see some sort of vector table. Probably that "flash loader" program that st-util uploads. When I dump the memory at 0x08000000 (Main flasn), then I see just empty flash. What could be wrong to cause this behavior ?

One of the things that I see happening is that it always boots to the bootloader. But this can be explained by the first word in main flash still being 0xffffffff. ...

Any suggestions on what to try or what might cause this?


I've built a prototype series of the boards, and brought up a couple over the course of the last few months. Anyway, this week I brought up another one and it had the problems worse than before. I then added two 4.7uF decoupling capacitors (on top of the 100nF already there: no spare foortprints) and this reduced the problems a lot.

Also I remember "stricter power supply requirements" for bigger flash-at-once (byte/short/word/longword) from when I was working with the STM32F072. I've now implemented the write-to-flash on the L412 and: It can't write anything else than 64bit longwords.

So it might be decoupling problems after all....

There was a via in the ground plane missing (does not complete connectivity, but shortens a decoupling-cap-to-pin substantially. I've added that and will add places for the extra 4.7uF capactors too for the future. Thanks for helping.

Chief II

I can add that I've implemented L431CB, L432KB, L433CC on different boards by following AN4555 and there haven't been any problems. If it really is power supply related (not software...), you should look carefully at power supply stability and PCB layout.