PSoC 5LP Priority handling interrupt

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

cross mob
Anonymous
Not applicable

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 !!!

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

Bob

0 Likes