cancel
Showing results for 
Search instead for 
Did you mean: 

new STM32L431 chip first time running failed

dmaST
Associate II

Hello,

 

When programming an ELF file into a new STM32L431 chip(blank FLASH) for the very first time, the program does not start running automatically. It only runs correctly after a full power-off reset.

However, after this initial procedure, new ELF files can be programmed and executed directly without requiring a power-off reset.

What could be causing this issue? I recall that the STM32G0 series had a similar problem.

**Additional details:**
- BOOT0 is connected to ground via a 1M ohm resistor.
- The STLINK V3 MiniE Vtarget is connected to the board’s 3.3V supply.
- OB setting is not touched.

 

Thanks!

4 REPLIES 4
Uwe Bonnes
Principal III

Probably the "Flash empty" bit is only reset on power on reset.

Thanks.

then, it's normal?

1 MOhm for boot pull down is also very high. Try with <= 10 k.

Thanks.

Yes, but if this is the problem, the 2nd, 3rd... flashing and running will also may not work but they are all OK except the first time.

The BOOT0 (PH3) pin value is latched on the 4th edge of the internal startup clock source after the reset is released.  

**During the reset phase, the internal pull-up or pull-down for PH3 is not enabled**. It is configured as an input. After the reset, PH3 switches to analog mode.  
And when bootloader is excuting, this BOOT0 is analog mode and won't be used for any function.

For a CMOS input, 1Mohm maybe enough to pull down?!

anyway, I will take a try with additional -ob option.

STM32_Programmer_CLI.exe -c port=SWD mode=UR -e all -d Test-L431CC.elf -v -rst -ob PEMPTY=0