Power up hang with watch dog time0 enable

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ToWa_1311181
Level 1
Level 1
First like received

Hi,

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!

+++++++++++++++++++++++++++++++++++++++++++++++++++

    WdtIsr_StartEx(WdtIsrHandler);
   
    CyGlobalIntEnable;
   
  /* Set WDT counter 0 to generate interrupt on match */
CySysWdtWriteMode(CY_SYS_WDT_COUNTER0, CY_SYS_WDT_MODE_INT);
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER0, WDT_COUNT0_MATCH);
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER0, 1u);
/* Enable WDT counters 0 */
       PWLED_Write(LOW);      
    CySysWdtEnable(CY_SYS_WDT_COUNTER0_MASK);  // turn on hardware    <== hang at this line
        PWLED_Write(HIGH);     

+++++++++++++++++++++++++++++++++++++++++++++++++++++

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.

Regards,

Tony

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi ToWa_1311181

Can you please attach the project that you are using so that we can debug the issue at our end?

Thanks and regards

Harigovind

View solution in original post

0 Likes
1 Reply
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi ToWa_1311181

Can you please attach the project that you are using so that we can debug the issue at our end?

Thanks and regards

Harigovind

0 Likes