Embedded Serial Communication Server Solution Based on VxWorks and MPC860T Platform

Source: Internet
Author: User
Solution for Embedded Serial Communication Server Based on VxWorks and MPC860T: 14:42:08
Source: Micro-Computer Information Author: Zhang huibing

1. Introduction
With
With the rapid development of IP technology, "everything over
The concept of IP has been deeply rooted in the hearts of the people. How to effectively connect serial devices physically distributed in various locations to the Internet to achieve Remote Telemetry Control Based on IP technology has become a hot topic of research and application. The thesis is embedded
The real-time operating system VxWorks and the high-performance embedded microprocessor MPC860T are both software and hardware platforms. A high-performance communication server suitable for serial devices connected to IP networks is proposed.
It makes full use of the real-time performance of the Operating System VxWorks and the excellent performance of the embedded micro-processor MPC860T in terms of network and communication. The communication server can not only
Serial Devices with high speed and high real-time performance can also be connected to the Internet.
2. architecture of the serial communication server
In practical applications,
Various monitoring and control devices use serial communication to communicate with the outside world. Serial devices vary widely, especially in terms of data transmission rate and data format.
UART (Universal Asynchronous Receiver
High-level data link (HDLC)
Control, Advanced Data Link Control) and other protocols for high-speed data transmission. The requirements for real-time data transmission are also very different: non-real-time serial data transmission, there are also strict real-time requirements
Cell serial data, such as audio, video data, and real-time monitoring data of high-speed devices. How can we effectively connect various serial devices to an IP network for Internet-based Distributed Remote Monitoring? According
This requirement puts forward the architecture of a serial communication server shown in 1. This serial communication server can better connect various serial devices to an IP network, in addition, there are outstanding real-time tables.
Now: it can quickly connect various high-speed and real-time audio and video data to an IP network to achieve Remote Telemetry Control Based on an IP network.

 

In
As shown in figure 1, in the serial communication server architecture, the server configuration program provides you with a server communication parameter configuration interface based on the C/S mode, you can use a client running on your PC.
The configuration program communicates with the Communication Server to change the communication parameters at any time. The embedded real-time operating system provides functions such as real-time scheduling, interrupt management, and system resource management for various tasks.
BSP (board support
Package, board-level support package) is the underlying program for the Communication Server-specific hardware platform. It depends on hardware, including initialization code and some drivers; FEC (fast
Ethernet
Dual 100/10 M Adaptive Ethernet controller driver; dual-core embedded microprocessor for operating systems, applications,
Configuration program and communication protocol underlying microcode; peripheral interface layer provides a variety of standard communication interfaces, such as RS-232, RJ-45, etc.
3. Hardware Implementation of the serial communication server
In the serial communication server, the performance of the embedded microprocessor is undoubtedly a key factor affecting the performance of the entire communication server.
Because
Based on the Communication Server architecture shown in figure 1, the paper selects Freescale's dual-core embedded microprocessor, MPC860T. It is an integrated dual-core and rich peripheral device.
Microprocessor can be widely used in various control fields, especially in the communication and network fields with excellent performance. The mpc8xx Kernel Based on the PowerPC architecture is mainly responsible for operation
The CPM module has an independent Communications processor, which is mainly used for SCC (Serial Communications ).
Controllers, Serial Communication Controller), SMC (Serial Management
Communication channels, such as Controllers and serial management Controllers, provide services, execute underlying code of communication protocols, and control DMA. SIU is mainly responsible for system startup, initialization, interruption, and external
Bus functions. FEC provides 10/100 M Ethernet Control, which provides independent FIFO and burst DMA, so it can provide 10/100 M Ethernet without affecting CPM Performance
Connection. Four SCC channels can be independently configured as HDLC mode, asynchronous HDLC mode, and 10 M Ethernet mode. Two SMC channels can be configured as UART mode and transparent transmission mode.

In practice, uart and hdlc are two common communication protocols for serial communication, and HDLC is the basis of many other protocols (such as SDLC and SS #7, therefore, the serial port protocol of the communication server uses HDLC and UART. The hardware composition of the serial communication server based on the MPC860T is shown in 3. In this serial communication server,

4
Two SCC channels work independently in Duplex HDLC mode to provide high-speed real-time serial data transmission and Fast Ethernet access. Two SMC channels work independently in UART mode to provide low-speed data.
Communication: SMC1 provides a serial port for system-level and task-level debugging. You can use SMC1 to configure Server parameters through programs running on your PC. SMC2 provides low-speed serial communication.
The FEC interface provides a duplex 100/10 M
Ethernet access port; 4 M Flash is used to store the operating system, user applications, server configuration programs, etc.; 32 m sdram is used to run applications and store running process data.
BDM port is used for software and hardware simulation debugging. VisionProbe can be used to debug software and hardware through the BDM port.
4. Software Implementation of the serial communication server
In the serial communication server, the operating system is another key factor affecting the overall performance of the Communication Server. According
Figure
1. the system structure and the microprocessor used are described in this paper. VxWorks is a real-time operating system launched by US Wind River Corporation.
It is modular and highly scalable, which enables efficient and stable operation in a small storage space. It is very suitable for the development of various high-performance, multi-task embedded real-time systems, widely used in communications and aviation
Tian and other fields. The VxWorks system consists of the wind kernel, I/O system, BSP, and network protocol stack.
The hierarchical structure of the serial communication server software system built based on the VxWorks operating system is shown in Figure 4. In this software

System
In the system, the BSP (including UART driver, HDLC driver, config. h configuration file, and makefile compilation rule file) is dependent on the communication server hardware system from the bottom up)
And ethernet drivers; operating system layer unrelated to hardware; is a common server configuration program at the application layer. The operating system layer is provided by VxWorks, and the server configuration program and BSP must be based on the system
Hardware Implementation. The FEC driver needs to be integrated into the entire software system as part of BSP. The reason why the FEC driver is listed separately is that the FEC driver is generic and only needs to be set in BSP.
. The following describes the implementation scheme of BSP and server configuration software.
4.1 Design and Implementation of the Communication Server BSP
The BSP in the embedded system is generally designed and implemented by referring to a strictly tested BSP with similar functions. The BSP of the serial communication server is implemented by referring to the bsp of the ads860 evaluation board. Based on the architecture and hardware implementation of the serial communication server, the implementation of BSP needs to do the following:
Replace the scc1 ~ The scc4 channel is set to the HDLC mode to implement the HDLC driver and mount it to the TTY System of VxWorks;
Create the sysSccSerial. c file to support the HDLC driver mode;
Modify the usrconfig. c or usrSerial. c file as needed to use the HDLC channel as a standard I/O device;
Modify config. h. configNet. h, makefile, apc860.h and other files enable relevant configuration parameters to comply with the specific requirements of the serial communication server, remove 10 M Ethernet support and add 100/10 m fec Ethernet support;
The implementation of the HDLC driver is an important part of BSP development, because the HDLC driver of SCCx channel must meet the requirements of high speed and high real-time performance, its performance directly determines the performance of the entire communication server.

4.2 communication service configuration software design and implementation

The serial communication server configuration software is an application provided to set the communication parameters of the Communication Server in real time. It is built based on the C/S Mode: configured by the server running on the serial communication server and
Client software on the user's personal computer, which communicates with the SMC1 serial port of the communication server through the computer's serial port. Communication parameters of the Communication Server mainly include SMC2
And the HDLC parameters of SCCx.
5. Conclusion
Serial Communication Server designed and implemented by using VxWorks real-time operating system and MPC860T embedded microprocessor
Stable performance, convenient configuration, good real-time performance, can better meet the requirements of various serial devices to access the Internet, especially suitable for serial devices with high data transmission rate and real-time requirements. By using the serial communication server, you can easily connect various serial devices to an IP network to achieve remote real-time monitoring and control over the Internet.

Innovation of this article: fully utilizes the Real-Time Feature of VxWorks and the high-speed HDLC serial port access function provided by the MPC860T SCC channel, and realizes the high-speed access of the serial monitoring device to the IP network and remote real-time monitoring technology.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.