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

Difference between SWI and SVC

Hi Experts,

In RTX RTOS I could find some functions based on SVC and SWI handlers. What do they actually mean for ?

Where it is actually used ?

Parents
  • As you're actually calling an interrupt, the standard interrupt latency applies here.

    Eg. at least 12 clock cycles (16 or 15 on Cortex-M0/Cortex-M0+).

    That means when you issue SVC #imm, the SVC_Handler is executed "immediately" (well, a higher priority interrupt could in fact precede the SVC_Handler interrupt service routine, increasing the latency to 'anything').

    I'd like to point you to A Beginner’s Guide on Interrupt Latency, in case you haven't seen it; it is an excellent document that covers all this; it also gives you insight in some of the internal workings of the processor, which is very good to have in mind while writing time critical code.

    PS: Please mark daith's answer correct.

Reply
  • As you're actually calling an interrupt, the standard interrupt latency applies here.

    Eg. at least 12 clock cycles (16 or 15 on Cortex-M0/Cortex-M0+).

    That means when you issue SVC #imm, the SVC_Handler is executed "immediately" (well, a higher priority interrupt could in fact precede the SVC_Handler interrupt service routine, increasing the latency to 'anything').

    I'd like to point you to A Beginner’s Guide on Interrupt Latency, in case you haven't seen it; it is an excellent document that covers all this; it also gives you insight in some of the internal workings of the processor, which is very good to have in mind while writing time critical code.

    PS: Please mark daith's answer correct.

Children
No data