Is it a Power on Reset

or

Is it a Brown Out Reset ...

Just test the PCON bits ... to know it. and do what's to do.

Alain