- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Not able to enable watchdog in cy8c4025azi-s413.
same code is working in cy8c4245axi-483.
CODE in cy8c4245axi-483 :
//watch dog initialization(2 second)
/* Set the second WDT counter to generate reset on match */
CySysWdtWriteMode(CY_SYS_WDT_COUNTER1, CY_SYS_WDT_MODE_RESET);
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER1, 0xFA00);
/* Counter 1 is cleared when there is match */
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER1, 1u);
/* Counter 1 is enabled */
CySysWdtEnable(CY_SYS_WDT_COUNTER1_MASK);
for(;;){
CySysWatchdogFeed(CY_SYS_WDT_COUNTER1);
}
same code is not working in cy8c4025azi-s413.
what to do ?
Thank you
Solved! Go to Solution.
- Labels:
-
PSoC 4 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @SMD_4782786 ,
You are observing the errors in case of cy8c4025axi-s413 because it does not have the same set of functions for WDT as cy8c4245axi-483. The error "undefined reference to CySysWatchdogfeed" is because this function does not exist for the cy8c4025axi-s413 (psoc 4000s family).
You can refer code example on watchdog timer for 4000S device at this link to get an idea of how the Watchdog timer is setup for the 4000s device : https://www.cypress.com/documentation/code-examples/ce210292-psoc-4s-watchdog-timer
The following Appnote will help you understand the differences in the WDT of both the 4200 and 4000S device:
https://www.cypress.com/file/369061/download
You can also refer to the to the Watchdog Timer section of the Architecture TRM of both the 4200 and 4000S devices.
The CyLFClk.c file in your project will contain the WDT APIs that are supported by each of the devices. Refer to the non-greyed out APIs in both case.
I hope this helps you understand why you are observing these errors when using the same set of APIs.
Thanks and Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @SMD_4782786 ,
You are observing the errors in case of cy8c4025axi-s413 because it does not have the same set of functions for WDT as cy8c4245axi-483. The error "undefined reference to CySysWatchdogfeed" is because this function does not exist for the cy8c4025axi-s413 (psoc 4000s family).
You can refer code example on watchdog timer for 4000S device at this link to get an idea of how the Watchdog timer is setup for the 4000s device : https://www.cypress.com/documentation/code-examples/ce210292-psoc-4s-watchdog-timer
The following Appnote will help you understand the differences in the WDT of both the 4200 and 4000S device:
https://www.cypress.com/file/369061/download
You can also refer to the to the Watchdog Timer section of the Architecture TRM of both the 4200 and 4000S devices.
The CyLFClk.c file in your project will contain the WDT APIs that are supported by each of the devices. Refer to the non-greyed out APIs in both case.
I hope this helps you understand why you are observing these errors when using the same set of APIs.
Thanks and Regards
Ekta