- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do you have an example code of watchdog reset for PSOC4100 ?
Best regards
LB
Solved! Go to Solution.
- Labels:
-
PSoC 4 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LuBe_4654241 , the attached project is tested to work with PSoC 4100 PS device. Please test this at your end and let us know your observations.
In PSoC 4100 S device, WDT reset feature can't be enabled in the Clock configuration but can be enabled using the WDT APIs and the global signal reference component. I have attached a project for that as well that works at my end. Please test and let us know your observations.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wonder if the following discussion can be a hint?
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
1) I have enabled wdt timer reset as you can see in the file Wdt clk.jpg
2) Inserted the global signal for interrupt configured as watch dog timer interrupt, see attached file.
3) Main:
CyGlobalIntEnable;
while (1)
{
if ( Cnt == 1000 )
{
CyDelay(10);
}
else
CyDelay(1);
}
{
/* Clear WDT only after device reset caused by WDT */
if(RESET_FLAG_ACTIVE == resetFlag)
{
CySysWdtMaskInterrupt();
interruptFlag = SET;
}
}
The reset and interrupt no work, why ?
Best regards
LB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LuBe_4654241 ,
1. If you want to use a custom code for WDT ISR, such as by using a global signal reference component, the Timer WDT (ISR) setting should be User provided and not auto generated. If the setting is auto generated, then the CySysWdtIsr() function is registered as the WDT interrupt handler. This overrides your WdtIsr() function.
Can make it user provided and try again?
2. From image Wdt clk.JPG, it doesn't look like you are using PSoC 4100 family. PSoC 4100 family doesn't support WCO. Can you please reconfirm if you are using PSoC 4100 S or PSoC 4100 family.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using PSOC 4100PS.
Can you show me the example code for watchdog reset ?
Best regards
LB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can someone answer to my question ?
Best regards
LB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LuBe_4654241 , the attached project is tested to work with PSoC 4100 PS device. Please test this at your end and let us know your observations.
In PSoC 4100 S device, WDT reset feature can't be enabled in the Clock configuration but can be enabled using the WDT APIs and the global signal reference component. I have attached a project for that as well that works at my end. Please test and let us know your observations.
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can someone answer to my question ?
Best regards
LB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @LuBe_4654241 , Can you please let us know the actual time it takes in your firmware for the WDT to reset the device. You can toggle a pin in the beginning of the main() to get the exact reset to reset timing. From your code, you have set the WDT interval to 500 ms, therefore if the WDT is not serviced for 500 x 3 = 1.5 seconds, it will reset the device. Note that the watchdog will trigger a reset only for the 3rd un serviced interrupt.
Bragadeesh