Since I think CySysResetReason() function does not exist, I'm testing the use of RESET_SR0 register to detect the source of the reset.
At the very beginning of the main code I put the test:
uint8 ResetReason; /* Reason of Reset */
ResetReason = CY_GET_REG8(CYDEV_RESET_SR0);
if ((ResetReason & 0x08) == 0x08)
// THE RESET source was WATCHDOG!
...and so on
BUT seems the code does not recognize that the source of the reset was a WDT (I'M SURE was a WDT!)
What do you think?
Something wrong? Any suggestions?
Thanks to all!
Can you please attach the project. We can have a look at the project.