摘要
针对传统汽车总线和工业现场总线无法与管理信息的以太网络形成信息共享的弊端,设计出一种多协议转换的网关,该网关作为汽车总线和工业设备到以太网之间的连接桥梁,能实现不同协议的数据之间相互转发。硬件上该网关采用STM32F102主控芯片,利用CAN、UART、Ethernet等外设接口设计了相应协议的数据收发控制电路。软件上网关移植了实时嵌入式操作系统μC/OS-II,并嵌入Lw IP网络协议栈,实现了从CAN、RS232及RS485到Ethernet数据的互相转发。将网关用于汽车台架测试中,实际测试结果表明,该网关实时性及可靠性高,具有较低的总线负荷和极低的数据粘包率。
In view of the insufficient aspect of traditional vehicle bus cannot share local information with management information of the Ethernet network, a multi -protocol conversion gateway is designed, as the bridge between the vehicles bus and other test devices to the Ethernet, the gateway can transfer data between different protocols. On the hardware, the gateway based on STM32F102 host device, using CAN, UART, Ethernet and some other peripheral inter- faces for data receiving and transmitting control circuit. On the part of software, the gateway transplant the real -time embedded operating system μC/OS-II, LwIP protocol stack, and finally realize the data transfer function between CAN, RS232 and RS485 to Ethernet. Using the gateway in vehicle bench testing, the results show the gateway has high real -time performance and high reliability, a low bus load rate and a very low transmission error rate.
出处
《电子科技》
2017年第3期91-94,共4页
Electronic Science and Technology