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

cross mob

Configuration of Watchdog Timer Interrupt in PSoC 4 Devices - KBA222373

Configuration of Watchdog Timer Interrupt in PSoC 4 Devices - KBA222373

Community-Team
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

Version: **

Note: This article applies to the following product families:

PSoC 4100

PSoC 4200

PSoC 4100 BLE

PSoC 4200 BLE

PRoC BLE

PSoC 4200L

PSoC 4100M

PSoC 4200M

PSoC 4000S


Question:

How do I resolve the following PSoC® Creator™ clock error when the Global Signal Reference Component is configured as a Watchdog Timer Interrupt (WDTInt)?

Figure 1. WDT Interrupt Clock Error

pastedImage_0.png

Answer:

There are two options to configure the WDT interrupt handler in these product families: auto-generated and user-provided selected per Design Wide Resource settings. This error occurs when you configure the Watchdog Timer Interrupt to ‘isr_1’ interrupt handler in the top schematic using the Global Signal Reference Component. On the other hand, Design Wide Resource settings select ‘Timer (WDT) ISR’ as auto-generated.

Figure 2: Configuration of Global Signal Reference Component for WDTInt

pastedImage_18.png

If you select the auto-generated option, the CySysWdtIsr() function is registered as the WDT interrupt handler. You can use the CySysWdtGetInterruptCallback() and CySysWdtSetInterruptCallback() functions to get and set callbacks for each particular counter and use the CySysWdtEnableCounterIsr() and CySysWdtDisableCounterIsr() functions to enable and disable servicing of the registered callbacks for each particular counter.

Thus, you need to either remove the Global Signal Reference Component or change the interrupt generation option to user-provided. The latter can be done at the Clocks tab of the Design Wide Resources (cydwr) window. Click on the Edit Clock button; in the Configure System Clocks window, click on the Low Frequency Clocks tab as shown in Figure 3.

Figure 3: Configuration of User-Provided Timer (WDT) ISR

pastedImage_31.png

Once the user provided option is selected, the CySysWdtIsr() function is not registered as the WDT interrupt handler. You can register either a custom handler or the CyWdtIsr() function by using the CyIntSetVector() API. For more information on low-frequency clock and WDT configuration, refer to the LFCLK Component datasheet from the System Reference Guide (accessed from the Help menu of PSoC Creator).

0 Likes
1532 Views
Contributors