Development of DSP bootloader for MBD code download based on CAN communication
-
摘要: 为了实现DSP嵌入式系统在实际应用中便捷下载MBD(model-based design)代码的需求,文章设计了一种基于CAN通信实现MBD代码下载的Bootloader方案。以TMS320F28335为例,通过对MBD代码的结构进行分析,设计了Boot程序与MBD程序的内存划分方案,确保程序下载的有效性和稳定性;开发了相应的Boot程序和上位机程序,详细介绍了Bootloader的实现流程,并对关键步骤函数进行了分析与解释,利用CAN通信实现了程序的下载。实验结果表明,该方法稳定可靠且具有实用性,为DSP嵌入式系统在实际应用中的MBD代码下载提供了一种可行且高效的解决方案。
-
关键词:
- TMS320F28335 /
- CAN通信 /
- MBD代码下载 /
- Bootloader
Abstract: In order to meet the demand for convenient downloading of MBD (Model-Based Design) code in practical applications of DSP embedded systems, this study designs a Bootloader solution based on CAN communication for MBD code download. Taking TMS320F28335 as an example, by analyzing the structure of MBD code, a memory partition scheme between Boot program and MBD program is designed to ensure the effectiveness and stability of program download. The corresponding Boot program and host computer program are developed, and the implementation process of Bootloader is introduced in detail. The functions of Committed step are analyzed and explained, and the program download is realized using CAN communication. The experimental results indicate that this method is stable, reliable, and practical, providing a feasible and efficient solution for downloading MBD code in practical applications in DSP embedded systems.-
Key words:
- TMS320F28335 /
- CAN communication /
- MBD code download /
- Bootloader
-
表 1 报文格式
帧ID DATA1 DATA2 DATA3-DATA8 上位机 ID_M CMD DA_LN D1-D6 Boot ID_S Status DA_LN D1-D6 表 2 无干扰测试
通道 波特率/kbps 程序大小/kB 下载时间/s 试验距离/m CANB 250 32 8.021 3.3 27 6.490 3.3 500 32 7.527 3.3 27 6.266 3.3 表 3 干扰测试
通道 波特率/kbps 程序大小/kB 下载时间/s 干扰帧 试验距离/m CANB 250 32 8.483 3 3.3 8.510 6 3.3 500 32 7.9687 6 3.3 8.023 12 3.3 -
[1] 王伟,王静文. TMS320F28335 DSP芯片高可靠电源管理电路设计[J]. 测控技术,2018,37(10):78-80. [2] 倪庆生,倪云龙,潘晓阳,等. 基于CAN总线的TMS320F28335远程在线升级方法设计[J]. 电子与封装,2021,21(11):34-38. [3] 吴政江,李建贵,黄玉祥. 永磁同步电机控制自动代码生成的研究[J]. 机械设计与制造,2021(10):182-185. doi: 10.3969/j.issn.1001-3997.2021.10.040 [4] 钟俊,吕盼稂,王欢,等. TMS320C672x DSP引导程序设计[J]. 计算机工程,2010,36(4):267-270. [5] 张舵,范晋文,周云松,等. TMS320C6000系列DSP的DSP/BIOS自启动设计[J]. 单片机与嵌入式系统应用,2022,22(9):29-32. [6] 许化,黎蕾,倪云龙,等. 基于TMS320F28335的二次Bootloader在线升级方法[J]. 电子技术应用,2023,49(3):139-142. [7] 包静茹. 基于代码生成的机载软件配置与定制技术研究[D]. 成都:电子科技大学,2020. [8] 么居标,宋建桐,吕江毅,等. 基于CAN总线的电机控制器Bootloader开发[J]. 测控技术,2018,37(10):124-126,131. [9] 张鑫宇. 基于DSP的大功率车用永磁同步电机测控平台设计[D]. 长沙:湖南大学,2021. [10] 李浩,赵晨希,关冰. 面向多核DSP的可靠二级Boot方法研究[J]. 单片机与嵌入式系统应用,2021,21(11):22-26,29. [11] 汪庆武,郇钲,黎泽清,等. 基于SPI接口DSP程序引导加载方法设计与实现[J]. 仪表技术,2016(5):6-8,18. [12] 张跃玲,余向阳,张瑾,等. 一种多DSP核SoC系统的FLASH引导控制[J]. 微电子学与计算机,2019,36(1):95-100. [13] 高源,罗秋凤. 基于DSP28335程序移植方法的研究与实现[J]. 电子测量技术,2013,36(3):84-88. [14] 顾瀚戈,钟洪念,冉万宁,等. 基于TMS320F28335芯片CAN Bootloader程序升级方法[J]. 电子与封装,2021,21(12):88-93. [15] 黄有冬. 基于CAN总线可在线升级的自适应限速系统的研制[D]. 重庆:重庆大学,2018.