2 Replies Latest reply on Nov 19, 2017 8:55 AM by dche

    Simplest Way to Add 10 Hz ISR to PSOC4000S?

    ted_1467596

      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?