It is an old post but I'll give an answer to help out people working on stop modes:
PPDC is a write once bit, so must be set in the __initialize_hardware procedure.
Care must be paid if you're working with the debugger attached or detached. If it is attached XCSR[ENBDM] is set to 1, hence if calling STOP3 and STOP2 will go into STOP4 mode instead. I currently have problems with the debugger detached (Flexis DEMOJM, P&E Multilink cyclonepro via USB) because when calling a stop3 or stop4 I get a Reset.
Bye