What is the use or application of SV Call and NMI Exception in ARM Cortex M0 .
Is it someway related to RTOS?, if so , how?
An example of a use for NMI is for a watchdog timer to make sure he system is handling interrupts in a timely manner. The timer sets NMI which sets a flag and a pending interrupt to be taken when there's no interrupts being handled and it is going back to application level.. The pending interrupt then unsets the flag. If the NMI watchdog interrupt finds the flag still set it knows interrupts aren't being completed in a timely manner and no application level work is being done. Life being what it is that becomes a bit more complicated if the processor goes to sleep when there's nothing to do but you get the idea.
Thanks for your answer , but I need some clarity on the following lines you have written, "The timer sets NMI which sets a flag and a pending interrupt to be taken when there's no interrupts being handled " . Does this mean that, we sets an interrupt ourself that has to be executed when the other interrupts are not executed in a timely manner or in case if there is no interrupts at all?
Yes, PendSV which is normally used for switching tasks can be used for this as well.
Thank You for your answer. Does it mean that when the flag is found uncleared NMI will understand that no interrupt has occurred and it will take some actions as defined by the user. Am I correct ?
Well that's the general idea of a watchdog timer. If the system isn't handling interrupts properly in a timely fashion then perhaps the best thing to do is just reset and then tell whatever or whoever should be talking to it that it had a problem. There's lots of things like that one might want to check - an error whilst recovering from an error, too many errors in a short time, otherwise unhandled errors, any sort of software check showing the work isn't completing, anything like that. Sometimes it is better to go to a degraded service mode but I'm of the all or nothing camp normally.