STM32H56xx cannot recover from PRODUCT_STATE "PROVISIONING"
I have switched an STM32H562 to PROVISIONING product state (from my bootloader code).
The plan was to program DA data (certificate), then set TZEN_ENABLE, and finally set product state to CLOSED.
When I do this all in one go, with the STM32CubeProgrammer tool, without power cycling the STM32H5 in between, I can set the product state to CLOSED, and after that perform a REGRESSION using the DA certificate and private key. So I know my procedure and DA data must be correct.
However, I am now trying to do this step by step, from within my bootloader code.
After the first step, just setting product state to PROVISIONING, when the MCU power cycles, I cannot recover.
I cannot write DA data from STM32CubeProgrammer, because I get this error:
16:26:35 : Error: Unable to reset MCU !
16:26:35 : Error: OBKey Provisioning failed
I cannot directly write the product state to OPEN (which makes sense)
Also, writing it to REGRESSION is not possible in STM32CubeProgrammer.
I think REGRESSION is only possible using DA recovery, but that does not work because the product state is not ‘CLOSED’, but ‘PROVISIONING’ instead. So in the ‘Secure programming’ screen the DA tab is greyed out.
Mass erase is still possible, but that does not modify the product state of course.
Is this expected behaviour?
Is there any way around this issue?
I have several boards in this state now.

