- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a project using a CY8C4024AZI-S403 device. I have running code but wanted to create a simple timer ISR that can perform things like scan for key presses etc.
I've used a GlobalSignal before on a PSoC4 BLE so I added one called GlobalSignal_2 with an attached isr_1. In the configuration window, GlobalSignal_2 uses Watch Dog Timer Interrupt (WDTInt).
I then went into the LFClk setting and enabled the Timer (WDT) as a free running timer (see attachment), added code to main to start the isr - isr_1_start(); -and added code to the isr_1.c file as follows:
CY_ISR(isr_1_Interrupt)
{
#ifdef isr_1_INTERRUPT_INTERRUPT_CALLBACK
isr_1_Interrupt_InterruptCallback();
#endif /* isr_1_INTERRUPT_INTERRUPT_CALLBACK */
/* Place your Interrupt code here. */
/* `#START isr_1_Interrupt` */
CySysWdtClearInterrupt();
tedsCount++;
/* `#END` */
}
It compiles and runs but doesn't seem to ever call the ISR as tedscount never increments. If I change the Timer (WDT) to mode Watchdog (w/interrupt) my code seem to get stuck in a doom loop - not sure what's happening
Any ideas what's wrong?
Solved! Go to Solution.
- Tags:
- cy8c4025azi-s403
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer to the code example CE210292 for example of how to use WDT in PSoC 4000S for interrupt generation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the WDT clock is enabled by default or you must start it on your main function? did you enabled it?
EDIT:
Just found this blog post about psoc4 and WDT, it might help you. PSoC4 Watch Dog Timer - IoT Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer to the code example CE210292 for example of how to use WDT in PSoC 4000S for interrupt generation.