This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[Cortex M0+] Use the same ISR for multiple interrupt sources

Hi, I want to ask if its possible to use the same ISR for various interrupts sources, as I want to implement a "OS like" function that handles all the interrupts and jumps into the corresponding user ISR performing different privilege/stack adjustments.

 

I dont know if this is possible and if there is a way to know the specific interrupt source that caused the interrupt inside the same function.

 

Thanks!! All comments would be appreciated

Parents
  • Yes - if you look at many implementations, you will see that they use the same default handler for all interrupts.

    if there is a way to know the specific interrupt source that caused the interrupt inside the same function

    Probably the easiest way is to have a separate ISR for each interrupt, and that ISR passes source info, etc, to your "common" handler.

Reply
  • Yes - if you look at many implementations, you will see that they use the same default handler for all interrupts.

    if there is a way to know the specific interrupt source that caused the interrupt inside the same function

    Probably the easiest way is to have a separate ISR for each interrupt, and that ISR passes source info, etc, to your "common" handler.

Children
No data