To check if a reset is caused by POR or hard reset, please use Core Reset Status Register (DCFG_CCSR_CRSTSR)
A power-on reset of the device causes the following to occur:
• RST_PORST is set
• All other bits are cleared
A hard reset of the device causes the following to occur:
• RST_PORST remains unchanged (PORST resources are not affected by Hard Reset)
• RST_HRST is set
• All other bits are cleared
See Section 7.3.23 in T1040RM.pdf for this.