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

CortexM0 Multiple SvcHandlers

Hi
Is there some example how i can create multiple sodtware interrupts through the SVC_Handler ?

For now i am only able to call one software interrupt.

The code (swi.s) i used for the lpc21xx does not work on the lpc1111

Is there some code example ?
i want to use the svchandlers to execute code that must not be interrupted by other interrupts.

Johan

Parents
  • But why not?

    Of course, you may have a (very) good reason - in which case, you should be able to explain it.

    Without knowing why you're doing something, it is impossible for people to know whether or not suggestions are appropriate to your situation.

    And it might be that you really don't need to do it this way - and there are (much) better ways to do it...

    Remember: nobody knows anything about you or your project other than what you explicitly state in your posts!

    Also, please note the instructions on how to post source code:

    www.danlhenry.com/.../keil_code.png

Reply
  • But why not?

    Of course, you may have a (very) good reason - in which case, you should be able to explain it.

    Without knowing why you're doing something, it is impossible for people to know whether or not suggestions are appropriate to your situation.

    And it might be that you really don't need to do it this way - and there are (much) better ways to do it...

    Remember: nobody knows anything about you or your project other than what you explicitly state in your posts!

    Also, please note the instructions on how to post source code:

    www.danlhenry.com/.../keil_code.png

Children
  • It is quite easy to believe that if you turn off interrupts, your processor will not detect interrupts. It still does.

    Next thing that is easy to believe is that if you turn off interrupts, you get more latencies and jitter. But when you play with your SWI(0) handler, you set the processor in a mode that has higher priority than your normal interrupts. So they will be just as disabled as if you had turned off interrupts the direct way.

    So in the end, you have two similar ways to block interrupts while you perform your critical section.

    So make sure you know the reasons for doing it one thing instead of some other way.

  • Are there no unwanted side effects when disabling interrupts from within an isr ?

    I am not 100% sure, but in my '8051' period, turning off irqs could lead to missed irq's.

    Johan