首页 | 官方网站   微博 | 高级检索  
     

VxWorks系统下CAN驱动的设计与优化
引用本文:尹加豹,朱涛,崔凯华. VxWorks系统下CAN驱动的设计与优化[J]. 计算机工程, 2020, 46(3): 192-197
作者姓名:尹加豹  朱涛  崔凯华
作者单位:江苏自动化研究所,江苏连云港222061;江苏自动化研究所,江苏连云港222061;江苏自动化研究所,江苏连云港222061
基金项目:“十三五”全军共用信息系统装备专用技术预先研究项目
摘    要:为在VxWorks系统下实现龙芯3A3000主板的控制器局域网(CAN)总线通信,采用SJA1000T设计基于PCI总线的8通道CAN通信板,并提出相应的驱动设计和优化方案。对龙芯3A3000处理器的驱动进行优化,在发送数据时禁用CAN而使用查询方式发送,在接收数据时中断服务程序对所有通道进行遍历查询,以提高中断利用率,在创建设备函数时根据PCI总线信息识别每个CAN通信板,以确保系统中不同CAN通道拥有唯一的通道号。实验结果表明,该驱动方案运行稳定,数据传输安全可靠,经优化后能够有效降低CAN通信板的中断次数,提高CAN总线的通信速率,避免多板环境下故障板卡干扰正常板卡,提高了系统的健壮性。

关 键 词:VXWORKS系统  控制器局域网总线  SJA1000T控制器  龙芯3A  驱动设计

Design and Optimization of CAN Driver Under VxWorks
YIN Jiabao,ZHU Tao,CUI Kaihua. Design and Optimization of CAN Driver Under VxWorks[J]. Computer Engineering, 2020, 46(3): 192-197
Authors:YIN Jiabao  ZHU Tao  CUI Kaihua
Affiliation:(Jiangsu Automation Research Institute,Lianyungang,Jiangsu 222061,China)
Abstract:In order to realize the Controller Area Network(CAN)bus communication of Loongson 3A3000 motherboard under VxWorks,an eight-channel CAN communication board based on PCI bus is designed by using SJA1000T,and the corresponding driver design and optimization scheme are proposed.The design optimizes the driver of the Loongson 3A3000 processor by disabling CAN and using the query mode to send data,and traversing all channels in the interrupt service routine when receiving data,so as to improve the utilization of interrupts.When creating a device function,each CAN communication board is identified based on the PCI bus information to ensure that different CAN channels in the system have their unique channel numbers.Experimental results show that the driving scheme runs stably,and the data transmission is safe and reliable.After optimization,it can effectively reduce the number of interrupts of the CAN communication board,improve the communication speed of CAN bus,and prevent the normal board from the interference of failing boards in a multi-board environment,which improves the robustness of the system.
Keywords:VxWorks  Controller Area Network(CAN)bus  SJA1000T controller  Loongson 3A  driver design
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号