2 Replies Latest reply on Sep 17, 2016 10:05 AM by user_418894472

    ISR not executing.

    user_418894472

      I have an ISR component ISR_1 connected to the OV pin of a PWM block.

         

      In the main file I have the following code:

         

      CY_ISR_PROTO(MyISR);
      CY_ISR(MyISR)
      {
          PWM_1_Stop();
      }

         

      int main()
      {

         

       

         

          PWM_1_Start();
          ISR_1_StartEx(MyISR);
          CyGlobalIntEnable;
      }

         

       

         

      PWM should stop as soon as the interrupt is executed. But it does not.

         

      Please help

        • 1. Re: ISR not executing.
          user_1377889

          You are probably missing the infinite loop that keeps the cpu running. When main() ends, quo vadis ???

             

          Next time can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
          Creator->File->Create Workspace Bundle (minimal)
          and attach the resulting file.

             

           

             

          Bob

          • 2. Re: ISR not executing.
            user_418894472

            Thanks for the reply.

               

            Of course I missed the infinite loop, but that wasn't the reason behind not executing the ISR.

               

            Actually the ISR is executing, however the PWM_Stop() command was not working. It is ok now.

               

            My bad, sorry!