You can get the reason for reset from the CySysPmGetResetReason() API. This will return CY_PM_RESET_REASON_WAKEUP_HIB when the device comes out of hibernate. Brown out can be detected by reading the PWR_BOD_KEY register and checking if the value is retained using
uint32 key = CY_GET_REG32(CYREG_PWR_BOD_KEY);
return (key == 0x3A71);
I have attached a sample project that will show brown-out reset by blinking LEDs. Please have a look and let me know if you require further clarifications.
Thanks and regards
BLE_BOD.cyprj.Archive01.zip 1.5 MB
Thank you. This is what I found to work before your response. We ended up checking CySysPmGetResetReason() for whether the wake up cause was hibernate and ignored the brownout check in that instance.
Thank you for the example.