- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to use the WDT interrupt in wdt counter 0 and WDT reset in wdt counter 1 but after initialize, it will go to infinite loop can't reset.
If I just enable EDT interrupt in wdt counter 0, it will no problem. Below is my config code of the watchdog timer
CySysWdtDisable(CY_SYS_WDT_COUNTER0_MASK);
while (CySysWdtReadEnabledStatus(0));
CySysWdtWriteMode(CY_SYS_WDT_COUNTER0,CY_SYS_WDT_MODE_INT);
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER0,WDT_INTERVAL_1MS); // WDT interval Timer = 1msec in counter 0
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER0, 1u);
CySysWdtWriteCascade(CY_SYS_WDT_CASCADE_NONE);
//Enable WDT counter 0
CySysWdtEnable(CY_SYS_WDT_COUNTER0_MASK);
CySysWdtWriteMode(CY_SYS_WDT_COUNTER1,CY_SYS_WDT_MODE_INT);
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER1,WDT_1S); // WDT Timer = 1sec in counter 1
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER1, 1u);
CySysWdtWriteCascade(CY_SYS_WDT_CASCADE_NONE);
//Enable WDT counter 1
CySysWdtEnable(CY_SYS_WDT_COUNTER1_MASK);
// Lock WDT registers
CySysWdtLock();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Steven.
Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
Because the code have a confidential of our company's patented technology, I can't released the complete project to you.
Can you provide a sample code using the wdt counter0 for the 1ms interval interrupt timer and wdt counter1 for 1sec reset counter.
Thanks.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob,
I think I can enable the WDT reset timer. When the WDT Reset occured, the PC will go to 0x10000046.
Please advise. Thanks.
Steven