Hey.
I read ARMv7-M Arch manual.
SHCSR register have SVCALLPENDED bit.
So that, It seem SVC is pendable.
But, 'Priority escalation' is written,
When the group priority of a pending synchronous fault or supervisor call is lower than or equal to thecurrently executing priority, inhibiting normal preemption. This applies to all synchronous exceptions, bothfaults and SVCalls.
This seem SVC is not pendable.
Is SVC pendable? If true, how behaver?
SVC can become pended in the case SVC instruction is executed, and during exception entry to SVC handler, another interrupt at higher priority arrived and therefore the late arrival interrupt is serviced first. During servicing of the higher priority interrupt, the SVC is pended.
regards,
Joseph
Thank you.More question.1. Stacked return-address(PC) is expressed next-instruction of SVC?2. To handle SVC, When higher priority handler is returned, is checked SVCALLPENDED?
1. Yes. Just like normal tail-chained interrupt, the stack frame for the higher priority IRQ is the same one as the SVC exception, so the return address is the same.
2. When the processor exit from the higher priority interrupt, the pending status of all pended exceptions are checked (by processor's hardware) and tail chain into an exception if there is an exception (with sufficient priority level) to be serviced.
That is,
'SVC pending' is assigned by SVCALLPENDED? (or other mechanism?)
If yes,
When clear SVCALLPENDED in higher priority handler, SVC handler not call?
Sorry for the delay (I was in Embedded World last week).
Yes, it is possible to cancel a pending SVC. The most likely usage for this is in a debug session, you can manually change the PC after single stepping over a SVC instruction and the debugger can cancel the pending SVC in this case.
Thank you!!
I understand all.