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.
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.
[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.
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.).
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
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- An ARM7-based automotive gateway solution
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- There is no one to teach me how to learn FPGA. Can I learn it just by watching tutorials?
- Brushed DC and brushless DC driver chips
- Analysis of the application of NTC thermistor in power circuit
- Use LabVIEW to remotely control the Raspberry Pi via WiFi~
- Analysis of the working principles of seven triode collector DC circuits 6
- What is PENA in the technical manual spnu515c.pdf of TMS570LS1227? ? ?
- This switching circuit
- Analog Discovery 2 Review (7) Exploring the Implementation of an Impedance Analyzer
- EFINIX FPGA Video Image Learning Solution - Open Source
- Combination of TM1640 and PIC12F629 microcontroller