cancel
Showing results for 
Search instead for 
Did you mean: 

Programming STM32 MCU for the first time fails.

Vbala.1
Associate

I am using STM32L451RCT6 MCU . When I take a fresh MCU , unprogrammed and flash it for the first time , the flashing fails and when we flash it in the subsequent boots, the flashing succeeds.

Can you please let us know , if we need to add any additional logics in our driver to program a fresh unprogrammed MCU.

3 REPLIES 3

> flash it for the first time

How, using what tools?

> the flashing fails

How do you know?

Try to power off/on the mcu after flashing.

JW

Vbala.1
Associate

hi ,

>How, using what tools?

We flash it from our custom driver in linux through i2c.

>How do you know?

We try to boot after the flash , with the udpated firmware , and communnicate it with the i2c.But the booting fails.

>Try to power off/on the mcu after flashing.

We will try this and will let you know

TDK
Guru

Look at the memory with STM32CubeProgrammer or the built-in bootloader after the first "unsuccessful" flash. Likely it worked and it's just stuck in bootloader mode because the flash was empty on power-up. A power cycle will fix this.

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