Resetting an STM32H755 with secure area
I am building a secure bootloader on the STM32H755, but I've bricked a couple of boards now trying to get the secure areas working.
I intended to use a "recovery" function on a button press to do a mass erase with protection removal. Then I can test enabling the secure areas via resetAndInitializeSecureAreas, and get back to square 1 nice and easy.
Except, it didn't work - I mass erased by device but the debugger doesn't work... So I assume the secure area is still present.
Before I brick yet another board, I'd like to check my assumptions.
If I follow the steps in "Flash mass erase with automatic protection-removal sequence", on the STM32H755, will that get me back to a "blank" device, with no secure regions?
Additionally, can I place the code that does that in RAM - IE in a non secure region? I ask because it feels wrong to erase flash while running from flash.
