中国半导体行业协会封装分会会刊

中国电子学会电子制造与封装技术分会会刊

导航

电子与封装 ›› 2025, Vol. 25 ›› Issue (6): 060502 . doi: 10.16257/j.cnki.1681-1070.2025.0070

• 产品与应用 • 上一篇    下一篇

基于CAN总线的CKS32远距离在线升级设计与实现

谢金峰1,刘涵2,3,赵本田2,3   

  1. 1. 延边大学工学院,吉林 延吉 ?133002;2. 智能汽车安全技术全国重点实验室,江苏 无锡 ?214072;3. 中科芯集成电路有限公司,江苏 无锡 ?214072
  • 收稿日期:2024-11-08 出版日期:2025-06-27 发布日期:2025-01-20
  • 作者简介:谢金峰(2005—),男,江苏无锡人,本科生,主要研究方向为模拟电路。

Design and Implementation of CKS32 Remote Online Upgrade Based on CAN Bus

XIE Jinfeng1, Liu Han2, 3, ZHAO Bentian2, 3   

  1. 1. Collegeof Engineering, Yanbian University, Yanji 133002, China; 2. State Key Laboratory of IntelligentVehicle Safety Technology, Wuxi 214702, China; 3. China Key System & Integrated Circuit Co.,Ltd., Wuxi 214072,China
  • Received:2024-11-08 Online:2025-06-27 Published:2025-01-20

摘要: 提出了一种基于控制器局域网(CAN)总线和应用内编程(IAP)技术的远距离在线升级方案,能解决分布式控制系统中固件更新不便的问题,并成功实现了单节点及多节点同步在线升级。该方案中PC上位机采用PyQt5 C++设计,通过USB转CAN接口实现与各个CKS32 CAN从节点的通信交互。CKS32 CAN从节点基于IAP技术特征,将片内Flash四段式划分并分时加载代码。为了避免数据传输时遭遇异常中断、误码,增加了断点重传、计数和CRC16-MODBUS校验机制,提高升级的安全性和效率。经测试,分布式系统总升级时间缩短,升级成功率大于95%,即使CAN从节点升级失败仍能上报结果并按照先前状态运行。

关键词: CKS32, CAN总线, IAP, 断点重传, 多节点

Abstract: A remote online upgrade scheme based on controller area network (CAN) bus and in-application programming (IAP) technology is proposed, which can solve the problem of inconvenient firmware update in distributed control system and successfully realize single-node and multi-node synchronous online upgrade. In this scheme, the PC host computer is designed in PyQt5 C++, which realizes the communication and interaction with each CKS32 CAN slave node through the USB to CAN interface. The CKS32 CAN slave node divides the on-chip Flash into four segments and loads the code by time based on the characteristics of IAP technology. In order to avoid abnormal interruptions and error codes during data transmission, breakpoint retransmission, counting and CRC16-MODBUS checksum mechanism are added to improve the safety and efficiency of the upgrade. After testing, the total upgrade time in the distributed system is shortened, the upgrade success rate is more than 95%, and even if the CAN slave node fails to upgrade, it can still report the result and run according to the previous state.

Key words: CKS32, CAN bus, IAP, breakpoint retransmission, multi-node

中图分类号: