Was last restart after power fail, flash or reset button? (Photon, Core)

Is there a way to determine (w/o additional hardware, a flag, value or something else) whether the controller was restarted last time after a power fail, a flash or a reset? (Photon, Core)

Have you seen the docs here?
https://docs.particle.io/reference/device-os/firmware/photon/#reset-reason