图 7.14  SVC作为操作系统函数门户示意图  SVC异常通过执行”SVC”指令来产生。该指令需要一个立即数,充当系统调用代号。SVC 异常服务例程稍后会提取出此代号,从而解释本次调用的具体要求,再调用相应的服务函数。 例如,  SVC    0x3  ;  调用 3 号系统服务  在 SVC 服务例程执行后,上次执行的 SVC 指令地址可以根据自动入栈的返回地址计算 出。找到了 SVC 指令后,就可以读取该 SVC 指令的机器码,从机器码中萃取出立即数,就 获知了请求执行的功能代号。如果用户程序使用的是 PSP,服务例程还需要先执行MRS  Rn,  PSP 指令来获取应用程序的堆栈指针。通过分析 LR 的值,可以获知在 SVC 指令执行时,正 在使用哪个堆栈(细节在第 8 章中讨论)。  SVC vs. SWI 如果你曾使用过其它的 ARM 处理器(如 ARM7),你也许会知道那里有一个被称为 “软件中断”的指令(SWI)。SVC 的地位与 SWI 是相同的——而且连机器码都相同。 然而,因为在 CM3 中,异常处理模型已经“洗心革面”了,就故意把该指令也重命名, 以强调它是在新生的系统中使用的。并且让程序员在把 ARM7代码移植到 CM3 时,能 充分注意到这个本质的不同(至少必须得改名,每次改名时都得到警示)。  由 CM3 的中断优先级模型可知,你不能在 SVC 服务例程中嵌套使用 SVC 指令(事实上 这样做也没意义),因为同优先级的异常不能抢占自身。这种作法会产生一个用法 fault。同 理,在 NMI服务例程中也不得使用 SVC,否则将触发硬 fault。  另一个相关的异常是 PendSV(可悬起的系统调用),它和 SVC 协同使用。一方面,SVC 异常是必须立即得到响应的(若因优先级不比当前正处理的高,或是其它原因使之无法立即 响应,将上访成硬 fault——译者注),应用程序执行 SVC时都是希望所需的请求立即得到响 应。另一方面,PendSV 则不同,它是可以像普通的中断一样被悬起的(不像 SVC 那样会上 访)。OS可以利用它“缓期执行”一个异常——直到其它重要的任务完成后才执行动作。悬 起 PendSV  的方法是:手工往 NVIC的 PendSV悬起寄存器中写 1。悬起后,如果优先级不够 高,则将缓期等待执行。  PendSV的典型使用场合是在上下文切换时(在不同任务之间切换)。例如,一个系统中 122    资料整理自互联网,版权归原作者! 欢迎访问 www.XinShiLi.net 新势力单片机、嵌入式
2021-10-24 15:31:19 15.67MB Cortex-M3
1
ARM Cortex®-M0 DesignStart™ Design Kit (代码及文档)
2021-10-22 22:24:44 1.14MB ARM  Cortex®-M0  esignStart 代码
1
TI公司Cortex M4内核ARM芯片TM4C129E(内置PHY)原理图,板子已量产,原理图带网口与EPI接口设计可外挂FPGA CPLD,AD格式原理图可导出库文件。本号博文内有免费下载方式。
2021-10-22 20:04:44 558KB TICortexM4 TM4C129E 原理图 AD软件
The Definitive Guide to the ARM® Cortex®-M0 and Cortex-M0+ Processors, Second Edition explains the architectures underneath ARM’s Cortex-M0 and Cortex-M0+ processors and their programming techniques. Written by ARM’s Senior Embedded Technology Manager, Joseph Yiu, the book is packed with examples on how to use the features in the Cortex-M0 and Cortex-M0+ processors. It provides detailed information on the instruction set architecture, how to use a number of popular development suites, an overview of the software development flow, and information on how to locate problems in the program code and software porting. This new edition includes the differences between the Cortex-M0 and Cortex-M0+ processors such as architectural features (e.g. unprivileged execution level, vector table relocation), new chapters on low power designs and the Memory Protection Unit (MPU), the benefits of the Cortex-M0+ processor, such as the new single cycle I/O interface, higher energy efficiency, better performance and the Micro Trace Buffer (MTB) feature, updated software development tools, updated Real Time Operating System examples using Keil™ RTX with CMSIS-RTOS APIs, examples of using various Cortex-M0 and Cortex-M0+ based microcontrollers, and much more. •Provides detailed information on ARM® Cortex®-M0 and Cortex-M0+ Processors, including their architectures, programming model, instruction set, and interrupt handling •Presents detailed information on the differences between the Cortex-M0 and Cortex-M0+ processors •Covers software development flow, including examples for various development tools in both C and assembly languages •Includes in-depth coverage of design approaches and considerations for developing ultra low power embedded systems, the benchmark for energy efficiency in microcontrollers, and examples of utilizing low power features in microcontrollers
2021-10-19 20:28:00 14.01MB ARM cortex
1
Cortex™-M3技术参考手册.pdf,官方高清完整文档,带目录
2021-10-19 19:35:44 1.66MB STM32
1
STM32F3与F4系列Cortex_M4内核编程手册【中英双语对照】.pdf
2021-10-19 12:02:58 7.99MB 单片机 数据手册
1
开发板cortex\STM32F101xx 和STM32F103xx固件库样例(汉化版).rar
1
基于 ARM Cortex-M0 的 LPC111x/LPC11Cxx 系列微控制器是低功耗,32 位微控制器家族中 的一员,面向 8、16 位微处理应用,具有高性能,低功耗,简单指令集,统一编址寻址等 优点,而 且,相对于现在市场上存在的 8/16 位架构来说,它有效的降低了代码长度。
2021-10-18 14:19:16 2.49MB LPC1114 ARM Cortex-M0
1
LPC1114最小系统原理图,cortex-m0,NXP
2021-10-17 14:02:56 373KB LPC1114最小系统原理图,cortex-m0
1