Vehicle-mounted Ethernet gateway dynamic configuration method and system and vehicle

By establishing a secure communication session between the on-board end and the cloud, dynamically configuring the target PHY port and performing soft reset operations, the problems of high complexity of the on-board Ethernet gateway configuration, strong hardware dependence and insufficient scalability are solved, and efficient and secure gateway configuration management is achieved, supporting the rapid iteration and function upgrade of intelligent connected vehicles.

CN120378308APending Publication Date: 2025-07-25DEEPAL AUTOMOBILE NANJING RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510863003.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing in-vehicle Ethernet gateway has high configuration complexity, strong hardware dependence, long development and debugging cycle, inability to roll back in real time, and insufficient scalability, which limits the development of intelligent connected vehicles.

Method used

By establishing a secure communication session between the on-board end and the cloud, reading the MCU register status information, dynamically configuring the target PHY port, performing soft reset operations, and saving configuration parameters to the non-volatile storage module, the system can be automatically loaded on power.

Benefits of technology

It reduces configuration complexity, shortens debugging cycle, reduces hardware dependence, provides real-time rollback mechanism and scalability, optimizes the OTA upgrade process, and improves configuration flexibility and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378308A_ABST
    Figure CN120378308A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Ethernet gateways, in particular to a vehicle-mounted Ethernet gateway dynamic configuration method and system and a vehicle, and the method comprises the steps: building a secure communication session between an Ethernet gateway of a vehicle-mounted end and a cloud end; reading the state information of an MCU register in the Ethernet gateway, and monitoring the physical layer state of each PHY port of the Ethernet gateway in real time; modifying configuration parameters of a target PHY port, wherein the target PHY port is a PHY port connected with the target ECU; controlling the target PHY port to execute a soft reset operation, and initializing the target PHY port based on the modified configuration parameters; and storing the modified configuration parameters, and automatically loading the modified configuration parameters when the system is powered on. The configuration complexity can be reduced, the debugging period can be shortened, and hardware dependence can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Ethernet gateways, and particularly relates to a method and system for dynamically configuring an in-vehicle Ethernet gateway and a vehicle. Background Art

[0002] In the prior art, as a core component for in-vehicle communication, the functions and performance of an in-vehicle Ethernet gateway are crucial for the development of intelligent connected vehicles. With the increasing complexity of vehicle functions, the amount of data that the Ethernet gateway needs to process has increased sharply, which requires the gateway to have higher flexibility and configurability. However, the current in-vehicle Ethernet gateway technology has the following deficiencies: 1. High configuration complexity: Existing in-vehicle Ethernet gateways usually adopt a static configuration method, which means that every time a configuration update is required, the entire firmware of the gateway needs to be reprogrammed. This full-update method is not only time-consuming but also error-prone in a complex network environment.

[0003] 2. Strong hardware dependence: The gateway configuration in the prior art often depends on physical interface operations, such as configuring through a dedicated debugging interface, which is unrealistic in the mass production environment of vehicles and increases the difficulty and cost of configuration.

[0004] 3. Long development and debugging cycle: Due to the complexity of firmware upgrade, each software iteration or function verification requires a long development and debugging cycle, which severely limits the efficiency of vehicle software R & D.

[0005] 4. Unable to roll back in real time: Once an error occurs during a configuration update, the current gateway technology often does not have an effective rollback mechanism, which may lead to instability of the in-vehicle network and even affect the safety of the entire vehicle.

[0006] 5. Insufficient scalability: It is difficult for a statically configured gateway to be quickly extended and adapted when facing new network architecture requirements or the access of an ECU (Electronic Control Unit), which restricts the upgrade and innovation of the functions of intelligent connected vehicles.

[0007] 6. Dependence on full OTA (Over-the-Air) upgrade: Although some existing technologies can update the gateway software through the OTA method, the entire firmware needs to be pushed, which not only consumes a large amount of network resources but may also cause network interruption during the update process.

[0008] These technical bottlenecks limit the application of in-vehicle Ethernet gateways in the field of intelligent connected vehicles. Especially in the era of software-defined vehicles with rapid iteration and continuous evolution, these problems are particularly prominent.

[0009] Therefore, it is necessary to develop a new method and system for dynamically configuring an in-vehicle Ethernet gateway and a vehicle. Summary of the Invention

[0010] The object of the present invention is to provide a method and system for dynamically configuring a vehicle-mounted Ethernet gateway and a vehicle, which can reduce the configuration complexity, shorten the debugging cycle, and reduce the hardware dependence.

[0011] In a first aspect, a method for dynamically configuring a vehicle-mounted Ethernet gateway according to the present invention includes the following steps: Step of establishing a session: Establish a secure communication session between the Ethernet gateway on the vehicle side and the cloud. Step of collecting status data: Read the status information of the MCU registers in the Ethernet gateway and monitor the physical layer status of each PHY port of the Ethernet gateway in real time. Step of dynamic configuration: Modify the configuration parameters of the target PHY port, where the target PHY port is the PHY port connected to the target ECU. Step of soft reset: Control the target PHY port to perform a soft reset operation and initialize the target PHY port based on the modified configuration parameters. Step of solidifying and loading configuration parameters: Save the modified configuration parameters and automatically load the modified configuration parameters when the system is powered on.

[0012] Optionally, in the step of establishing a session: The cloud and the Ethernet gateway establish a two-way authentication secure session. When the session establishment between the Ethernet gateway and the cloud fails, trigger an error code generation mechanism, write the fault code into the error log in real time, and terminate the configuration process. This method can effectively prevent illegal access and data tampering, ensuring the security of the configuration process.

[0013] Optionally, in the step of collecting status data, the status information of the MCU registers is read through the management data input / output protocol. Reading the status of the MCU registers using the management data input / output protocol ensures the accuracy and integrity of the status information. The management data input / output protocol is a communication protocol for reading and writing PHY registers, which can ensure the accuracy and reliability of data transmission. This method can monitor and collect the status information of the PHY port in real time, providing accurate data support for dynamic configuration.

[0014] Optionally, in the step of collecting status data, it further includes: Verify the collected status information; If the verification passes, then execute the step of dynamic configuration; If the verification fails, the re-reading mechanism is automatically triggered, and when the number of re-reads reaches the preset retry count, the configuration process is terminated. By verifying the collected status information, the integrity and accuracy of the status information are ensured, effectively preventing configuration failures caused by data transmission errors and improving the reliability and success rate of configuration. When the verification fails, the design of automatically triggering the re-reading mechanism and terminating the process when the retry count reaches the preset value enhances the robustness of the system. Even if data reading errors occur occasionally, the system can attempt to recover through the re-reading mechanism instead of crashing or stopping working immediately.

[0015] Optionally, in the dynamic configuration step, modifying the configuration parameters of the target PHY port specifically includes: The Ethernet gateway locks the write permission of the shadow register through the management data input / output protocol; Write the target register address and data to the shadow register step by step; Perform a cyclic redundancy check to verify the integrity of the written data. If the verification passes, trigger the register bank switch, otherwise clear the content in the shadow register; Return the corresponding status code according to whether the write is successful or not. Through the management data input / output protocol and the shadow register, the accurate modification of the configuration parameters of the target PHY port is realized. The shadow register is physically isolated from the working register bank, ensuring that the write process does not affect the current communication, while the cyclic redundancy check guarantees the integrity of the written data.

[0016] Optionally, the soft reset step specifically includes: The MCU of the Ethernet gateway initiates a reset of the PHY chip; The PHY chip maintains clock synchronization through the built-in clock recovery circuit; The PHY chip clears all data in the FIFO buffer; After the reset of the PHY chip is completed, the PHY chip sends a reset completion notification to the MCU through an interrupt signal; The MCU verifies whether the reset operation is successful by checking the reset completion flag bit of the preset register. In this embodiment, through the soft reset operation of the PHY chip, the rapid initialization of the target PHY port is realized. At the same time, the built-in clock recovery circuit ensures the clock synchronization during the reset process. This method can achieve the rapid initialization of the target PHY port, improving the efficiency and success rate of configuration.

[0017] Optionally, in the configuration parameter solidification and loading step, the configuration parameters automatically loaded when the system is powered on are selected by setting the default configuration ID. By setting the default configuration ID, the function of automatically loading the configuration parameters when the system is powered on is realized.

[0018] Optionally, the configuration parameter solidification and loading step further includes: If the initialization of the target PHY port based on the new configuration parameters fails, roll back to the previous version of the configuration parameters, and record the rollback event in the error log at the same time. This method can achieve automatic recovery in case of configuration failure, improving the reliability and success rate of the configuration.

[0019] In a second aspect, a vehicle-mounted Ethernet gateway dynamic configuration system according to the present invention includes a memory and a controller. A computer-readable program is stored in the memory. When the computer-readable program is called by the controller, it can execute the steps of the vehicle-mounted Ethernet gateway dynamic configuration method according to the present invention.

[0020] In a third aspect, a vehicle according to the present invention employs the vehicle-mounted Ethernet gateway dynamic configuration system according to the present invention.

[0021] Advantages of the present invention: 1. Reduce configuration complexity: Through dynamic configuration implementation, only the configuration parameters of the PHY port corresponding to the target ECU are modified, rather than the firmware of the entire gateway, which significantly reduces the configuration complexity. In addition, the configuration parameters are written into the non-volatile storage area, which can avoid full-scale configuration during each startup, thus simplifying the configuration process.

[0022] 2. Reduce hardware dependence: Dynamic configuration no longer depends on physical interface operations, but through steps such as cloud communication establishment, system status collection, and configuration implementation, and uses the TBOX module and vehicle networking module to remotely configure, which reduces the difficulty and cost of hardware operations.

[0023] 3. Shorten the development and debugging cycle: The dynamic configuration mechanism allows the adjustment of PHY port parameters without interrupting the network connection, and the update and iteration of the gateway software can be completed without physical operations or full-scale OTA pushes, which significantly shortens the development and debugging cycle and improves the R & D efficiency.

[0024] 4. Implement a real-time rollback mechanism: The system reload mechanism includes the function of real-time rollback to the historical stable configuration. Once the new configuration fails, it can quickly recover to the previous stable state to ensure the stability of the network and the safety of the vehicle.

[0025] 5. Enhance scalability: Dynamic configuration allows for the rapid expansion and adaptation of the gateway to meet the needs of new network architectures or ECU access, which provides support for the functional upgrade and innovation of intelligent connected vehicles.

[0026] 6. Optimize OTA upgrade: By only updating the configuration parameters of the target ECU instead of the full-scale firmware, it reduces the network resource consumption of OTA upgrade, and also avoids network interruption problems caused by firmware updates.

[0027] In summary, the technical solution of the present invention effectively solves the problems in the prior art, such as high configuration complexity of in-vehicle Ethernet gateways, strong hardware dependence, inability to perform real-time rollback, insufficient scalability, and reliance on full-scale OTA upgrades, through means such as cloud-based remote secure communication, local dynamic configuration, real-time rollback mechanism, non-volatile storage, and multi-version configuration management, providing a more flexible, efficient, and secure management solution for the in-vehicle network of intelligent connected vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is an architecture diagram of the in-vehicle Ethernet gateway dynamic configuration system in an embodiment of the present application; Figure 2 It is a flowchart of the in-vehicle Ethernet gateway dynamic configuration method in an embodiment of the present application; Figure 3 It is a flowchart of modifying the configuration parameters of the target PHY port in an embodiment of the present application; Figure 4 It is a flowchart of the soft reset operation in an embodiment of the present application; Figure 5 It is a principle block diagram of the in-vehicle Ethernet gateway dynamic configuration system in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for explaining the present invention and not for limiting the protection scope of the present invention.

[0030] As Figure 2 shown, in an embodiment of the present application, an in-vehicle Ethernet gateway dynamic configuration method includes the following steps: Session establishment step: Establish a secure communication session between the Ethernet gateway on the vehicle side and the cloud.

[0031] Status data acquisition step: Read the status information of the MCU registers in the Ethernet gateway and real-time monitor the physical layer status of each PHY port of the Ethernet gateway.

[0032] Dynamic configuration step: Modify the configuration parameters of the target PHY port, where the target PHY port is the PHY port connected to the target ECU.

[0033] Soft reset step: Control the target PHY port to perform a soft reset operation and initialize the target PHY port based on the modified configuration parameters.

[0034] Configuration parameter solidification and loading steps: Save the modified configuration parameters and automatically load the modified configuration parameters when the system is powered on.

[0035] In the embodiment of the present application, by establishing a secure Ethernet gateway communication session between the cloud and the vehicle-mounted terminal, the security of the configuration process is ensured, preventing unauthorized access. The real-time monitoring and verification of the status information improve the accuracy and reliability of the configuration. The dynamic configuration mechanism allows the configuration parameters of the PHY port to be adjusted without interrupting the network connection, enhancing the flexibility and adaptability of the vehicle-mounted network. The soft reset and the solidification and loading technology of the configuration parameters not only ensure the correctness of the configuration parameters, but also realize the persistent storage and automatic loading of the configuration parameters, and can maintain the latest configuration state even after the system restarts.

[0036] In a possible embodiment, the cloud establishes a two-way authentication secure session with the Ethernet gateway through the vehicle networking security channel based on the TLS protocol stack (i.e., the Transport Layer Security protocol stack); when the session establishment between the Ethernet gateway and the cloud fails, an error code generation mechanism is triggered to write the fault code into the error log in real time and terminate the configuration process. In particular, after the process is terminated, the fault code is written into the error log in real time. The fault code levels are divided into three layers, namely the L1 communication layer (fault code 0XE100), the L2 protocol layer (fault code 0XE200), and the L3 application layer (fault code 0XE300). This embodiment realizes the secure communication between the vehicle-mounted Ethernet gateway and the cloud through the TLS protocol stack and the vehicle networking security channel, ensuring the secure transmission of the configuration parameters. The TLS protocol stack provides encryption and authentication mechanisms, and the vehicle networking security channel provides a dedicated and secure channel for data transmission. The combination of the two ensures the security of the communication. This method can effectively prevent illegal access and data tampering, ensuring the security of the configuration process.

[0037] In a possible embodiment, the status information of the MCU register is read through the Management Data Input / Output protocol (i.e., the MDIO protocol). Using the MDIO protocol to read the status information of the MCU register ensures the accuracy and integrity of the status information. The MDIO protocol is a communication protocol for reading and writing PHY registers, which can ensure the accuracy and reliability of data transmission. This method can monitor and collect the status information of the PHY port in real time, providing accurate data support for dynamic configuration.

[0038] In a possible embodiment, in the status data acquisition step, it further includes: performing cyclic redundancy check (i.e., CRC-32) on the acquired status data; if the check passes, then execute the dynamic configuration step; if the check fails, then automatically trigger the re-reading mechanism, and when the re-reading times reach the preset retry times (for example: the maximum retry times = 3), terminate the configuration process. By checking the acquired status information, the integrity and accuracy of the status data are ensured, which can effectively prevent configuration failures caused by data transmission errors and improve the reliability and success rate of configuration. When the check fails, the design of automatically triggering the re-reading mechanism and terminating the process when the retry times reach the preset value enhances the robustness of the system. Even if data reading errors occur occasionally, the system can attempt to recover through the re-reading mechanism instead of crashing or stopping working immediately. In a possible embodiment, perform differential configuration on the PHY port corresponding to the target ECU (i.e., electronic control unit), that is, only modify the configuration parameters of the PHY port connected to the target ECU, and the PHY ports of non-target ECUs will maintain the current configuration to ensure business continuity.

[0039] As Figure 3 shown, modify the configuration parameters of the target PHY port, specifically: the Ethernet gateway locks the write permission of the shadow register through the MDIO protocol; stepwise write the target register address and data to the shadow register; perform CRC-32 check to verify the integrity of the written data, if the check passes, then trigger the register bank switch, otherwise clear the content in the shadow register; return the corresponding status code according to whether the write is successful or not. This embodiment realizes the precise modification of the configuration parameters of the target PHY port through the MDIO protocol and the shadow register. The shadow register is physically isolated from the working register bank, ensuring that the writing process does not affect the current communication, and the CRC-32 check guarantees the integrity of the written data. This method can achieve the precise configuration of the target PHY port, improving the efficiency and security of configuration. In other embodiments, data loss problems that may occur during the writing process can also be solved by adding a confirmation mechanism for data writing.

[0040] As Figure 4As shown, in a possible embodiment, the soft reset operation specifically includes: the MCU of the Ethernet gateway initiates a reset of the PHY chip; for example, the MCU writes 1→0 (set→clear) to the reset control register of the PHY chip (such as the Reset bit of BMCR) through the MDIO interface. The PHY chip maintains clock synchronization through a built-in clock recovery circuit; the clock recovery circuit ensures clock synchronization and signal integrity during the reset process of the PHY chip. The PHY chip clears all data in the FIFO (First In First Out) buffer. After the reset of the PHY chip is completed, a reset completion notification is sent to the MCU through an interrupt signal. The MCU verifies whether the reset operation is successful by checking the reset completion flag bit of a preset register. In this embodiment, through the soft reset operation of the PHY chip, the rapid initialization of the target PHY port is achieved. At the same time, the built-in clock recovery circuit ensures clock synchronization during the reset process. This method can achieve the rapid initialization of the target PHY port, improving the efficiency and success rate of configuration.

[0041] In a possible embodiment, the configuration parameters automatically loaded when the system powers on are selected by setting the default configuration ID. By setting the default configuration ID, the function of automatically loading configuration parameters when the system powers on is achieved. Multiple versions of configuration parameters are stored in the non-volatile storage module, and each version has a unique configuration ID. By setting the default configuration ID, the system can automatically load the specified configuration parameters when it powers on. This method can achieve the automatic loading of configuration parameters when the system powers on, improving the startup efficiency and reliability of the system.

[0042] In a possible embodiment, in the steps of configuration parameter solidification and loading, it further includes: if the initialization of the target PHY port based on the new configuration parameters fails, the historically stable configuration parameters are automatically loaded, that is, rolled back to the previous version of the configuration parameters, and at the same time, the rollback event is recorded in the error log. Through the rollback mechanism, automatic recovery in case of configuration failure is achieved. Multiple versions of configuration parameters are stored in the non-volatile storage module. When the initialization of the new configuration parameters fails, the system can automatically roll back to the previous version of the configuration parameters. This method can achieve automatic recovery in case of configuration failure, improving the reliability and success rate of configuration.

[0043] As Figure 5 shown, in the embodiment of the present application, a vehicle-mounted Ethernet gateway dynamic configuration system includes a memory and a controller. When the computer-readable program stored in the memory is called by the controller, it can execute the steps of the vehicle-mounted Ethernet gateway dynamic configuration method in the embodiment of the present application.

[0044] The working process of the vehicle-mounted Ethernet gateway dynamic configuration system and method of the present application is as follows: First, based on the TLS protocol stack, the network dynamic configuration module in the cloud establishes a two-way authentication secure session with the in-vehicle gateway MCU through the vehicle networking secure channel, ensuring the security and integrity of the configuration parameters during transmission. Then, the dynamic configuration module reads the status information of the MCU registers and monitors the physical layer status of each PHY port in real time, providing accurate data support for subsequent dynamic configuration. Next, differential configuration is performed on the PHY port corresponding to the target ECU, and only the configuration parameters of the target port are modified, ensuring the accuracy and efficiency of the configuration. Subsequently, a soft reset operation of the target PHY port is executed, and the port is initialized based on the new configuration parameters, enabling the rapid effectiveness of the configuration parameters. Finally, the verified configuration is solidified into the non-volatile storage module, and the subsequent system power-on automatically loads the persistent configuration, supporting the management and switching of multi-version configuration schemes, improving the startup efficiency and reliability of the system. During the entire working process, this method realizes the dynamic configuration of the in-vehicle Ethernet gateway, improves the efficiency and security of the configuration, and at the same time, by setting the default configuration ID and rollback mechanism, ensures the reliability and success rate of the configuration.

[0045] As Figure 1 shown, it is an architecture diagram of a dynamic configuration system for an in-vehicle Ethernet gateway, including the cloud and the in-vehicle side. The in-vehicle side includes an Ethernet gateway, a TBOX module (i.e., in-vehicle telematics terminal module) connected to the Ethernet gateway, and a non-volatile storage module. Among them, the Ethernet gateway includes an MCU, a PHY chip, a first PHY port, a second PHY port, a third PHY port, and a fourth PHY port, etc. For example: the MCU is connected to the TBOX module through the fourth PHY port, connected to the first ECU through the first PHY port, connected to the second ECU through the second PHY port, and connected to the third ECU through the third PHY port. The cloud includes a vehicle networking module and a gateway dynamic configuration module connected to the vehicle networking module, and the vehicle networking module establishes a communication connection with the TBOX module. The gateway dynamic configuration module in the cloud establishes a secure session with the Ethernet gateway on the in-vehicle side through the vehicle networking module. If the establishment fails, a preset fault code is immediately returned and the process is terminated. After a secure communication session is successfully established between the cloud and the in-vehicle side, the gateway dynamic configuration module reads the complete status information of the registers of the MCU in the Ethernet gateway and monitors the physical layer status of each PHY port in real time. Differential configuration is performed on the PHY port corresponding to the target ECU, specifically: only the configuration parameters of the target PHY port are modified, and the non-target PHY ports maintain the current configuration to ensure the continuity of the service. After the parameter configuration is completed, a soft reset operation of the target PHY port is executed, and the port is initialized based on the new configuration parameters, and real-time rollback to the historical stable configuration is supported. The verified configuration parameters are solidified into the non-volatile storage module, and the subsequent system power-on automatically loads the persistent configuration and supports the management and switching of multi-version configuration schemes.

[0046] In a possible embodiment, the Ethernet gateway integrates a vehicle-grade switch chip, which has physical layer interfaces such as MII (Media Independent Interface), SGMII (Serial Gigabit Media Independent Interface), and 100 / 1000BASE-T1 (100M / 1Gigabit Single Pair Ethernet) for data interaction with other network modules; the switch chip is built-in with an independent management MCU, which can realize the full life cycle management of the PHY state machine and interact with other network modules through the PHY port.

[0047] In a possible embodiment, the TBOX module is used to receive the configuration parameters forwarded by the vehicle networking module, forward the configuration parameters to the Ethernet gateway, and reply the configuration completion information returned by the Ethernet gateway to the vehicle networking module. The vehicle networking module is used to forward the configuration parameters generated by the gateway dynamic configuration module to the TBOX module and return the configuration completion information to the gateway dynamic configuration module. The gateway dynamic configuration module is used to dynamically configure the Ethernet gateway, complete the configuration through the TBOX module and the vehicle networking module, and receive the configuration completion information; in particular, it can read the historical configuration parameters from the non-volatile storage module. The non-volatile storage module is used to store the historical configuration parameters of the gateway dynamic configuration module, and can quickly start the switch chip to complete the network configuration when powered on.

[0048] The following takes the example of modifying the drive current of the PHY port connected to the target ECU during the test (operation: write data (value: 0x63) to the PHY register (address: 0x1A) of the target ECU) to further illustrate this method: First, the gateway dynamic configuration module first establishes a two-way authentication security session with the Ethernet gateway. The cloud converts the configuration parameters (REGADDR (register address): 0X1A, REGDATA (register data): 0X63) into an HTTP message (Hypertext Transfer Protocol message) and sends it to the vehicle networking module. The vehicle networking module converts the HTTP message into an MQTT (Message Queuing Telemetry Transport Protocol) message and sends it to the TBOX module on the vehicle side.

[0049] Secondly, the TBOX module obtains the configuration parameters in the MQTT message, adds the configuration parameters to the SOME / IP (Service-Oriented Middleware over IP) message to form a new SOME / IP message (inter-process communication message for service-oriented extensible middleware based on IP), and then sends it to the Ethernet gateway through the PHY port.

[0050] Thirdly, the MCU of the Ethernet gateway obtains the configuration parameters (REGADDR: 0X1A, REGDATA: 0X63) read from the SOME / IP message field and performs PHY register hot patching, that is, performs differential configuration for the PHY port corresponding to the target ECU. Specifically: The MCU of the Ethernet gateway locks the write permission of the shadow register through the MDIO protocol (write REG_LOCK (register clear) = 0xA5); controls the actual operating status of the current PHY port (such as rate, drive current, equalization parameters, etc.). The shadow register is used to receive new configuration parameters and is physically isolated from the working register group to ensure that the writing process does not affect the current communication. The MCU of the Ethernet gateway writes to the shadow register 0x9A step by step through the MDIO protocol (first write REGADDR: 0X1A and then write REGDATA: 0x63); the MCU of the Ethernet gateway performs CRC-32 check (command 0x1F[5:0]). If the CRC-32 check passes, the MCU register triggers a register group switch (write basic mode control register BMCR

[15] =1), switches the register group. After the switch is completed, the PHY chip sends an interrupt signal to the MCU, indicating that the write is successful at this time; if the CRC-32 check fails, the MCU of the Ethernet gateway clears the shadow register through the MDIO protocol (write REG_CLEAR = 0xFF).

[0051] Then, according to whether the write is successful or not, a corresponding status code is returned. If the write is successful, 0X00 is returned, the modified configuration parameters are saved, and the modified configuration parameters are automatically loaded when the system is powered on. If the write fails, the error code 0XE1 is directly returned.

[0052] Finally, the MCU sends a SOMEIP response message with the return status to the TBOX module. The TBOX module replies the message to the gateway dynamic configuration module through the vehicle networking module.

[0053] In the embodiment of the present application, a vehicle adopts the in-vehicle Ethernet gateway dynamic configuration system as described above.

[0054] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.

Claims

1. A method for dynamically configuring a vehicle-mounted Ethernet gateway, characterized in that, It includes the following steps: Session establishment step: Establish a secure communication session between the in-vehicle Ethernet gateway and the cloud; Status data collection step: Read the status information of the MCU registers in the Ethernet gateway and monitor the physical layer status of each PHY port of the Ethernet gateway in real time; Dynamic configuration step: Modify the configuration parameters of the target PHY port, where the target PHY port is the PHY port connected to the target ECU; Soft reset step: Control the target PHY port to perform a soft reset operation and initialize the target PHY port based on the modified configuration parameters; Configuration parameter solidification and loading step: Save the modified configuration parameters and automatically load the modified configuration parameters when the system is powered on.

2. The dynamic configuration method of the in-vehicle Ethernet gateway according to claim 1, wherein In the session establishment step: The cloud and the Ethernet gateway establish a two-way authentication secure session; When the session establishment between the Ethernet gateway and the cloud fails, trigger an error code generation mechanism, write the fault code to the error log in real time, and terminate the configuration process.

3. The method for dynamically configuring an in-vehicle Ethernet gateway according to claim 1, characterized in that In the status data collection step, read the status information of the MCU registers through the management data input / output protocol.

4. The method for dynamically configuring an in-vehicle Ethernet gateway according to claim 1, characterized in that, In the status data collection step, it further includes: Verify the collected status information; If the verification passes, execute the dynamic configuration step; If the verification fails, automatically trigger a reread mechanism, and when the reread count reaches the preset retry count, terminate the configuration process.

5. The method for dynamically configuring an in-vehicle Ethernet gateway according to claim 1, characterized in that In the dynamic configuration step, modify the configuration parameters of the target PHY port, specifically: The Ethernet gateway locks the write permission of the shadow register through the management data input / output protocol; Step by step write the target register address and data to the shadow register; Execute a cyclic redundancy check to verify the integrity of the written data. If the verification passes, trigger a register bank switch, otherwise clear the content in the shadow register; Return the corresponding status code according to whether the write is successful or not.

6. The method for dynamically configuring an in-vehicle Ethernet gateway according to claim 1, wherein The soft reset step specifically includes: The MCU of the Ethernet gateway initiates a PHY chip reset; The PHY chip maintains clock synchronization through the built-in clock recovery circuit; The PHY chip clears all data in the FIFO cache; After the PHY chip completes the reset, send a reset completion notification to the MCU through an interrupt signal; The MCU verifies whether the reset operation is successful by checking the reset completion flag bit of the preset register.

7. The method for dynamically configuring an in-vehicle Ethernet gateway according to claim 1, wherein In the configuration parameter solidification and loading step, select the configuration parameters automatically loaded when the system is powered on by setting the default configuration ID.

8. The vehicle-mounted Ethernet gateway dynamic configuration method according to claim 1, wherein In the configuration parameter solidification and loading step, it further includes: If the initialization of the target PHY port based on the new configuration parameters fails, roll back to the previous version of the configuration parameters, and record the rollback event in the error log at the same time.

9. An in-vehicle Ethernet gateway dynamic configuration system, including a memory and a controller. The memory stores a computer-readable program. When the computer-readable program is called by the controller, it can execute the steps of the in-vehicle Ethernet gateway dynamic configuration method described in any one of claims 1 to 8.

10. A vehicle, characterized in that: Adopt the in-vehicle Ethernet gateway dynamic configuration system described in claim 9.

Citation Information

Cited By

  • Industrial camera system and method of controlling the same

    CN122513670A

  • Industrial camera system and method of controlling the same

    CN122513670B