An embedded multi-channel network controller
By using W5500 Ethernet chip and MCU chip in the Ethernet communication system, the hardware implements the Ethernet protocol stack. The MCU only needs to process application layer data, solving the problems of complex hardware circuits and long data processing time in the existing system, and realizing real-time processing and information exchange of Ethernet data.
Patent Information
- Application Number
- CN202411916165.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-01
AI Technical Summary
In the existing Ethernet communication system, the MCU chip needs to process complex Ethernet packets, resulting in complex hardware circuit design, long data processing time, and easy to lose packets when multiple ports send data packets at the same time.
Using W5500 Ethernet chip and MCU chip, the W5500 chip hardware implements the protocols of the MAC layer, IP layer, and TCP/UDP layer. The MCU only needs to process application layer data, simplify hardware circuit design and reduce software programming difficulty.
Real-time processing and information exchange of Ethernet data is realized, hardware circuit design and software programming are simplified, MCU workload is reduced, and the system's real-time and reliability are improved.
Smart Images

Figure CN119739087A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of embedded control systems, in particular to an embedded multi-channel network controller. Background Art
[0002] Ethernet communication has fast transmission speed, with 10Mbit / s, 100Mbit / s, 1000Mbit / s, etc., strong networking ability, and wide application. Ethernet communication is defined according to the five-layer protocol, which is divided into application layer, transport layer, network layer, data link layer, and physical layer from top to bottom. At present, most Ethernet chips, such as DM9000A, only have data link layer (MAC) protocols, but no physical layer (PHY), network layer (IP), and transport layer (TCP / UDP) protocols. If Ethernet communication is to be carried out; even if high-end MCU chip control is used, such as STM32F4XX chip, the hardware must also be connected to the chip that implements the PHY layer protocol, such as LAN8720A, etc., with many connection pins, and complex control timing of receiving and sending. In terms of software, it is also necessary to transplant the network layer (IP layer) protocol and the transport layer (TCP / UDP) protocol, such as the LwIP protocol, to achieve high-speed Ethernet communication, which is complicated to use. Even when the LwIP protocol is ported, in actual programming, you still need to know and be able to use all the defined functions from the network interface layer to the transport layer (TCP / UDP), which greatly increases the difficulty of use and increases the workload of the MCU chip.
[0003] That is, the existing technology adopts the form of MCU+DM9000A+LAN8720A+RJ45 (HR911105A) to design a network controller. This method has complex hardware circuit design. The MCU can only process the Ethernet data packets of DM9000A in time-sharing mode. When multiple ports send data packets at the same time, it is easy to lose data packets. When processing Ethernet data packets, the MCU must encapsulate and unpack the functions from the MAC layer to the transport layer. The data processing is complex, the response time is long, and the probability of data packet loss is high. Summary of the invention
[0004] The purpose of the present invention is to provide an embedded multi-channel network controller, which adopts a W5500 Ethernet chip and an MCU chip. The W5500 Ethernet chip hardware realizes the protocols of the MAC layer, the IP layer (network layer), and the TCP / UDP (transport layer). The MCU only needs to process the data of the application layer. Therefore, the hardware circuit design is simple, the workload of software design is greatly reduced, and the network data exchange speed between different ports is fast, which meets the real-time requirements of information processing of the multi-channel network controller.
[0005] The technical solution for achieving the purpose of the present invention is: an embedded multi-channel network controller includes an MCU chip, a W5500 Ethernet chip, and an RJ45 network port with a transformer; the MCU chip, the W5500 Ethernet chip and the RJ45 network port with a transformer form a network controller with six channels or more, which is used to realize the functions of real-time processing of Ethernet data and information exchange.
[0006] Furthermore, the MCU chip includes an STM32F429ZGT6 chip and an STM32F103ZET6 chip, which are used to process Ethernet data of one channel or several channels in parallel, analyze and process, and then forward to another or several specific Ethernet ports to realize real-time processing of Ethernet data.
[0007] Furthermore, the W5500 Ethernet chip integrates a full hardware TCP / IP protocol stack, uses hardware logic gate circuits to implement the network layer and transport layer protocols of the TCP / IP protocol stack, and integrates the Ethernet data link layer and physical layer; thereby all network data traffic processing work is transferred to the W5500 Ethernet chip.
[0008] Furthermore, the network controller also includes a power module, a reset module, and a program download module; the power module is connected to the MCU chip and other modules to supply power to all modules and chips;
[0009] The program download module is connected to the STM32F429ZGT6 chip and the STM32F103ZET6 chip respectively, and is used to download programs for the two MCU chips;
[0010] The reset module is connected to the STM32F429ZGT6 chip and the STM32F103ZET6 chip respectively, and is used to reset the two MCU chips and prevent the program from running away or freezing, and execute the reset operation to restore normal functions.
[0011] Furthermore, the network controller also includes an LED light module and a serial port TFT LCD screen module; the LED light module is respectively connected to the power module and the W5500 Ethernet chip, and the lead pins of the serial port TFT LCD screen module are connected to the chip STM32F429ZGT6; the LED light module displays the working status of the W5500 Ethernet chip and the working status of the power module, and the serial port TFT LCD screen module is used to display the interface, menu and operation results generated by keyboard operation.
[0012] Furthermore, the network controller also includes: a matrix keyboard module, a USB to serial port module, and an RS232 serial port level conversion module;
[0013] The USB to serial port module is connected to the STM32F429ZGT6 chip and the STM32F103ZET6 chip respectively, converting the TTL serial port signal of the MCU chip STM32F429ZGT6 or STM32F103ZET6 into a USB signal, and the reverse operation;
[0014] The RS232 serial port level conversion module is connected to the STM32F103ZET6 chip to convert the TTL serial port signals of the two MCU chips into RS232 serial port signals, which is convenient for connecting devices that work using RS232 serial port levels.
[0015] Furthermore, the STM32F429ZGT6 chip has 6 SPI ports, and the STM32F103ZET6 has 3 SPI ports. In addition to meeting the requirements of simultaneously connecting and controlling 8 W5500 chips, one of the SPI ports is connected to a Flash chip with SPI function, so that the multi-port network controller has high-speed memory read and write functions.
[0016] The embedded multi-channel network controller according to claim 2 is characterized in that the network controller also includes: a matrix keyboard module, and the corresponding pins of the matrix keyboard module are connected to the STM32F429ZGT6 chip to realize the interoperability of the human-machine interface.
[0017] Compared with the prior art, the present invention has the following significant advantages:
[0018] (1) The W5500 Ethernet chip in the network controller disclosed in the present invention implements the protocols of the MAC layer, IP layer (network layer), and TCP / UDP (transport layer) in hardware, and only needs to consider the user definition of the application layer, which greatly reduces the difficulty of software programming.
[0019] (2) The network controller disclosed in the present invention uses two MCU chips to connect six W5500 Ethernet chips, and each W5500 chip only needs to be connected to an RJ45 network port (HR911105A) with a voltage conversion function, so that multi-channel Ethernet communication can be achieved, and the hardware circuit design is simplified.
[0020] (3) The network controller disclosed in the present invention does not need to transplant complex Ethernet communication protocols in software. It only needs to correctly set the SPI communication mode and configure the working mode of the W5500 chip to realize complex Ethernet communication.
[0021] (4) In the network controller of the present invention, since the MCU only needs to process the program of the user application layer, when multiple ports send Ethernet data packets at the same time, the MCU response time is short and the real-time performance of interrupt processing is strong. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 Multi-channel network controller module connection diagram;
[0023] Figure 2 STM32F429 and W5500 hardware connection diagram;
[0024] Figure 3 STM32F103 and W5500 hardware connection diagram;
[0025] Figure 4 RMII interface connection;
[0026] Figure 5 W5500 Ethernet chip internal hardware protocol stack; DETAILED DESCRIPTION
[0027] The following is combined with Figure 1-5 The following examples are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0028] An embedded multi-channel network controller disclosed in the present invention forms a 6-channel network controller through an MCU chip (STM32F429ZGT6+STM32F103ZET6), a W5500 Ethernet chip and an RJ45 network port with a network transformer HR911105A. The network controller can also form a small router and network switch, which can forward data information of ports 1 to 6 to any other port, or vice versa.
[0029] The full hardware TCP / IP protocol stack integrated in the W5500 Ethernet chip is completely independent of the main control chip, which can reduce the load of the main chip and eliminate the need to transplant the cumbersome TCP / IP protocol stack, making it easy to quickly implement network updates of products. In order to meet the needs of functional expansion, the network controller also reserves two network ports to form a network controller with up to 8 channels.
[0030] The embedded multi-channel network controller specifically includes: MCU chip, W5500 Ethernet chip, RJ45 network port with transformer, power module, reset module, program download module, LED light module, serial port TFT LCD screen module, 4x4 matrix keyboard module, USB to serial port module, RS232 serial port level conversion module, etc.
[0031] MCU chips include: STM32F429ZGT6 chip and STM32F103ZET6 chip, STM32F429ZGT6 chip and STM32F103ZET6 chip can process Ethernet data of one channel or several channels in parallel, analyze and process, and then forward to another or several specific Ethernet ports, so as to realize real-time processing of Ethernet data and thus realize the role of network controller. At the same time, the multi-channel network controller can also realize the function of a small router or Ethernet switch.
[0032] The W5500 Ethernet chip and the RJ45 network port with transformer realize the network communication function, and under the control of the two MCU chips, realize the exchange and processing of Ethernet data of different network ports, and realize the function of the network controller.
[0033] The W5500 Ethernet chip implements the construction of the MAC layer, IP layer (network layer), and TCP / UDP (transport layer) protocols in hardware, and only the protocol definition of the application layer needs to be considered.
[0034] The power module is connected to the MCU chip (core board) and other modules to provide power for all modules and chips.
[0035] The program download module is connected to the MCU chips STM32F429ZGT6 and STM32F103ZET6 respectively, and is used to download programs for the two MCU chips.
[0036] The reset module is connected to the MCU chips STM32F429ZGT6 and STM32F103ZET6 respectively. The reset module includes a watchdog chip MAX690AESA, which resets the two MCU chips and prevents the program from running away or freezing, and executes a reset operation to restore normal functions.
[0037] The LED light module is connected to the power module and the W5500 Ethernet chip respectively. The lead pins of the 4.3-inch serial port TFT LCD screen module are connected to the chip STM32F429ZGT6. The LED light module displays the working status of the W5500 Ethernet chip and the working status of the power module, and the serial port TFT LCD screen module is used to display the interface, menu and operation results generated by keyboard operation.
[0038] The corresponding pins of the 4x4 matrix keyboard module (key module) are connected to the chip STM32F429ZGT6 to achieve the interoperability of the human-machine interface.
[0039] The USB to serial port module is connected to the MCU chip STM32F429ZGT6 and STM32F103ZET6 respectively, and can convert the TTL serial port signal of the MCU chip STM32F429ZGT6 or STM32F103ZET6 into a USB signal, and vice versa, so as to facilitate connection with the host computer via a USB cable to print or display relevant information.
[0040] The RS232 serial port level conversion module is connected to the MCU chip STM32F103ZET6, and converts the TTL serial port signals of the two MCU chips into RS232 serial port signals, which is convenient for connecting devices that work using RS232 serial port levels.
[0041] The 4.3-inch serial port TFT LCD screen module (serial port screen) used has the following technical parameters: the main chip controlling the capacitive touch screen TFT-LCD screen is LT269, SRAM is 256kB, FLASH is 508KB, resolution is 480*272, and image format is RGB565. The display interface is 8-bit parallel port, 8080 timing. The interface connecting the serial port TFT LCD screen module (serial port screen) and the MCU chip is a 4-pin pin header socket, with a pin spacing of 2.57mm and a UART serial port. The serial port TFT LCD screen module (serial port screen) comes with SPIFLASH with a capacity of 16MB.
[0042] The STM32F429ZGT6 chip has the following functions: the chip integrates FPU and DSP instructions, and has 256KB SRAM, 1024KB FLASH, 12 16-bit timers, 2 32-bit timers, 2 DMA controllers (16 channels in total), 6 SPIs, 2 full-duplex I2Ss, 1 SAI, 3 IICs, 8 serial ports, 2 USBs (support HOST / SLAVE), 2 CANs, 3 12-bit ADCs, 2 12-bit DACs, 1 RTC (with calendar function), 1 SDIO interface, 1 FMC interface, 1 TFTLCD controller (LTDC), 1 10 / 100M Ethernet MAC controller, 1 camera interface, 1 hardware random number generator, and 140 general IO ports.
[0043] The STM32F103ZET6 chip has the following functions: the chip has 64KB SRAM, 512KB FLASH, 2 basic timers, 4 general timers, 2 advanced timers, 2 DMA controllers (12 channels in total), 3 SPIs, 2 IICs, 5 serial ports, 1 USB, 1 CAN, 3 12-bit ADCs, 1 12-bit DAC, 1 SDIO interface, 1 FSMC interface and 112 general IO ports.
[0044] The W5500 Ethernet chip realizes the function of transmitting data to the Ethernet. When making an Ethernet connection, you only need to use simple Socket programming to connect the module to the network. After powering on the system, initialize the W5500 Ethernet chip. For different network devices, the network parameters are different. Therefore, you need to write the void Load_Net_Parameters(void) function in the program file. The function is to set the network parameters, including gateway, subnet mask, MAC address, development board IP address, development board port number, cloud server IP address, cloud server port number and working mode.
[0045] As an implementation method of this embodiment, the W5500 Ethernet chip is a high-performance Ethernet interface chip launched by WIZnet, which integrates a full hardware TCP / IP protocol stack. It uses hardware logic gate circuits to implement the network layer and transport layer protocols of the TCP / IP protocol stack (including TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE and other protocols), integrates 10 / 100M Ethernet data link layer and physical layer, supports 8 independent ports (Socket) to communicate simultaneously, and 32KB on-chip RAM as a data transceiver buffer, so that the processing of network data traffic is completely transferred to the W5500 Ethernet chip integrated hardware. The W5500 Ethernet chip integrates MAC layer and PHY (physical layer) layer technology. The W5500 Ethernet chip uses the SPI Flash chip port to communicate with the MCU chip, so that the MCU chip only needs to control the W5500 Ethernet chip to complete the complex task of Ethernet communication, which improves the real-time and reliability of system processing.
[0046] The W5500 Ethernet chip supports SPI Flash chip communication rate up to 80MHz. In addition, the W5500 Ethernet chip provides network wake-up and power saving mode for customers to choose, thereby reducing system power consumption. The W5500 Ethernet chip will be awakened when it receives a magic packet in the original Ethernet format.
[0047] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several improvements without departing from the principles of the present invention, and these improvements should also be regarded as within the protection scope of the present invention.
Claims
1. An embedded multi-channel network controller, characterized in that: It includes an MCU chip, a W5500 Ethernet chip, and an RJ45 network port with a transformer; the MCU chip, the W5500 Ethernet chip, and the RJ45 network port with a transformer form a network controller with six or more channels to realize the real-time processing of Ethernet data and the information exchange function.
2. The embedded multi-channel network controller according to claim 1, characterized in that: The MCU chip includes an STM32F429ZGT6 chip and an STM32F103ZET6 chip, which are used to process Ethernet data of one channel or several channels in parallel, analyze and process, and then forward to another or several specific Ethernet ports to realize real-time processing of Ethernet data.
3. The embedded multi-channel network controller according to claim 2, characterized in that: The W5500 Ethernet chip integrates a full hardware TCP / IP protocol stack, uses hardware logic gate circuits to implement the network layer and transport layer protocols of the TCP / IP protocol stack, and integrates the Ethernet data link layer and physical layer; thereby all network data traffic processing work is transferred to the W5500 Ethernet chip.
4. The embedded multi-channel network controller according to claim 3, characterized in that: The network controller also includes a power module, a reset module, and a program download module; the power module is connected to the MCU chip and other modules to provide power to all modules and chips; The program download module is connected to the STM32F429ZGT6 chip and the STM32F103ZET6 chip respectively, and is used to download programs for the two MCU chips; The reset module is connected to the STM32F429ZGT6 chip and the STM32F103ZET6 chip respectively, and is used to reset the two MCU chips and prevent the program from running away or freezing, and to perform the reset operation to restore normal functions.
5. The embedded multi-channel network controller according to claim 4, characterized in that: The network controller also includes an LED light module and a serial port TFT LCD screen module; the LED light module is connected to a power module and a W5500 Ethernet chip respectively, and the lead pins of the serial port TFT LCD screen module are connected to a chip STM32F429ZGT6; The LED light module displays the working status of the W5500 Ethernet chip and the working status of the power module. The serial port TFT LCD screen module is used to display the interface, menu and operation results generated by keyboard operation.
6. The embedded multi-channel network controller according to claim 4, characterized in that: The network controller also includes: a matrix keyboard module, a USB to serial port module, and an RS232 serial port level conversion module; The USB to serial port module is connected to the STM32F429ZGT6 chip and the STM32F103ZET6 chip respectively, converting the TTL serial port signal of the MCU chip STM32F429ZGT6 or STM32F103ZET6 into a USB signal, and the reverse operation; The RS232 serial port level conversion module is connected to the STM32F103ZET6 chip to convert the TTL serial port signals of the two MCU chips into RS232 serial port signals, which is convenient for connecting devices that work using RS232 serial port levels.
7. The embedded multi-channel network controller according to claim 2, characterized in that: The STM32F429ZGT6 chip has 6 SPI ports, and the STM32F103ZET6 has 3 SPI ports. In addition to meeting the requirements of simultaneously connecting and controlling 8 W5500 chips, one SPI port is connected to a Flash chip with SPI function to enable the multi-port network controller to have high-speed memory read and write functions.
8. The embedded multi-channel network controller according to claim 2, characterized in that: The network controller also includes: a matrix keyboard module, and corresponding pins of the matrix keyboard module are connected to the STM32F429ZGT6 chip to achieve the interoperability of the human-machine interface.