Share this

Research on Embedded Network Communication Based on S3C44B0X

2026-04-06 06:22:31 · · #1
Abstract: The S3C44B0X, a microprocessor based on the ARM7TDMI core, has been widely used. This paper uses this processor and the widely available uClinux operating system to implement network communication between the CPU processor and the RTL8019AS Ethernet controller. This provides valuable reference for the application of network communication engineering in embedded devices. Keywords: Embedded system; S3C44B0X; ARM 1. Introduction The ARM7TDMI is a high-performance, low-power RISC processor core. The S3C44B0X, using this core, is a chip that integrates many peripherals and offers a very high performance-to-price ratio, making it very suitable for embedded products. Among many embedded operating systems, uClinux, due to its open-source nature, compatibility with various CPUs and hardware platforms, and powerful network functions, is widely used in low- to mid-range embedded devices. This paper uses the S3C44B0X processor based on the ARM core and the widely available uClinux operating system to implement network communication between the CPU processor and the RTL8019AS Ethernet controller. 2. Design Ideas and Implementation of Ethernet Interface Circuit From a hardware perspective, the Ethernet interface circuit mainly consists of two parts: the MAC controller and the physical layer interface (PHY). The RTL8019AS is an Ethernet controller produced by Readlted in Taiwan. It supports IEEE 802.3; supports 8-bit or 16-bit data buses; it integrates two RAMs: one 16KB, with addresses 0x4000~0x7FFF; and one 32-byte, with addresses 0x0000~0x001F. The 16KB RAM is used as a buffer for transmitting and receiving data. Generally, 0x4000~0x46FF is used as the transmitting buffer, and 0x4700~0x7FFF is used as the receiving buffer. In full-duplex mode, the transmission and reception can reach 10Mbps simultaneously; it supports 10Base5, 10Base2, and 10BaseT, and can automatically detect the connected medium. The RTL8019AS has three interface modes with the host: (1) Patch mode. This mode is compatible with earlier network controllers. The port base address and interrupt port of RTL8019AS are determined by switches or jumpers. Jumper mode is simple, but resource configuration is troublesome. (2) PnP mode is compatible with Microsoft's PnP protocol. In this mode, the port base address and interrupt port of RTL8019AS are set by EEPROM93C46, but PnP chip identification is required, which is inconvenient for interfacing with ARM. (3) RT mode In order to avoid the PnP chip identification and configuration process in PnP mode, Readlted provides RT mode. In RT mode, the port base address and interrupt port of RTL8019AS are also determined by EEPROM93C46. S3C4510B has an embedded Ethernet controller that supports MII and BDI interfaces and can provide 10M/100Mbps Ethernet access in half-duplex or full-duplex mode. In half-duplex mode, the controller supports CSMA/CD protocol, and in full-duplex mode, it supports IEEE802.3MAC control layer protocol. Therefore, the S3C4510B internally includes Ethernet MAC control, but does not provide a physical layer interface. An external physical layer chip is required to provide an Ethernet access channel. The physical layer interface (PHY) handles the encoding and decoding of all input and output data. 10Base-T uses Manchester encoding; 100Base-X uses 4B/5B encoding; and 100Base-T4 uses 8B/6T encoding. When receiving data, the MII receives the raw data packet with a CRC checksum from prefix to end. When sending data, the MII adds a prefix and a CRC checksum to the data packet. The MAC layer also generates padding data and sends it to the PHY. Figure 1 shows the Ethernet interface circuit. The network circuit is shown in Figure 1. The S3C44B0X uses the nGCS2 and data/address bus to access the internal registers and buffers of the rtl8019. The TS6121 is an isolation transformer, and the RJ45 is the network interface. 3. Protocol Analysis The layers of the TCP/IP network protocol stack under Linux are interconnected through a series of software layers that implement the Internet address family. INET sockets manage the transmission endpoints for IP-based protocols TCP and UDP. UDP (User Datagram Protocol) is a connectionless protocol, while TCP (Transmission Control Protocol) is a reliable end-to-end protocol. When transmitting UDP packets, Linux neither knows nor cares whether they have safely reached their destination. TCP is different. A number needs to be added to both ends of a TCP connection to ensure that the transmitted data is received correctly. At the IP layer, Internet protocol code is implemented. This code adds an IP header to the transmitted data and knows how to send the incoming IP packets to the TCP or UDP protocol. Below the IP layer are network devices that support all Linux network operations. The hierarchical structure is shown in Figure 2. Figure 2 Hierarchical Structure 4 Socket Programming There are two common socket types: stream sockets and datagram sockets. The difference between the two is that the former corresponds to TCP services and the latter corresponds to UDP services. The main functions include: (1) socket function Int socket( int family, int type, int protocol ) family specifies the protocol family; type is the socket type; protocol is usually set to 0; the function returns a small non-negative integer value on success. (2) The connect function Int connect( int sockfd, const struct sockaddr* servaddr, socklen_t addrlen ) Sockfd is the value returned by the socket function, servaddr is a pointer to a socket address structure, and addrlen is the size of the structure. The structure must contain the server's IP address and port number. (3) The bind function Int bind( int sockfd, const struct sockaddr* myaddr, socklen_t addrlen ) myaddr is a pointer to a protocol-specific address structure, and addrlen is the length of the address structure. For TCP, the bind function can specify a port and an IP address. Both can be specified, or neither can be specified. (4) The listen function Int listen( int sockfd, int backlog ) backlog specifies the maximum number of connections that the kernel should queue for this socket. The listen function converts an unconnected socket into a passive socket, indicating that the kernel should accept connection requests to this socket. The TCP state transition call to the listen function causes the socket to transition from the CLOSED state to the LISEN state. (5) The accept function int accept( int sockfd, struct sockaddr* cliaddr, socklen_t* addrlen ) cliaddr is the returned client protocol address, and addrlen is the length of the socket address structure. The accept function is called by the TCP server and returns the next completed connection from the head of the completed connection queue. If the completed connection queue is empty, the process sleeps. The system flowchart is shown in Figure 3: Figure 3 System Flowchart 5. Conclusion This paper combines theory with practice, mainly introducing the construction of the network interface hardware circuit of RTL8019AS and S3C44B0X, and implementing the software program design under the embedded system, which has been verified to be correct. It has important reference significance for network communication applications in embedded devices, especially in Linux systems. The innovations of this paper are: 1. The hardware circuit uses RTL8019 as the network interface and implements the network card program design under Linux, and the verification is correct. 2. The software system is modular and has good portability and scalability. References: [1] Li Weiwei. Application of image-based virtual reality technology in driving simulator [J]. Microcomputer Information. 2006, No. 9-2. P230-232. [2] Jiang Moqi, Lin Wei. Protel2004 schematic and PCB design examples [M]. Machinery Industry Press, 2005. [3] Wu Minghui. ARM-based embedded system development and application [M]. People's Posts and Telecommunications Press, 2004.
Read next

CATDOLL CATDOLL 115CM Nanako (TPE Body with Hard Silicone Head)

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22