Cortex-M0 MCU中断向量重定位的高效方法

俞庆, 刘贯营

集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (9) : 24-28.

PDF(1354 KB)
PDF(1354 KB)
集成电路与嵌入式系统 ›› 2023, Vol. 23 ›› Issue (9) : 24-28.
专题论述

Cortex-M0 MCU中断向量重定位的高效方法

  • 俞庆, 刘贯营
作者信息 +

An Efficient Method of Interrupt Vector Relocation for Cortex-M0 MCU

  • Yu Qing, Liu Guanying
Author information +
文章历史 +

摘要

为了在不具备中断向量硬件重定位的普通Cortex-M0架构MCU上实现IAP功能,提出了一种中断向量重定位的通用方法。该方法不依赖于MCU的硬件特性,而是基于软件实现梯子函数,从而实现中断向量的重定位。文中深入研究了该方法并进行了改进,大幅减小了中断向量重定位过程中的时间开销,提升了中断响应速度。本文以STM32F030为对象,详细介绍了该方法的原理,给出了Keil环境下梯子函数的实现代码和分散加载文件的写法。目前,该方法已经在实际产品中得到检验和推广。

Abstract

In order to implement the IAP function on the common Cortex-M0 MCU which does not support interrupt vector hardware relocation,a general method of interrupt vector relocation is proposed.This method does not depend on the hardware characteristics of MCU,but it is based on the ladder function implemented by software,and then realizes the relocation of interrupt vector with the ladder function.In this paper,the method is deeply studied and improved,which greatly reduces the time cost in the process of interrupt vector relocation and improves the interrupt response speed.Taking STM32F030 as the object,the paper introduces the principle of this method in detail,and gives the implementation code of ladder function and the writing method of scatter-loading file under Keil environment.At present,the method has been tested and promoted in products.

关键词

Cortex-M0 / IAP / Bootloader / 中断重定位 / STM32F030

Key words

Cortex-M0 / IAP / Bootloader / interrupt relocation / STM32F030

引用本文

导出引用
俞庆, 刘贯营. Cortex-M0 MCU中断向量重定位的高效方法[J]. 集成电路与嵌入式系统. 2023, 23(9): 24-28
Yu Qing, Liu Guanying. An Efficient Method of Interrupt Vector Relocation for Cortex-M0 MCU[J]. Integrated Circuits and Embedded Systems. 2023, 23(9): 24-28
中图分类号: TP302   

参考文献

[1] 王义泽,蔡弘.基于CAN总线的AVR单片机IAP设计实现[J].电子技术,2018(1):57-60.
[2] 石盼,何东伟,徐博铭.基于LWIP的IAP远程升级技术研究[J].机电一体化,2017(5):31-34.
[3] 罗晶晶.基于4G网络的嵌入式设备远程升级系统设计与实现[D].长春:吉林大学,2021:1-2.
[4] Joseph Yiu.Cortex-M3 权威指南[M].宋岩,译.北京:北京航空航天大学出版社,2009:83-107.
[5] 马建,黄增波,李泽芳.煤矿安全监控系统传感器在线升级技术研究[J].煤矿安全,2022(4):136-137.
[6] 范云龙,方安平,李宁.Cortex-M0处理器初探[J].单片机与嵌入式系统应用,2010(6):78-81.
[7] 意法半导体.Reference manual STM32F030,2017:144-146.
[8] Joseph Yiu.ARM Cortex-M0 权威指南[M].吴常玉,等译. 北京:清华大学出版社,2013:104-105.
[9] 韩雨泓,陈良勇.无中断向量重定位单片机中实现IAP和APP中断的方法[J].信息技术与网络安全,2020(2):53-56.
[10] 意法半导体.Cortex-M0 Technical Reference Manual,2009.
[11] 意法半导体.STM32F030x Datasheet,2013.

PDF(1354 KB)

Accesses

Citation

Detail

段落导航
相关文章

/