kaiyun官方注册
您所在的位置: 首页> 嵌入式技术> 设计应用> 无中断向量重定位单片机中实现IAP和APP中断的方法
无中断向量重定位单片机中实现IAP和APP中断的方法
2020年信息技术与网络安全第2期
韩雨泓1,陈良勇2
(1.四川大学 计算机学院,四川 成都 610000;2.原成都军区联勤部后勤信息中心,四川 成都 610000)
摘要:独创了一种基于RAM中转的中断跳转方法,该方法以软件形式实现了单片机的中断向量重定位功能,实现了在应用中编程,克服了某类普通经济型单片机无法通过硬件寄存器设置中断跳转地址来实现跳转的局限性,使得这类单片机也能在同一片Flash内运行IAP和APP并相互跳转,大大拓展了实用性。采用某国产单片机(SWM240)实现了IAP和APP部分,并在生产实际中得到检验。
中图分类号:TP273
文献标识码:A
DOI:10.19358/j.issn.2096-5133.2020.02.010
引用格式:韩雨泓,陈良勇.无中断向量重定位单片机中实现IAP和APP中断的方法[J].信息技术与网络安全,2020,39(2):53-56.
The method of implementing IAP and APP interrupt in MCU without interrupt vector relocate function
Han Yuhong1,Chen Liangyong2
(1.School of Information Science and Technology,Sichuan University,Chengdu 610000,China;2.Chengdu Military Region Joint Logistics Department, Chengdu 610000,China)
Abstract:This article uniquely created an interrupt jump method based on RAM.This method is implemented in software.The microcontroller′s inprogram programming function overcomes some types of ordinary economical microcontrollers.It is not possible to set a jump address through a hardware register to implement jumps.Making this kind of Microcontroller also be able to run IAP and APP in the same flash and jump each other,which greatly expands the practicality.A domestic singlechip microcomputer is used to implement the IAP and APP parts,and has been tested in production.
Key words :microcontroller;IAP;interrupt jump;update

0 引言

在实际的生产工作中,从经济和实用性方面考虑,选择嵌入式系统MCU控制器时常常会使用到一些性能相对较弱,功能配置也不太强大的单片机,这类单片机有时候仅仅够用,无法从根本上满足多元化的需求。如果需要更多的功能就需要选择更高端的单片机,同时也意味着成本的增加。本文在项目过程中选用的MCU即为这种类型。在产品的整个生命周期中,需要对应用程序进行及时的升级换代,这就用到了IAP功能,而该款MCU不具备硬件级的中断向量重定位功能,因此只能另辟蹊径,以软件的方式解决该问题。




本文详细内容请下载:http://www.chinaaet.com/resource/share/2000003161





作者信息:

韩雨泓1,陈良勇2

(1.四川大学 计算机学院,四川 成都 610000;2.原成都军区联勤部后勤信息中心,四川 成都 610000)


此内容为AET网站原创,未经授权禁止转载。
Baidu
map