Hi Simon,
In your setup, you probably see this behavior because you don't power cycle the MCU.
The driver clears the FRET register after POR or a desctructive reset only.

My test project is attached.
Once the project is loaded, power-cycle the MCU and attach the debugger back without reset.
It will be stuck in the while(stop){} loop.
The stop variable can be cleared via the debugger once attached.
You should see that the Power_Ip_Init() clears the FRET register if DES != 0.
Regards,
Daniel