Hello,
The RAM content is preserved on non destructive resets in case the MBIST is not executed.
For storing your flag is better to use core registers, which keep their value on reset.


See Table 7-1. Reset settings for e200z4 resources of reference manual.
Best regards,
Peter