• Transmits the terminal design based on AT91R40008 embedded GPRS

    Abstract: This article gave one kind to connect Internet in view of the industry main line’s embedded system the wireless surfer plan, discussed has realized the subject matter which in this plan must solve. Designed and has realized transmits the terminal based on at91R40008 microprocessor and G18 GSM module embedded GPRS, used the hierarchical structure and the standard interface, has realized based on real-time operating system µ C/OS-ⅡThe embedded TCP/IP agreement stack, has carried on the analysis to software system’s main module.
    Key word: Embedded system; AT91R40008; GPRS; µ C/OS-Ⅱ; Embedded TCP/IP agreement stack

    1 introduction
        Along with the Internet fast development, Internet has become the information flow the important channel, Internet turns on the terminal to obtain the widespread application in each kind of long-distance supervisory system. Uses the GPRS wireless mobile interned turning on technology the terminal, causes the existing industry main line’s supervisory system to carry on the long range data transmission directly through Internet, solved has used the ethernet or the telephone line turns on Internet the wire communication wiring difficulty, the coverage area small, to be unable questions and so on mobile communication. Internet turned on the terminal already to become application hot spots and so on industrial control, long-distance survey, traffic control. This article has given embedded data transmission terminal design with realizes based on the ARM processor and GPRS the Modem.

    2 principles of design
        Turns on Internet the embedded system to involve two key questions, namely pass-along message’s medium and uses the agreement, the transmission medium may be media and so on ethernet or telephone line, uses GPRS Modem in this design to take tetherless access Internet the medium; The agreement uses the embedded TCP/IP agreement stack. Service node carries on the wireless communication through GPRS Modem and local GSM in the base depot GPRS, enters the GPRS network, then carries on the data transmission through the GPRS gateway and Internet.

        The system hardware divides into the control module and GPRS the modem module, GPRS the modem module provides turns on Internet the TCP/IP physics connection; The control module is the master control software’s carrier, is responsible for the data which will control will process through GPRS modem transmit or passes on to the industry main line. In the control module, a micro controller’s serial interface connects GPRS modem, through to the GPRS modem control and the correspondence, realizes Internet network data receiving and dispatching; Another serial interface carries on the data communication through the industry main line with other embedded equipment. Should realize the method to use the data transparent transmission, does not attach the limiting condition to the original embedded system, has realized the network function well, moreover system’s timeliness is high.

    3 based on AT91R40008 hardware design
        In order to solve the network protocol software and the real-time operating system processing hardware bottleneck, in the design has chosen Atmel Corporation’s AT91R40008 micro controller, one section based on the ARM7TDMI nucleus’s 32 micro controllers, the operating frequency is 66M, it internal integrated 256KB RAM, may the code movement on the piece in RAM, cause this application procedure to be possible directly to use the duty inquiry way, the enhancement system’s stability, and two full-duplex general synchronization/asynchronous transceiver (USART) with the periphery controller PDC connection, uses the PDC way, the entire section data gives hardware automatic send-receive processing to reduce the system treating pressure greatly compared to the single byte manipulation, enhanced the systemTimeliness.
     
        Shown in Figure 1 for the control module hardware connection diagram. In the chart MAX232 realizes between system’s another user interface and the standard 232 main line’s level switch responsibly; 24CL04 is responsible for when the memory system movement needs key parameter, like long-distance connection IP address, port and so on. If to reduce the equipment volume to be possible to use AT91R40008 and AT49BV1614A integrates in together AT91FR40162 processor. What GPRS the Modem module uses is Motorola g18 DIN, this module has provided the physical link for user’s wireless surfer.
            
        Figure 1 control module hardware structure drawing

    4 software designs
        The software part’s major function including the system and equipment’s initialization, the foundation receive transmission duty, establishes the connection the information link, the guarantee network connections real-time effective and so on. Uses the real-time operating system is sound code open embedded operating system µ C/OS-Ⅱalso, can turn on Internet for the embedded system, after the success transplant real-time operating system, must realize an embedded TCP/IP agreement stack. The software design uses the hierarchical structure, is in turn from bottom to top: Hardware driver, operating system essence software, network interface software, agreement software and application procedure.

    4.1 real-time operating system µ C/OS-ⅡTransplant
        Transplant µ C/OS-ⅡThe work mainly includes the following several parts: Revises the OS_CPU.H document, this document mainly contains with the compiler related data type definition, the processor realizes the method which, the storehouse type definition and several great definitions and the function explanation the switch interrupts; Revises the OS_CPU_C.C document, realizes the storehouse initialization and several with the C language provides to the user uses in the extended operation system function hook (being called clasp function) the function; Revises the OS_CPU_A.S document, with realizes CPU with the CPU related assembly language to open/the pass to interrupt, the duty level duty to cut, to interrupt the level the duty cut as well as the clock interrupt procedure.

        Uses when the GCC compiler translates, besides to the above document makes the corresponding transplant revision, does not make the modification to real time system’s sound code, but must compile can in the operating system the direct transfer micro controller auxiliary equipment driving function, these driving function constitutes the micro controller’s control driving function storehouse, causes to be possible to complete the UART control, I2C hardware operations and so on main line visit, PIO control in the operating system, after transplanting the real time system can use each periphery component as well as the agreement realizes is very important.

    4.2 embedded TCP/IP agreement stack
        Needs a TCP/IP agreement stack on the real-time operating system to realize in Internet turns on and receives and dispatches the data, to raise the efficiency to save the resources, uses simplified the TCP/IP agreement stack, this application only retained TCP, UDP, IP and the PPP agreement, as shown in Figure 2, the network protocol stack and the component provide the effective system service for network environment’s embedded application.
     
    Figure 2 network protocol stack and part

        The transmission level uses TCP (transmission control protocol) and UDP (User Datagram Protocol). TCP is one kind face the connection agreement, it provides the reliable byte class transmission; The UDP agreement has not guaranteed the reliable mechanism, but may realize the high speed highly effective transmission data newspaper. The network level agreement realizes is mainly IP, the IP agreement does not support a IP package of lamination and the rewiring as well as the routing in realization. Physical level’s GPRS Modem has realized the linked network physical equipment, must through the Modem digit dialing surfer, probably realize the PPP digit dialing agreement on the data link layer, and moves the GPRS gateway establishment information link according to the PPP agreement’s request. For the convenience agreement software’s use must realize each stratification plane connection, the network interface level in network protocol and network equipment, between the different protocol layer has provided a mutual internal isolation programming connection. BSD the Socket connection has provided the access network unified connection for the application.

    4.3 buffers and actuation software
        In this application the buffer and the actuation software are enhance the system performance the key, through many kinds of buffer designs multi-layered structure’s software close conformity in the same place, may relax between each software to process the bottleneck, sharpens the continuous data parallel processing ability; Actuated software’s design to reduce the hardware highly effective to process to the CPU percentage.

        Data enters the software system after the serial port hardware equipment starts in a series of buffers to transmit, shown in Figure 3 for the cushion structure which uses. From left to right is in turn the serial port receiving and dispatching buffer, the serial port receiving and dispatching work buffer, the network interface read-write buffer, finally is the agreement stack buffer. Such entire data exchange process turns to this buffer read-write, the interface routine compilation relatively simple perspicuity.
     
     
    Figure 3 buffer design schematic drawing

        Each serial port’s receiving and dispatching buffer is 6 group lengths is 512 byte char type array, the work buffer is the length is the 1KB char type circumduction formation; The network interface read-write buffer uses with the work buffer same structure; The agreement stack buffer is in the agreement software treating processes the data only carrier, the agreement stack buffer uses the syntagma the static chain table structure.

        The above buffer design had not only guaranteed when continuous data arrival CPU has the enough process time and the space, moreover is advantageous for the hardware and the network protocol software isolation software’s design development. This kind of design pattern will take the massive RAM space, but will use the ARM processor internal integrated 256KB RAM, will therefore have enough RAM to make the buffer to enhance the system performance. Software’s RAM service condition as shown in Table 1. And may also have about the 100KB memory space to be possible to provide to the software promotes, moreover the user may the selection program FLASH movement way, save more RAM is the software promotion use.

    Table 1 overall system’s RAM takes the table

        Driver including three parts: Initialization part, function function part and interrupt service ISR. The initialization part initialization hardware equipment, the partitioning device needs the resources, complete the system related establishment; The function function part completes the function which the system assigns, the interrupt service major function is initiates a duty to complete essential processing. As the serial port hardware compilation driving function’s work is mainly the serial port start, the stop, the baudrate establishment, controls PDC as well as to the buffer read-write.

    4.4 system initiation work flow
        On after processor electricity, first carries on the CPU hardware, the operating system, the agreement stack software parameter initialization work; Test peripheral device GSM module, because the GSM module takes one relatively importantly moreover a more independent equipment, its startup procedure relative MCU wants slowly many, therefore after the system enters the normal operation stage must wait for GSM module normal work, can carry on the network server’s connection. The user duty besides is responsible for the network and the industry main line data exchange, because in the GSM signal, the module power source receives the disturbance or the SIM card vibration causes to be able to cause the GSM module to halt, therefore must establish the GSM module examination duty, is responsible for the network connections the examination as well as the judgment network interrupt connects whether to cause by the GSM module breakdown, thus decided whether to restart to the GSM module, guarantees overall system’s steady operation.  

    5 concluding remark
        This article has given one kind realizes the plan based on 32 ARM microprocessors and the GPRS embedded wireless data transmission terminal. This plan hardware cost is not higher than uses the upscale monolithic integrated circuit to realize the plan, simultaneously has the data volume of goods handled to be big, the reliability is high, handling ability strong and so on merits. The embedded TCP/IP agreement and the real time system unify the software platform, strengthened system’s functionality and timeliness, this kind of platform not only may turns on the terminal as the observation network and the Internet data, but may also realize FTP, WEB, GUI, FS and so on many kinds of embedded applications, uses in the long-distance monitoring website, the monitoring picture transmission, the network hard disk, application situations and so on scene contact surface machine, replaces the PC air landing low system cost.

    Reference:
    [1] Ma Zhongmei, Xu Yinghui and so on. AT91 the series ARM nucleus micro controller structure with develops [M]. Beijing: Beijing University of Aeronautics and Astronautics Publishing house, 2003.
    [2] Jean J.Labrosse. Embedded real-time operating system µ C/OS-Ⅱ(the second edition) [M]. Shao Beibei translates. Beijing: Beijing University of Aeronautics and Astronautics Publishing house, 2003.
    [3] Gary R.Wright, W.Richard Stevens. TCP/IP explains in detail the volume 2: Realizes [M]. Beijing: Mechanical industry publishing house, 2002.

    Share/Save/Bookmark

    Thursday, October 30th, 2008 at 12:57
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3