Detailed design of embedded control implementation of Ethernet based on ARM processor

1 Introduction

With the development of microelectronic technology and computer technology, embedded technology has obtained a broad space for development. Especially since the 1990s, the development and popularization of embedded technology has become more eye-catching, and it has become a modern industrial control and communication category. And the development direction of consumer products, in the communication field, many network devices such as VOIP, WirelessLAN, ADSL, etc. contain a large number of embedded technology components. Radio and television are developing towards the digital trend, and DVB and DAB technologies are gradually being promoted. As a result, personal consumer products, such as PDAs, digital ARM Ethernet application cameras, MP3 players and other products are inseparable from the support of embedded technology. Embedded technology is also used in products such as ATM, video phones, and automobile ABS. There are a large number of applications. In addition, embedded technology can be seen everywhere in the military field, such as individual information terminals, portable security machines, battlefield command systems, etc. It can be said that embedded systems have penetrated into people’s daily arm Ethernet applications Life and even the national security defense system.

Detailed design of embedded control implementation of Ethernet based on ARM processor

The core of embedded technology development is the development of ARM Ethernet application of embedded micro-control chip technology. Today's micro-control chip functions are becoming stronger and more diverse, such as MIPS, PowerPC, X86, ARM, PIC, etc., but these Embedded processors are limited by price, compatibility and other factors, and their application conditions are different. MIPS and PowerPC processors have higher market positioning and are not suitable for cost-sensitive applications. The x86 series processors must be compatible with 8068, 286 , 386, etc. to maintain compatibility and use the same instruction set, thereby limiting the improvement of CPU system performance. The most widely used ARM Ethernet in the embedded field today is the embedded processor based on the ARM architecture, which occupies 80 More than% of the 32-bit embedded processor market share, from the beginning of its development, ARM has launched a series of products such as ARM7, ARM9, ARM9E, ARM10, SecurCore and Intel's Strong ARM and Xscale. Although these different versions of the processor cores are in the same line, the application background of ARM Ethernet applications is different. For example, the ARM7 series processors are designed for applications with more demanding power consumption and cost-effectiveness; while the arm9 series processors are mainly used in the next A generation of wireless devices; SecurCore is customized for security devices.

The development of technology must be combined with practical applications to reflect the value of technological advancement in ARM Ethernet applications. The development of embedded systems is just as fast as the day, and the implementation of embedded control of Ethernet based on ARM core embedded microprocessors is also in full swing at home and abroad The development of Ethernet, its excellent performance in real-time operation, reliable transmission, standard uniformity, and its advantages such as easy installation, simple maintenance, and no limitation of communication distance, have been studied by many arm Ethernet application monitoring and control fields at home and abroad The staff pays extensive attention and shows significant advantages in practical applications.

2 ARM processor system arm Ethernet application structure

So far, the ARM system has defined a total of 6 versions, with version numbers 1-6. From version 1 to version 6, the instruction set function of the ARM system has been continuously enhanced. At the same time, there are some variants in each version, which define the Version instruction set of different functions in ARM Ethernet applications. Such as support Thumb instruction set, support long multiplication instruction set, incremental DSP instruction set, JAVA accelerator, media function extension instruction, etc. The instructions of these variants are generated for different applications. The various processors in the ARM processor series have different implementation technologies and different performances. The application occasions are also different, which will inevitably lead to applications. The reusability of the program code, for example: a piece of code that runs well on the ARM processor of SAMSUNG, if the processor is replaced by the ARM processor of ATMEL, can it also work stably and reliably for ARM Ethernet applications? ? The answer is that as long as the processors support the same arm system version, the application software based on them will be compatible.

ARM processors currently include the following series of processors ARM Ethernet application products: ARM7 series, ARM9 series, ARM9E series, ARM10 series, SecurCore series, Intel's Xscale and StrongARM, ARM9 series processors are newly launched and have relatively stable performance One of the series, including ARM920T, ART922T, ARM940T three types, suitable for different markets, the S3C2410X embedded processor selected for this topic is based on arm920T.

The main features of ARM9 series processors are as follows: support 32-bit ARM instruction set arm Ethernet application and 16-bit Thumb instruction set; 5-stage pipeline; single 32-bit AMBA bus interface; MMU supports Windows CE. Palm OS, Symbian OS, Linux, etc., MPU supports real-time operating systems, including Vxworks; unified data Cache and instruction Cache [2].

In the arm storage system, the memory management unit (MMU) is used to realize the mapping from the virtual address of the arm Ethernet application to the actual physical address. Using MMU, the address of SDRAM can be completely mapped to a continuous address space starting at 0x0, and the FLASH or ROM that originally occupied this space can be mapped to other non-conflicting storage space locations. For example, the address of FLASH is from 0x0000 0000~0x00ff ffff, and the address range of SDRAM is 0x3000 0000~Ox3lff ffff for ARM Ethernet application, then the SDRAM address can be mapped to 0x0000 0000~Oxlfff ffff and the address of FLASH can be mapped to Ox9000 0000~ Ox90ffffff (the address space here is free and not occupied). After the mapping is completed, if the processor is abnormal, assuming it is still an IRQ interrupt, the PC pointer points to the address at Oxl8, and this time the PC actually reads the instruction from the physical address at Ox3000 0018. Through the mapping of MMU, the program can be completely run in SDRAM. In actual applications. It is possible to allocate two discontinuous physical address spaces to SDRAM. In the operating system, it is accustomed to use arm Ethernet applications to concatenate the SDRAM space to facilitate memory management, and the operating system kernel can be easily allocated when the application program applies for a large block of memory. MMU can realize the mapping of discontinuous physical address space into continuous virtual address space. The operating system kernel or some more critical codes generally do not want to be accessed by user applications. The access authority of the address space can be controlled through the MMU, thereby protecting these codes from being destroyed.

The realization process of MMU is actually a process of looking up the table and mapping ARM Ethernet application. Establishing a page table (translate table) is an indispensable step to realize the MMU function. The page table is located in the memory of the system, and each entry of the page table corresponds to a mapping from a virtual address to a physical address. The length of each item is the length of a word (in ARM, the length of a word is defined as 4B). In addition to completing the arm Ethernet application function of mapping the virtual address to the physical address, the page table entry also defines the access authority and buffer characteristics.

MMU mapping is divided into two types, first-level page table conversion and second-level page table conversion. The difference between the two is the difference in the size of the transformed address space. The first level page table conversion supports the mapping of 1 M storage space, and the second level can support the mapping of 64 kB, 4 kB and 1 kB address spaces.

3 Selection of embedded processor

A system must rely on the hardware platform. When designing an embedded system, it is necessary to consider the overall design of the hardware platform from the perspective of global arm Ethernet applications and future development. Simple function realization cannot be the ultimate goal of the design. In the design process, the following aspects need to be considered:

3.1 Chip selection

It is necessary to choose a chip with strong versatility, complete function, stable and reliable ARM Ethernet application. Many of today’s processor chips are based on SoC structures, with many built-in general-purpose interface controllers, which are simple to use and can greatly reduce costs; to choose representative chips, some chips on the market are only sold as transitional products. Based on the principle and market verification, when the function of the chip tends to be stable and the market demand is greater, a representative chip is usually launched. For designers, it is necessary to know what model is representative to ensure reliable supply. Different application occasions require different arm Ethernet applications for the level of the chip, so choose chips that meet higher standards as much as possible to ensure the stability and reliability of the entire system [4].

3.2 The circuit design must have the ability to deal with emergencies and be easy to expand the functional arm Ethernet application

When the system is running, it often encounters unpredictable external events, which requires the system to have the ability to deal with emergencies. For example, use watchdog and soft reset measures to ensure that the system can restart operation after encountering unexpected events. At the same time, the system design should also consider the ability of hardware expansion and upgrade. For example, when designing the memory structure, the circuit structure should be considered compatible with different capacities of memory and even arm Ethernet application chips from different manufacturers; such as using programmable logic device CPLD Or in the case of FPGA, the macro unit must have a surplus.

3.3 Replace hardware with software

The software upgrade of the embedded system is easier than the hardware upgrade, and in the development process, software debugging generally does not cause physical damage to the hardware. On the premise of satisfying real-time performance, replace hardware with software as much as possible. It can not only reduce the cost of hardware arm Ethernet application circuit and the size of the circuit board, but also facilitate debugging, reduce the possibility of hardware damage, and further reduce costs.

3.4 Layout

Embedded processors working at a frequency of several hundred megabits are already common in arm Ethernet applications. When designing high-frequency circuit boards, pay attention to the layout of the circuit and the direction of the signal lines. High-frequency signals should be as far away as possible from others Signal, minimize interference such as ground bounce and crosstalk, as well as electromagnetic interference and thermal design in the circuit.

At present, the world's major chip manufacturers have launched their own ARM chips, with different application backgrounds and their own characteristics. ARM7 and ARM9 are two series of ARM chips that are widely used and mature in technology in ARM processors. In comparison, the ARM9 series processors are superior in terms of processing speed, peripheral interfaces, and application scope. Intel's Xscale series processors have outstanding performance in all aspects, but their higher positioning is not suitable for most applications. The AT91RM9200 processor produced by ATMEL is positioned for industrial process control, and its peripheral interface is not enough for arm Ethernet applications.

This text chooses SS3C2410X of SAMSUNG Company as the embedded processor of the system. This is an embedded processor with ARM920T as the core, which is low-cost for low-end applications. The chip has a high processing speed, through the internal phase-locked loop, the highest can be 200

Run under the system clock of MHz. And, S3C2410X has extremely low power consumption. The core voltage is 1.8 V power supply, and the peripheral I/O port uses 3.3

The voltage of V has three low-power control methods, and it can even turn off all functions in the CPU except for the wake-up logic, which greatly reduces power consumption. Compared with other ARM chips, S3C2410X integrates more peripheral interfaces on the chip. For example: external memory controller; LCD, DMA, USB1.1, SD, MMC card controller, UART, SPI interface; I2C bus controller and IIS bus controller, PWM timer, watchdog, 117 external I/ O port, 24 external interrupt sources, ADC and touch screen interface, real-time clock and on-chip PLL clock arm Ethernet application generation, etc. Use the integrated interface, can expand the function conveniently.

Another advantage of S3C2410X is its compact size. Embedded applications hope that the hardware size is as small as possible. S3C2410X adopts a uBGA package. The size of the entire chip is only 14 mm×14 mm, which is equivalent to the size of a normal human thumb nail. Although it integrates so many functions in such a small size, its price is equivalent to that of an ordinary processor. Considering from various aspects, S3C2410X has extremely high cost performance and application value, and is easy to develop and function expansion, so it is very suitable as the central processor of embedded systems.

4 Ethernet module implementation

S3C2410X itself does not have a network controller, and an independent Ethernet controller needs to be added to realize Ethernet access. The Ethernet controller chip is CS8900a of CIRRUS Company. He is a true single-chip, full-duplex Ethernet solution. It integrates all logic functions from the MAC layer to the PHY layer, including all analog and digital circuits necessary for an Ethernet circuit. The chip can automatically check the connection status, perform carrier sensing, conflict detection, error retransmission, automatic filling, CRC check and other functions separately. For the processor, the access and control of the network chip is like a section of memory arm Ethernet application space or several I/O spaces allocated. A 4 kB on-chip memory is integrated to temporarily save the physical frames sent and received and the values ​​of internal registers, thereby reducing the burden on the CPU and simplifying the complexity of the software. CS8900A also supports software reset. When some unexpected events occur, the chip function is disrupted and network communication is blocked. The network communication function can be restarted through software reset to ensure the robustness of network communication.

The schematic connection between Ethernet and CPU is shown in Figure 2. CS8900A and CPU can communicate in arm Ethernet applications using DMA, I/O and Memory. In order to improve the access speed with the processor, the CS8900A is designed as Memory mode in the picture. The CS8900A reset default mode is I/O mode, although it can be configured as Memory mode through E2PROM, but in consideration of cost reduction, the circuit is designed as I/O, Memory compatible connection mode, and it is set to Memory mode by software. Compared with the access cycle of S3C2410X, the response time of CS8900A is longer than its access cycle, which is a slow device. The access cycle of the processor can be extended through the nWait signal. Use the global reset signal as the chip's reset signal, and use the high level to trigger an interrupt to notify the CPU of the occurrence of an event.

5 Conclusion

With the increase of signal frequency in circuits, the design of high-speed circuit boards in embedded systems has become a matter of great concern to ignorant personnel. Therefore, in the system design process, it is necessary to consider signal integrity problems caused by high signal speed, incorrect layout of termination components, or incorrect layout of high-speed signals. These problems may cause the system to output incorrect data and the circuit cannot Normal work or even not work at all.

The system designed in this paper fully considers routing skills. External power supply and DC-DC conversion output, Lichuan 22μF electrolytic capacitor and O.01μF ceramic capacitor filter; at each power pin of the chip, use the nearest 0.1μF filter capacitor; CPU chip selection, reading and writing, Interrupt and other signal lines are connected in series with 22Ω resistors to achieve the purpose of impedance matching; the data line, address line, etc., are processed with equal length; the clock line is protected by ground protection; the online inspection function of the EDA tool is used to avoid artificial loops The production and so on. After taking these measures, the entire system has been running continuously for hundreds of hours in different environments without any failure, which is enough to prove its good stability and reliability.

510 Battery

Suizhou simi intelligent technology development co., LTD , https://www.msmsmart.com

Posted on