随着现场总线技术的发展,CAN总线作为典型的现场总线之一,已得到广泛应用。针对CAN节点安全性、可靠性验证要求之一强度测试,给出了一个设计和实现,此设计的核心是一个具有USB2.0接口的双通道CAN总线实时数据转发器。通过高性能的MCU实现了实时CAN数据的收发,以及与主机之间的实时数据交换,用以检测被测CAN节点的数据收发和处理性能及设计余量,该转发器可以实现CAN连续帧的收发,帧间隙可以控制在几十微秒内。通过与主机测试软件协同工作,可对CAN节点进行强度和性能测试。另外若配置主机分析软件,也可以作为CAN双总线的协议分析仪,并且采用USB接口供电设计使用携带方便。
Along with the development of bus technology,CAN bus,as one of typical field buses,has already been in widespread use.In order to fulfill the request of safety as well as reliability in stress test towards CAN nodes,a design is given in this paper whose key point is a real-time data transfer transponder with double channel CAN bus and USB 2.0 port.The receive and dispatch process of CAN data and real time data transfer process among host machines are implemented by a MCU of high performance to detect the management performance as well as design surplus in transferring data among CAN nodes under test.Continuous receive and dispatch process about CAN frames has been fulfilled by the transponder,and the frame gap can be controlled strictly in dozens of micro-seconds.Together with test software in host machine,strength and performance test about CAN bus can be done.Moreover,if analysis software of host machine is properly configurated,this transponder can be treated as protocol analysis instrument of CAN double bus,and power supply with USB port is quite convenient and portable as well.