How to solve STM32H7 blocking due to
incorrect configuration
Problem Overview
The issue here is that the MCU comes with an internal converter and LDO.
The hardware design is not the same when it works with SMPS or with LDO.
On our boards it is selected by resistors R44, R45 and R46.
By default we have LDO trim enabled, which means that R44 and R46 are
not mounted, and the R45 is 0R. The processor blocks itself, if it initializes
with a configuration different from the hardware.
It prevents the processor from self-destruction. Then the SWD is also
blocked.
SOLUTION
There are 3 ways to reset this mode, choose one of them:
A.
Hold the processor reset and try to connect before the flash program
reaches the PWR configuration. It takes only several dozen of ms, so
you might need couple repeats to nail it.
Then connect the SWD, clear the flash.
or
B.
Remove the R45 0R resistor, solder R44 and R46 with 0R. Then
connect the SWD, clear the flash, and switch back the resistors.
or
C.
Enter the internal bootloader mode by performing following steps:
1.
Turn off the power
2.
Connect the soldering pads R65 and C134
(see the image below)
3.
Turn the power back on
4.
Connect the SWD and clear the flash
5.
Turn off the power
6.
Disconnect R65 and C134