2021-09-27 03:18 AM
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.
2021-09-27 04:03 AM
> 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
2021-09-27 04:30 AM
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
2021-09-27 05:58 AM
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.