1 Reply Latest reply on Sep 12, 2018 3:18 AM by JoMe_264151

    PSoC 5LP Priority handling interrupt

      Hey there,


      I am working with PSoC 5LP and interrupts. For my own application I would like to do the following case:


      INT A has lower priority than INT B

      1. INT B is asserted when interrupt A is being executed.
      2. INT A is stopped at the point of execution.
      3. The details of INT A are pushed to the stack, and INT B begins to execute.
      4. After execution of INT B I want to break INT A and return to main()


      So, my question is:

      Can I break an interrupt clearing some register and return to main() instead of return to execute the pending interrupt?  


      I have used clear_pending function but the result is the same. My program always return to the lower priority interrupt once the upper interrupt has finished.


      I hope that some one can help me with the problem.


      Thanks and regards !!!

        • 1. Re: PSoC 5LP Priority handling interrupt

          This might not be possible. Depending on the point where the second interrupt occurs different information are pushed onto the stack to save time and ram when possible.

          You have two choices:

          Using Enter- and ExitCriticalSection to delay in Int_A for a short time occurence of Int_B


          Setting flags in Int_B that are tested in Int_A and when set return from <Int>_A