We use CY8C4048LQI-BL583 to build our unit. When the system bootup, I run the following code. If I do hardware reset( by using the XRES signal, the pin4 of this chip), PWLED_Write(HIGH) will be executed properly. But if I do a power up, it will not return from CySysWdtEnable(CY_SYS_WDT_COUNTER0_MASK) and PWLED_Write(HIGH) below can not be reached. Please advise!
/* Set WDT counter 0 to generate interrupt on match */
/* Enable WDT counters 0 */
CySysWdtEnable(CY_SYS_WDT_COUNTER0_MASK); // turn on hardware <== hang at this line
1. The issue is occasionally happened when turning the system power on. The other times the power on are working fine.
2. The issue is never happened when reset during the power persisting on.
3. The issue is never happened during the debugging, that's the reason we could not capture the cause about the issue.
We narrow down the line to hang, marked as "<== hang at this line". Please give us the hints to resolve such issue.