Design of Gateway Communication Module Based on ARM7

Publisher:salahc1983Latest update time:2012-09-01 Source: 21ic Keywords:ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The MVB multi-function vehicle bus is a field bus that is defined in detail in the international standard IEC61375 train communication network (TCN). According to the TCN standard, the train communication network is divided into two levels. The first level is the twisted-wire train bus to realize data communication between vehicles, and the second level is the multi-function vehicle bus MVB to realize data communication between various functional control units in the vehicle. MVB is widely used in train bus control due to its advantages in high real-time performance, high reliability and manageability. However, since MVB is specially developed for train communication networks, its practical scope, supplier and economy are not as good as CAN bus. As a communication bus at the field device level, CAN bus has high reliability and cost performance. At present, many train communication network systems of locomotives and vehicles use a heterogeneous network composed of MVB bus and CAN bus. Therefore, this paper proposes an MVB-CAN bidirectional communication module based on the ARM7 core chip LPC2294 of μC/OS-Ⅱ.

1 MVB multi-function vehicle bus

MVB is the vehicle bus part of the international standard IEC61375-1. It is mainly used for serial data buses for communication between interconnected devices with interoperability and interchangeability requirements. MVB adopts the master frame/slave frame response method, which can achieve device and media redundancy, and the real-time performance is guaranteed by the RTP real-time protocol. There are three types of MVB media: the electrical short-distance medium is the RS 485 differential transmission wire pair with a transmission distance of 20 m; the electrical medium is the twisted shielded pair with a transmission distance of 200 m; the electrical long-distance medium is the optical fiber with a transmission distance of 2 km.

MVB is a master-slave serial communication bus that can achieve process control optimization. MVB has good real-time response and is generally used for data communication between internal devices in the vehicle. It adopts Manchester encoding and has a data transmission rate of 1.5 MHz. The MVB multifunctional vehicle bus mainly consists of three parts: communication medium, MVBC protocol controller and MVB link software.

MVB has two frame formats, one is the master frame that can only be sent by the bus master, referred to as the master frame; the other is the slave frame sent by the slave in response to the master frame, referred to as the slave frame. The bus master polls the process data by sending the master frame in each characteristic cycle, and the slave device sends the slave frame accordingly for real data transmission. The message consists of the master frame and the slave frame sent in response to the master frame. A master frame should start with the master start delimiter, followed by 16 b frame data, followed by an 8 b check sequence.

A slave frame shall start with a slave start delimiter, followed by (16, 32, 64, 128 or 256) bits of frame data, including an 8-bit check sequence for every 64 data bits. When the frame data is only 16 bits or 32 bits, an 8-bit check sequence shall be appended.

2 CAN bus

Controller Area Network (CAN) is one of the most widely used fieldbuses in the world. It was first introduced by BOSCH in Germany. It is a data communication protocol used between measurement and execution components inside automobiles. As a remote network communication control technology with advanced technology, high reliability, complete functions and reasonable cost, CAN bus has been widely used in various fields. It provides strong technical support for distributed control systems to achieve real-time and reliable data communication between various functional nodes. Its message structure can be divided into two different frame formats. The difference between the two frame formats is the length of the identifier: the frame with an 11-bit identifier is called a standard frame, and the frame with a 29-bit identifier is called an extended frame. This design mainly considers the case of standard frames. The message of the standard frame is represented by 4 different types of frames: data frame, remote frame, error frame and overload frame. Take the data frame as an example: the data frame consists of 7 different parts: frame start, arbitration field, control field, data field, CRC field, response field and frame end.

3 Communication Gateway Module Hardware Design

The hardware block diagram of the gateway module is shown in Figure 1.

Figure 1 Hardware block diagram of the gateway module

The processor is LPC2294 based on ARM7. LPC2294 is a microprocessor based on 16 b/32 b ARM7TDMI-S core, with 16 KB RAM and 256 KB high-speed FLASH, and a maximum clock rate of 60 MHz. It has 2 CAN channels, and its CAN controller integrates data link layer functions and complies with CAN2.0A and CAN2.0B specifications.

The CAN transceiver uses Philips PCA82C250. It mainly provides differential transmission capability for the bus and differential reception capability for the CAN controller. After the microprocessor configures the CAN controller accordingly, the transceiver automatically completes the corresponding CAN bus action.

The MVB communication controller uses the MVBC02 dedicated chip, which uses a 16b data bus, provides a wealth of interface control signals, simplifies the interface design with various host CPUs and communication memories, and supports the functions of the link layer and physical layer in the MVB protocol. The MVB physical layer interface uses an electrical short-distance medium ESD+ interface, and the system signal channel uses an optical coupler to achieve electrical isolation between the main system and the outside world, thereby improving the reliability of the system. The RS 485 chip LTC1485I is used as a transceiver, and an overvoltage protection module is used to prevent instantaneous overvoltage from damaging the device. The MVB physical layer interface circuit is shown in Figure 2.

Figure 2 MVB physical layer interface circuit

[page]

4 Software Implementation Solution

In this design, the key is to realize the data exchange between the MVB bus and the CAN bus. It has the MVB detection and access function, as well as the CAN bus detection and access function. The processor controls the parsing and repackaging of the data frame to realize the conversion between the CAN bus V2.0 specification and the MVB standard format frame. Therefore, if the data received from the CAN side is to be transmitted through the MVB, it is necessary to combine the data in the CAN frame into the data format of the MVB frame according to a certain format; similarly, if the data received from the MVB side is to be transmitted through the CAN, it is also necessary to frame the data in the MVB frame according to a certain format. In addition, in order to realize transparent transmission, it is necessary to correspond the meaning of various variables in the MVB port according to certain rules and the identifier of the CAN bus side frame and other information to form a table. Similarly, on the CAN bus side, the identifier of the CAN side is corresponded to the data set of the process data on the MVB side to form a table.

The software mainly consists of the main function scheduling module, MVB control module, CAN control module and 2 data buffers. When the CAN application layer has data to send to the MVB network, the main function needs to schedule the CAN control module to receive the data after obtaining the CAN data transmission, decode and analyze to obtain the identifier, query the index table according to the identifier to find the corresponding MVB port related variables, and then extract the relevant data in the message and send it to the data buffer B. The main function scheduling module notifies the MVB control module to extract data from buffer B, and completes the MVB message encapsulation, sends it to the MVB bus, and releases buffer B. Conversely, when the MVB application layer has data to send to the CAN node, first, the data is sent to the MVB, the main function scheduling module detects whether there is data transmission on the MVB, notifies the MVB control module to accept the data, and decodes and analyzes the information, obtains the port related variables, queries the index table according to the port related variables to find the corresponding CAN identifier, and sends the data to the data buffer A. At this time, the general scheduling module notifies the CAN control module to extract data from buffer A, and completes the CAN message encapsulation, sends it to the CAN bus, and releases buffer A. The CAN control module is mainly responsible for parsing the complete CAN protocol message from the CAN data packet and storing it in data buffer B. At the same time, the CAN data in data buffer A is encapsulated into a complete CAN protocol message and sent to the CAN bus. The MVB control module is mainly responsible for parsing the complete MVB protocol message from the MVB data packet and storing it in data buffer A. At the same time, the MVB data in data buffer B is encapsulated into a complete MVB protocol message and sent to the MVB. The general scheduling module mainly plays a role in comprehensive scheduling and monitoring. At the same time, it is also used for interrupt response during the entire transmission process.

Figure 3 illustrates the software flow diagram.

Figure 3 Software flow chart

5 Conclusion

This paper describes the implementation method of the MVB-CAN communication module based on the ARM7 processor LPC2294, summarizes the message structure of the MVB network and the CAN bus network, and proposes the hardware and software implementation methods of the communication module. Through the assessment, the communication module realizes the data transmission between the MVB and the CAN bus, and its performance is stable and reliable. Various field buses have their own application characteristics and advantages. Therefore, the application of multi-type bus heterogeneous networking methods in train communication networks is becoming more and more extensive. The heterogeneous networking method of MVB and CAN buses has broad market prospects. The design of the MVB-CAN communication module provides support for the diversified development of train communication networks, and also provides a reference for the design of network communication modules for other network heterogeneous networking methods (for example: RS 485/RS 422-MVB, HDLC-MVB, etc.).

Keywords:ARM7 Reference address:Design of Gateway Communication Module Based on ARM7

Previous article:ARM Embedded Software Programming Experience
Next article:Design of autonomous obstacle avoidance robot fish based on ARM

Recommended ReadingLatest update time:2024-11-16 15:40

Data acquisition interface solution for ARM7 fan monitor
For a long time, due to the harsh operating environment, imperfect monitoring and maintenance methods, fans have been constantly experiencing faults such as broken reducer teeth, burned bearings, bent transmission shafts, damaged coupling diaphragms, and even broken blades. The fan monitor based on MAXl320 is a very
[Industrial Control]
Data acquisition interface solution for ARM7 fan monitor
Design of SoC Voice Processing System Based on ARM7 TDMI
introduction With the rapid development of microelectronics and computer technology, many embedded application systems have emerged. Among them, various speech processing systems have been continuously developed and widely used in various industries, such as voice station announcers, automatic interpretatio
[Microcontroller]
Design of SoC Voice Processing System Based on ARM7 TDMI
Interrupt shielding method of ARM7 core
When the CPU is executing a program, due to some external reasons, it is necessary to terminate the execution of the current program as soon as possible and execute the corresponding processing program. After the processing is completed, it will return to continue executing the terminated original program. This situ
[Microcontroller]
Interrupt shielding method of ARM7 core
Network communication design based on uCLinux and ARM7
introduction Linux is a very popular operating system that is compatible with UNIX systems and has open source code. It was originally designed as a desktop system, but is now widely used in embedded devices. uCLinux was born in this atmosphere. In the English word uCLinux, u stands for Micro, which means "small"; C
[Microcontroller]
Network communication design based on uCLinux and ARM7
ARM microcontroller (learning) - my first ARM7 microcontroller program
It was not easy. I finally completed my first ARM7 microcontroller program. Although it is very simple, it took me a long time to learn the software IAR for ARM. The most serious problem I encountered was the header file problem. After a long time, I suddenly realized it in the examples they provided. I had to list th
[Microcontroller]
ARM microcontroller (learning) - my first ARM7 microcontroller program
Detailed explanation of the design scheme of SWI soft interrupt function based on ARM7 core
The author used LPC2458 when designing a project. This CPU is an ARM7 core, with 512K bytes of on-chip FLASH, 98k bytes of on-chip RAM, supports off-chip LOCAL BUS, and can start the CPU from off-chip NOR FLASH. Due to the large amount of code, the program is placed in the off-chip NOR FLASH. And there is a need to er
[Microcontroller]
Detailed explanation of the design scheme of SWI soft interrupt function based on ARM7 core
Design of intelligent disinfection robot control system for livestock breeding based on ARM7
1 Overall design The livestock breeding intelligent disinfection robot control system consists of three parts: robot intelligent control module, monitoring module, and wireless network communication module. The working process is to send control command codes to the remote robot through a mobile phone or mic
[Microcontroller]
Design of intelligent disinfection robot control system for livestock breeding based on ARM7
ARM7 LPC2103 interrupt processing method
The Vectored Interrupt Controller (VIC) has 32 interrupt request inputs that can be programmed into three categories: FIQ, Vectored IRQ, and Non-Vectored IRQ. The programmable allocation mechanism means that the interrupt priorities of different peripherals can be dynamically allocated and adjusted. Fast interrupt r
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号