|
|||||||||||
|
Technical Support On-Line Manuals RL-ARM User's Guide |
RL-ARM User's GuideSVC FunctionsSoftware Interrupt (SVC) functions are functions that run in Privileged Handler Mode of Cortex™-M core. SVC functions can accept arguments and can return values. They are used in the same way as other functions. The difference is hidden to the user and is handled by the RealView C-compiler. It generates different code instructions to call SVC functions. SVC functions are called by executing the SVC instruction. When executing the SVC instruction, the controller changes the running mode to a Privileged Handler Mode. Interrupts are not disabled in this mode. In order to protect SVC function from interrupts, you need to include the disable/enable intrinsic functions __disable_irq() and __enable_irq() in your code. You may use SVC functions to access protected peripherals, for example to configure NVIC and interrupts. This is required if you run tasks in unprivileged (protected) mode and you need to change interrupts from the task. If you want to use SVC functions in your RTX kernel project, you need to:
| ||||||||||
|
|||||||||||