Share this

Ethernet Interface Design of S3C2440 Embedded System Based on DM9000AE

2026-04-06 05:11:54 · · #1
Abstract : This paper introduces an Ethernet interface circuit design scheme for an embedded system based on the Samsung ARM9 chip S3C2440. The industrial-grade Ethernet controller DM9000AE was used to successfully realize network data exchange in the embedded system. After focusing on the fundamentals of the network interface circuit, the paper provides a detailed analysis of the DM9000AE driver and registry entries in the Windows CE system control software. Keywords: Embedded System; S3C2440; Ethernet Interface; DM9000; Windows CE [align=center]A Design of Network Interface of S3C2440 Embedded System Based on DM9000 Wang xiao-wei, Xia jian-gang[/align] Abstract: This paper illustrates the design of a network interface based on the S3C2440 embedded system. It successfully realizes the embedded system network connection using the industrial Ethernet controller DM9000AE. It particularly indicates the network interface circuit and analyzes the system control software, including the Ethernet chip DM9000AE driver and registers of Windows CE. Key words: Embedded System; S3C2440; Network Interface; DM9000; Windows CE 1. Introduction With the development of microelectronics and computer technology, embedded technology has seen widespread development and has become a direction for the development of modern industrial control, communication, and consumer products. Ethernet's superior performance in real-time operation, reliable transmission, and standardized operation, along with its ease of installation, simple maintenance, and lack of communication distance limitations, has garnered widespread attention from researchers in the monitoring and control fields both domestically and internationally, demonstrating significant advantages in practical applications. This paper proposes a design scheme for an Ethernet interface based on the DM9000AE network interface chip and a 32-bit Samsung ARM9 processor S3C2440 embedded system. A network driver was developed and ported to the Windows CE operating system to enable network access. 2. DM9000AE Working Principle 2.1 Main Characteristics and Overall Structure of DM9000 The DM9000AE is a 10/100M Fast Ethernet control chip developed by DEVICOM (Taiwan Lianjie International). The DM9000AE implements the functions of the Ethernet Media Access Layer (MAC) and Physical Layer (PHY), including MAC data frame assembly/disassembly and transmission/reception, address recognition, CRC encoding/verification, MLT-3 encoder, receive noise suppression, output pulse shaping, timeout retransmission, link integrity testing, signal polarity detection and correction, etc. The internal logic structure of the DM9000AE is shown in Figure 1. The DM9000AE has the following main features: ① 48-pin LQFP package, small size with fewer pins; ② Supports 8/16-bit data bus; ③ Suitable for 10Base-T and 100Base-T, 10/100M adaptive, adapting to different network speed requirements; ④ Built-in 16KB SRAM for transmit/receive buffering, reducing the speed requirements of the main processor; ⑤ Supports IP/TCP/UDP acceleration, reducing CPU load and improving network speed; ⑥ Supports back pressure half-duplex flow control, compatible with IEEE802.3u, and supports IEEE802.3x full-duplex flow control; ⑦ 20ns response time, low power consumption of 2.5V/3.3V. [align=center] Figure 1 Internal logic structure of DM9000AE[/align] 2.2 Working principle The DM9000AE can be connected to a microprocessor via an 8-bit or 16-bit bus and can operate in simplex or full-duplex modes as needed. Upon system power-up, the processor configures the DM9000AE's internal Network Control Register (NCR) and Interrupt Register (ISR) via the bus, completing the DM9000AE initialization. The DM9000A then enters a data transmission/reception wait state. When the processor needs to send a data frame to the Ethernet, it first packages the data into UDP or IP packets and sends them byte-by-byte through an 8-bit or 16-bit bus to the DM9000A's data transmission buffer. Then, it fills the corresponding registers in the DM9000AE with information such as the data length, and sends an enable command. The DM9000AE then performs MAC framing of the buffered data and data frame information and sends it out. When the DM9000AE receives Ethernet data from an external network, it first checks the validity of the data frame. If the frame header flag is incorrect or a CRC check error exists, the frame is discarded; otherwise, the data frame is buffered in internal RAM, and the processor is notified via an interrupt flag. Upon receiving the interrupt, the processor processes the data in the DM9000AE's receive RAM. The DM9000AE automatically detects the network connection status and sets the internal data transmission and reception rate to 10Mb/s or 100Mb/s according to the network speed. At the same time, the DM9000AE can also change the direction of the data transmission and reception pins according to the RJ45 interface connection method. Therefore, the system can communicate normally regardless of whether the external network cable is in a peer-to-peer or crossover manner. 3. Network Interface Hardware Circuit Design In embedded systems, adding an Ethernet interface is usually achieved by the following two methods. The first method is to use an embedded processor with an Ethernet interface. This method requires the embedded processor to have a general network interface. Usually, this type of processor is designed for network applications and exchanges data between the processor and the network through an internal bus. The other method is to use an embedded processor + network card chip structure. This method has no special requirements for the embedded processor. It is only necessary to connect the Ethernet chip to the bus of the embedded processor. This method is highly versatile and not limited by the processor. However, the processor and the network exchange data through an external bus [3]. This design uses the method of expanding the Ethernet interface on the S3C2440 general embedded microprocessor, which is the second method. Figure 2 shows the connection structure between the S3C2440A processor and the DM9000AE. The DM9000AE is connected to the processor via a bus, and its interrupt is connected to the processor's external interrupt. [align=center] Figure 2 Connection structure between the S3C2440A processor and the DM9000AE[/align] The S3C2440A microprocessor is a low-power, highly integrated 16/32-bit RISC microprocessor based on the ARM920T core, designed by Samsung Semiconductor for handheld devices and various multi-purpose applications. It adopts a five-stage pipeline and Harvard architecture and is packaged in a 289-pin FBGA package. The S3C2440, while incorporating the ARM920T core, adds abundant peripheral resources, mainly including one LCD controller; three-channel UART; four-channel DMA; four 16-bit timers/counters with PWM function and one 16-bit internal timer supporting external clock sources; eight-channel 10-bit ADC; touchscreen, IIC bus, IIS bus, SD card and MMC card, and camera interface; 130-bit general-purpose I/O ports and 24-bit external interrupt sources. The connection of the DM9000AE Ethernet interface circuit is shown in Figure 3. The processor uses the chip select line DM_CS and the address line BADDR to connect to the CS and CMD pins of the DM9000AE chip, respectively. The S3C2440's data lines BDATA[15:0] are connected to the DM9000AE's data lines SD[15:0] to achieve data transmission between the DM9000 and S3C2440. The S3C2440's DM_IOR pin is connected to the DM9000AE's read pin IOR#, and the DM_IOW pin is connected to the DM9000AE's write pin IOW#. Simultaneously, the DM9000AE occupies the S3C2440's interrupt pin EINT7, enabling the S3C2440 to respond to the DM9000AE's interrupts. The DM9000AE is connected to the network via the receive signal lines RX+ and RX- and the transmit signal lines TX+ and TX-, which are connected to the Ethernet crystal connector RJ_45 through the isolation transformer E-2023. The main function of the isolation transformer is to isolate the embedded system from external lines, prevent interference and damage to components, and enable live plugging and unplugging. [align=center] Figure 3 Ethernet Interface Circuit[/align] 4. Software Design of Network Interface Module This system uses the Windows CE operating system, which has powerful network support capabilities. Windows CE supports all Internet network protocols, including TCP/IP. Windows CE network drivers all conform to NDIS (Network Driver Interface Specification). NDIS provides two abstraction layers to connect the network driver and the protocol stack. A schematic diagram of the NDIS model is shown in Figure 4. [align=center] Figure 4 Schematic diagram of the NDIS model[/align] The DM9000AE driver under Windows CE is written based on this model and compiled into a dynamic link library, existing as a DLL file in user mode. The entry function is DriverEntry(). The workflow of the DM9000 driver is shown in Figure 5. The NdisMInitializeWrapper() function notifies NDIS that a small port network card is being initialized; this function is provided in ndis.dll. Then, the NDIS40_MINIPORT_CHARACTERISTICS structure variable is initialized, mainly by setting up some callback functions (MiniportInitialize(), MiniportReset(), MiniportInterruptHandler(), MiniportISRHandler(), MiniportQueryInformation(), MiniportSetInformation(), MiniportSend()). Next, the NDIS40_MINIPORT_CHARACTERISTICS structure is registered with the NDIS system using the NdisMRegisterMiniport() function. Following that is MiniportInitialize(), which initializes the NIC_DRIVER_OBJECT class and calls its EDriverInitialize() function, which comprehensively performs all the initialization operations for the dm9000. All initialization operations for the DM9000 are implemented in the dm9000.cpp file, primarily through the DeviceEntry() function. The DeviceEntry() function does only one thing: it creates a new instance of the C_DM9000 class and returns it. Then, the C_DM9000 instance performs a series of initialization operations on the DM9000AE using DeviceSetDefaultSettings(); DeviceSetEepromFormat(); DeviceRetriveConfigurations(hconfig); EDeviceValidateConfigurations(), etc. Then, NIC_DRIVER_OBJECT points to DriverStart(). In DriverStart(), C_DM9000 performs a very simple but crucial operation: it starts an interrupt in DeviceEnableInterrupt(). What follows is an endless cycle of waiting, receiving, and sending; the DM9000 then begins working. [align=center] Figure 5: DM9000 Driver Workflow[/align] After completing the driver, we also need to configure the DM9000 registry entries in the Platform.reg file as follows: [HKEY_LOCAL_MACHINE\Comm\DM9000] "DisplayName"="Crystal DM9000 ISA Ethernet Controller" "Group"="NDIS" "ImagePath"="DM9000.DLL" [HKEY_LOCAL_MACHINE\Comm\DM9000\Linkage] "Route"=multi_sz:"DM90001" [HKEY_LOCAL_MACHINE\Comm\DM90001\Parms] "BusNumber"=dword:0 "BusType"=dword:0 "InterruptNumber"=dword:3E "IoBaseAddress"=dword:D3000000 "RxMode"="PIO" "NetworkAddress"="00-01-33-33-33-33" [HKEY_LOCAL_MACHINE\Comm\DM90001\Parms\TcpIp] "EnableDHCP"=dword:0 "DefaultGateway"="192.168.126.1" "UseZeroBroadcast"=dword:0 "IpAddress"="192.168.126.100" "Subnetmask"="255.255.255.0" "DNS"="192.168.126.1" [HKEY_LOCAL_MACHINE\Comm\Tcpip\Linkage] "Bind"=multi_sz: "ppp", "DM90001" The designed module is connected to the local area network, and a MAC address and IP address are assigned. Using the PC's ping program, a response is received, indicating that ARP, IP, and ICMP protocols are normal. Using a self-written Windows-based application, a connection request is sent to the module, and the module returns the correct response information, indicating that the TCP protocol is normal. 5. Conclusion This article details the network interface design scheme of the embedded system based on the Samsung S3C2440 ARM9 chip. In practical applications, the system runs stably and can easily realize the network interconnection of embedded systems. Due to the use of the high-performance industrial-grade Ethernet controller DM9000AE, the system communication is fast and reliable and has high real-time performance. In today's increasingly popular Ethernet, this scheme can intelligently transform those traditional embedded devices that do not have network communication capabilities. It is also suitable for the development of new intelligent instruments and meters and industrial automation system equipment, and has a wide range of application prospects. References : [1] SAMSUNG PRODUCT OVERVIEW S3C2440X technical manual. [2] Zhou Ligong et al. ARM microcontroller basics and practice [M]. Beijing: Beijing University of Aeronautics and Astronautics Press [3] Yu Ming, Fan Shurui, Zeng Xiangye. ARM9 embedded system design and development tutorial. 2006, 218-223 [4] DM9000AE data sheet. DAVICOM. http://www.davicom.com/ Author Biographies: Wang Xiaowei (1983–), female, from Chongqing, Master's student, School of Electrical and Information Engineering, Sichuan University. Research interests: Signal and information processing, embedded system design. Xia Jiangang (1962–), male, from Jiangsu, Professor, School of Electrical and Information Engineering, Sichuan University, Master's supervisor. Research interests: Signal and information processing, embedded system design, etc. Contact Information: Wang Xiaowei, Class of 2005, Signal and Information Processing, School of Electrical and Information Engineering, Sichuan University, 610065, China. E-mail: [email protected]
Read next

CATDOLL 128CM Dolly (TPE Body with Hard Silicone Head)

Height: 128cm Weight: 19kg Shoulder Width: 30cm Bust/Waist/Hip: 57/52/63cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22