Communication configuration method and device of radar conversion device, MCU and medium

By writing a state machine in the MCU of the radar conversion device, the automatic communication configuration between radar and vehicle domain control is realized, which solves the problems of low efficiency and high cost of manual configuration in the prior art, improves the pairing efficiency and maintenance efficiency, and reduces the Labor costs.

CN119324934APending Publication Date: 2025-01-17BEIJING TRUNK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411376135.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

In the prior art, the communication configuration of radar and vehicle domain control requires manual switching, resulting in low efficiency, high cost and poor maintenance.

Method used

By writing a preset state machine in the MCU of the radar conversion device, using the domain control and the state recognition signal of the conversion device, the master-slave mode and speed negotiation are automatically identified to achieve communication pairing and maintenance without manual participation.

Benefits of technology

It improves the pairing and maintenance efficiency between radar and domain control, reduces labor costs, simplifies the configuration process, and improves the reliability and performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119324934A_ABST
    Figure CN119324934A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a communication configuration method and device of a radar conversion device, an MCU and a medium. The method comprises the following steps: receiving a first response message of vehicle domain control; executing a first state machine, wherein the first state machine is used for driving physical layer equipment to perform physical layer configuration according to the communication configuration information defined by the first state machine; receiving a second response message of the vehicle domain controller, wherein the second response message is a message which is sent by the vehicle domain controller and is used for indicating that the current configuration negotiation is successful or failed after the configuration of the physical layer equipment is completed; and when the second response message is negotiation success, stopping executing the next state machine, so that the vehicle domain controller and the radar perform data communication based on the communication configuration information corresponding to the first state machine. Through the method, automatic communication configuration between the laser radar and the domain control can be realized without manual participation, and the technical effects of improving the efficiency and reducing the cost are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of autonomous driving technology, and in particular to a communication configuration method, device, MCU and medium for a radar conversion device. Background Art

[0002] In the field of autonomous driving, radar plays an important role. For example, LiDAR (Light Detection and Ranging) is a sensor technology that measures the distance of objects and generates three-dimensional environmental images by emitting laser pulses and receiving reflected signals. It provides autonomous driving vehicles with data such as target distance, direction, height, speed, posture, and even shape.

[0003] The laser radar transmits data with the vehicle domain control through the Ethernet interface. The interfaces of the laser radar mainly include vehicle-mounted gigabit and industrial gigabit. When the domain control is the vehicle-mounted interface and the laser radar is the industrial Ethernet interface, it needs to be used through an Ethernet conversion box. Normal communication between the vehicle domain control and the laser radar requires correct master-slave mode settings and speed negotiation. Currently, the master-slave mode and speed selection need to be realized through manual switches on the Ethernet conversion box, which has high labor costs and low configuration efficiency. Especially after the laser radar is wired and connected, the maintainability and operability issues are more prominent. Summary of the invention

[0004] The embodiments of the present application provide a communication configuration method, device, MCU and medium for a radar conversion device, so as to solve the problems of low efficiency and high cost of manual communication configuration required during radar conversion.

[0005] According to a first aspect of an embodiment of the present application, a communication configuration method for a radar conversion device is provided, the conversion device is used for radar interface conversion of a vehicle domain control, the conversion device includes a microcontroller MCU and a physical layer device electrically connected to the MCU, a plurality of preset state machines are written into the MCU, each state machine is used to define different communication configuration information between the domain control and the radar, and the communication configuration information includes a master-slave mode configuration and / or a communication speed configuration; the method is applied to the MCU, including: receiving a first response message from the vehicle domain control, the response message is sent by the vehicle domain control to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain control; executing a first state machine, the first state machine is used to drive the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine; receiving a second response message from the vehicle domain control, the second response message is a message sent by the vehicle domain control after the configuration of the physical layer device is completed to indicate the success or failure of the current configuration negotiation; when the second response message is a successful negotiation, stopping the execution of the next state machine, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine.

[0006] Through the above technical solution, the status identification signals of the domain control and conversion device and the pre-defined state machine are utilized, and the state machine is written into the MCU to execute the state machine, so as to realize automatic identification of master-slave mode and speed negotiation. It can be successfully paired with the lidar at the other end without human intervention, which improves the pairing efficiency and maintenance efficiency, reduces labor costs, and brings a better experience to users.

[0007] In one embodiment, the method also includes: when the second response message indicates a negotiation failure, executing the next state machine based on a polling manner, so that the physical layer device performs physical layer configuration according to the communication configuration information defined by the next state machine, until the second response message indicates a negotiation success or all state machines are executed.

[0008] Through the above technical solution, the polling execution mode of the state machine can be used to achieve rapid negotiation of the master-slave mode and the communication speed, thereby improving the configuration efficiency.

[0009] In one embodiment, the MCU includes a flash memory, and the multiple state machines are stored in the flash memory; the method also includes: when receiving a first response message from the vehicle domain control, selecting a predetermined initial state machine from the flash memory as the first state machine to be executed.

[0010] Through the above technical solution, the state machine is written into the flash memory. Even if the device is powered off, the data stored therein will not be lost, which can ensure that the state of the state machine is retained after the device is restarted in situations such as vehicle shutdown.

[0011] In one embodiment, the method further includes: acquiring state machine update data, and updating a flash image of a flash memory based on the state machine update data to update the state machine currently written in the flash memory.

[0012] Through the above technical solution, the state machine can be updated in a timely manner, and the state machine can be updated while the MCU is running without restarting, thereby improving the communication configuration efficiency and flexibility between the domain control and the lidar.

[0013] In one embodiment, driving the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine includes: managing the channel through a serial management interface SMI and configuring the physical layer device according to the communication configuration information defined by the first state machine.

[0014] Through the above technical solution, the SMI management channel is used to configure the physical layer device to forced 100M slave mode according to the communication configuration information defined by the first state machine, which further ensures the configuration stability, consistency and reliability of PHY and simplifies the initialization and maintenance of the configuration process.

[0015] In one embodiment, the method further includes: when all state machines are executed and the second response message indicates a negotiation failure, a fault prompt message is sent to the vehicle domain controller via a universal asynchronous receiver / transmitter (UART) serial port, wherein the fault prompt includes at least one of the following: a network cable failure, a lidar hardware failure, and a domain controller hardware failure.

[0016] Through the above technical solution, when all state machines are executed and negotiation fails, the UART serial port is used to send a fault prompt message to the vehicle domain controller, so that the domain controller can achieve rapid fault diagnosis, improve reliability, simplify maintenance and enhance monitoring, thereby improving the overall performance and safety of the vehicle domain control system.

[0017] In one embodiment, the communication configuration information includes at least one of the following: configuring the radar to be in 100M slave mode, 100M master mode, 1G slave mode, and 1G master mode; and / or the second response message uses a high or low level signal to indicate whether the current configuration negotiation succeeds or fails.

[0018] Through the above technical solution, it is possible to provide a variety of state machine adaptations for domain control and radar, and the high and low level forms are easier for MCU to read, thereby improving the efficiency of communication configuration.

[0019] According to a second aspect of an embodiment of the present application, a communication configuration device of a radar conversion device is provided, the conversion device is used for radar interface conversion of a vehicle domain control, the conversion device includes a microcontroller MCU and a physical layer device electrically connected to the MCU, a plurality of preset state machines are written into the MCU, each state machine is used to define different communication configuration information between the domain control and the radar, the communication configuration information includes master-slave mode configuration and / or communication speed configuration; the device is applied to the MCU, including:

[0020] A receiving module, which is configured to receive a first response message from a vehicle domain controller, wherein the response message is sent by the vehicle domain controller to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain controller;

[0021] a state machine execution module, configured to execute a first state machine, wherein the first state machine is used to drive the physical layer device to perform physical layer configuration according to communication configuration information defined by the first state machine;

[0022] The receiving module is further configured to receive a second response message from the vehicle domain controller, where the second response message is a message sent by the vehicle domain controller after the configuration of the physical layer device is completed, indicating whether the current configuration negotiation succeeds or fails;

[0023] A configuration completion module is configured to stop executing the next state machine when the second response message indicates that the negotiation is successful, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine.

[0024] In one implementation, the communication configuration device of the radar conversion device may be used to execute any possible implementation of the first aspect described above.

[0025] According to a third aspect of an embodiment of the present application, there is provided an MCU, including: a memory and a processor;

[0026] The memory stores computer-executable instructions;

[0027] The processor executes the computer-executable instructions stored in the memory, so that the MCU executes the communication configuration method for the radar conversion device provided in any one of the first aspects above.

[0028] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the communication configuration method of a radar conversion device provided in any one of the first aspects above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A possible system architecture diagram provided for an embodiment of the present application;

[0030] Figure 2 One of the flowcharts of a communication configuration method for a radar conversion device provided in an embodiment of the present application;

[0031] Figure 3a This is one of the example diagrams of the second response message in the embodiment of the present application;

[0032] Figure 3b This is the second example diagram of the second response message in the embodiment of the present application;

[0033] Figure 4 A second flowchart of a communication configuration method for a radar conversion device provided in an embodiment of the present application;

[0034] Figure 5 A flow chart of another communication configuration method for a radar conversion device provided in an embodiment of the present application;

[0035] Figure 6 A schematic diagram of the structure of a communication configuration device for a radar conversion device provided in an embodiment of the present application;

[0036] Figure 7 A schematic diagram of the structure of an MCU provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The laser radar measures the position, speed, shape, contour, etc. of the object being measured, and transmits the measurement data to the domain controller through the Ethernet interface. When the laser radar is an industrial Ethernet interface, it needs to be used through an Ethernet conversion box. For the domain controller and the laser radar to communicate normally, communication configuration is required, such as the correct master-slave mode setting and speed negotiation. The current communication configuration method is to realize the master-slave mode and speed selection through manual switches. The speed modes include forced gigabit and forced 100 megabits through auto-negotiation, which all require manual participation. Especially after the laser radar is wired and connected, the switch needs to be manually operated, which will consume a lot of time and manpower investment, and the maintainability and operability are poor.

[0038] In view of this, an embodiment of the present application provides a communication configuration method, device, MCU and medium for a radar conversion device. The conversion device is used for radar interface conversion of a vehicle domain control, and includes a microcontroller MCU and a physical layer device electrically connected to the MCU. A plurality of preset state machines are written in the MCU, and each state machine is used to define different communication configuration information between the domain control and the radar. The communication configuration information includes a master-slave mode configuration and / or a communication speed configuration. The MCU receives a first response message from the vehicle domain control, which is sent by the vehicle domain control to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain control. The first state machine is executed, and the first state machine is used to drive the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine. The second response message of the vehicle domain control is received, and the second response message is a message sent by the vehicle domain control after the configuration of the physical layer device is completed to indicate the success or failure of the current configuration negotiation. When the second response message is a successful negotiation, the execution of the next state machine is stopped, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine. During this process, through the status identification signals of the domain control and conversion devices and the pre-defined state machine, by writing the state machine into the MCU and executing the state machine, automatic identification of master-slave mode and speed negotiation can be achieved. Without human intervention, it can be successfully paired with the lidar at the other end, improving pairing efficiency and maintenance efficiency, reducing labor costs, and bringing a better experience to users.

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below in conjunction with the drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals throughout represent the same or similar parts or parts with the same or similar functions. The described embodiments are part of the embodiments of the present application, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0040] Figure 1 A possible system architecture diagram provided for an embodiment of the present application is as follows: Figure 1As shown, it includes a vehicle domain control 110, an Ethernet conversion box (ie, a conversion device) 120 and a laser radar 130, and each device can be connected to each other through a wired or wireless network. Optionally, the conversion device 120 includes a microcontroller unit (MCU) 121 and a physical layer device (PHY) 122. The MCU121 and the PHY122 are connected through a serial management interface (Serial Management Interface, SMI) for configuring and managing the PHY122. In this scenario, the number of PHY122 can be two, and the two PHYs are connected through a serial gigabit media independent interface (Serial GigabitMedia Independent Interface, SGMII) to achieve high-speed data conversion and transmission. Among them, the PHY122 connected to the MCU121 is also connected to the domain control 110 through a T1 cable, and the other PHY122 is connected to the laser radar 130 through a 1000BASE-T cable. In addition, MCU121 is connected to the domain controller 110 in communication, and can obtain the response message (Acknowledgment, ACK) of the domain controller, such as starting the communication configuration according to the response message of the domain controller, and can transmit a Universal Asynchronous Receiver Transmitter (UART) message to the domain controller 110, such as prompting a configuration failure. Optionally, MCU121 includes a flash memory (FLASH) for writing pre-defined state machines, which respectively define different communication configuration information. MCU121 can realize the master-slave mode and communication speed fast negotiation and configuration between the domain controller 110 and the laser radar 130 by reading and executing these state machines in FLASH.

[0041] It can be understood that the PHY device refers to the device responsible for the physical layer function in the communication system. The physical layer is the first layer in the Open Systems Interconnection (OSI) model, which is mainly responsible for the physical transmission of data, including signal generation, transmission, reception and decoding. In the conversion device, the role of the PHY device can ensure that radar data can be reliably transmitted and received through different physical media. For example, if radar data needs to be transmitted through industrial Ethernet, the PHY layer will be responsible for converting the radar signal into an industrial Ethernet signal and ensuring the reliability and integrity of the signal transmission on the industrial Ethernet medium.

[0042] In the related art, in the communication configuration process of the master-slave mode and speed of the conversion device, the master-slave mode is configured by setting the corresponding bit of the register (such as BasicControl Register) that controls the master-slave mode through a manual switch method (such as setting the initial configuration of the device through a physical pin), such as setting the corresponding bit in the register, or clearing the corresponding bit in the register (such as the Auto-Negotiation Enable bit), and setting the communication speed (for example, 10Mbps, 100Mbps, 1Gbps, etc.) through the corresponding bit (such as the Speed ​​Selection bit) in the same or related register. In the embodiment of the present application, the master-slave mode and speed negotiation can be automatically identified through the state identification signal of the domain control and the conversion box and the pre-defined state machine. The state machine executes quickly, which can greatly improve the pairing efficiency between the radar and the domain control and reduce labor costs.

[0043] The above briefly describes the scenario diagram of the present application. The communication configuration method, device, MCU and medium of the radar conversion device provided by the present application are described in detail below in combination with specific embodiments.

[0044] Please refer to Figure 2 , Figure 2 A communication configuration method for a radar conversion device is provided in an embodiment of the present application. The conversion device is used for radar interface conversion of a vehicle domain control. The conversion device includes a microcontroller MCU and a physical layer device PHY electrically connected to the MCU. Multiple preset state machines are written into the MCU, and each state machine is used to define different communication configuration information between the domain control and the radar. The communication configuration information includes master-slave mode configuration and / or communication speed configuration; the method is applied to the MCU.

[0045] Exemplarily, the conversion device can be an Ethernet conversion box for converting vehicle-mounted Ethernet to industrial Ethernet, which can realize the conversion between vehicle-mounted gigabit and industrial gigabit. When the laser radar is an industrial gigabit interface, since the domain control only supports vehicle-mounted gigabit, it needs to be connected to the domain control through the conversion device. In some examples, the conversion device can also support the access of laser radars with different interface types at the same time. The conversion device includes a vehicle-mounted Ethernet interface and an industrial Ethernet interface. After the laser radar is inserted into the corresponding interface, the MCU in the conversion device switches to the corresponding data channel by identifying the interface type inserted into the laser radar, thereby realizing the access and communication of laser radars with different interface types.

[0046] Among them, the master-slave mode configuration and communication speed configuration between the radar and the domain controller are key steps to ensure that the two can communicate correctly. Even if the conversion device can realize the communication link selection between the radar and the domain controller with different interface types, if there are problems with the master-slave mode and communication speed configuration, the radar and the domain controller will not be able to communicate normally.

[0047] Master-slave mode configuration: the master device in the master-slave mode is responsible for initiating communication requests and controlling the communication process, usually the domain controller. The slave device in the master-slave mode responds to the master device's request and sends data, usually the radar (the master and slave devices can also be interchangeable in some scenarios). If the master-slave mode is not configured correctly, for example, both devices are configured as master devices or both are configured as slave devices, communication will not be able to proceed normally because there is no clear communication control and response mechanism; communication speed configuration: the communication speed (or baud rate) needs to be consistent at both ends of the communication link. If the communication speeds of the domain controller and the radar sensor do not match, data transmission will be erroneous or impossible.

[0048] like Figure 2 As shown, the method may include the following steps S201-S204:

[0049] Step S201: receiving a first response message from a vehicle domain controller, wherein the response message is sent by the vehicle domain controller to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain controller.

[0050] In the related technology, if the domain controller is newly adapted to the laser radar (such as a radar with an industrial Ethernet interface type), it is necessary to manually set the master-slave mode of the Ethernet conversion box to slave, and set the rate to forced 1000M. If the communication is successful, it proves that the mode is set correctly. If the communication is unsuccessful, the mode and rate still need to be modified. The entire adaptation process requires human participation, which consumes time and effort.

[0051] After the laser radar in this embodiment is connected to the conversion device, the conversion device adapts the laser radars of different interface types to communication links that match the domain controller, so that data communication is established between the laser radar and the domain controller. After establishing the data link with the laser radar, the domain controller sends a first response message ACK to the MCU, instructing the MCU to execute subsequent communication configuration.

[0052] It can be understood that in this embodiment, the domain control unit is a controller that completes the fusion, positioning, path planning, and chassis control functions. The laser radar completes the collection of parameters such as target distance, direction, altitude, speed, posture, and even shape, and transmits the collected parameters to the domain control unit through the Ethernet interface. The Ethernet conversion box (also known as the conversion device) completes the conversion of the industrial Ethernet interface into an on-board Ethernet interface.

[0053] Step S202: Execute a first state machine, where the first state machine is used to drive the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine.

[0054] Exemplarily, the MCU may include a flash memory, and the multiple state machines may be stored in the flash memory. The method may also include: when receiving a first response message from the vehicle domain control, selecting a predetermined initial state machine from the flash memory as the first state machine to be executed.

[0055] It should be noted that those skilled in the art can select a corresponding state machine as the initial state machine in combination with practical applications and prior art. For example, in this embodiment, the initial state machine is determined as state machine 1, and the 100M slave is forced. Flash memory is a non-volatile memory technology. Considering situations such as vehicle stalling, devices such as conversion devices will be powered off. In this embodiment, the state machine is written into the flash memory, and the data stored therein will not be lost even if the device is powered off. In other words, writing the state machine into the flash memory can ensure that the state of the state machine is retained after the device is restarted, thereby achieving persistent storage.

[0056] In this example, the state machine is written into the flash of the MCU, and the number of state machines and their corresponding communication configuration information can be updated by updating the flash image, supporting online upgrade of the image. Optionally, the communication configuration information includes at least one of the following: configuring the radar to be a 100M slave mode, a 100M master mode, a 1G slave mode, and a 1G master mode. For example, 7 state machines can be defined as shown in Table 1:

[0057] Table 1

[0058] State Machine Communication configuration information State Machine 1 Force 100M from State Machine 2 Force 100M master State Machine 3 Force Gigabit Slave State Machine 4 Force Gigabit Master State Machine 5 Auto-negotiation of 1000M and 1000M State Machine 6 Auto-negotiation of 100M and 100M host State Machine 7 Negotiation failed

[0059] Optionally, the MCU can update the flash image by acquiring state machine update data to implement the state machine update process. Specifically, the method provided in this embodiment can also include the following steps: acquiring state machine update data, and updating the flash image of the flash memory based on the state machine update data to update the state machine currently written in the flash memory.

[0060] Exemplarily, the MCU can obtain state machine update data from an external device or network through a communication interface (such as UART, etc.). The update data may include a new state machine definition, state transition rules, and related operation instructions. Optionally, before updating the flash memory, the MCU verifies the received state machine update data to ensure the integrity and correctness of the data. In the process of updating the flash image, the verified state machine update data can be written to a temporary area in the flash memory, and during the writing process, the MCU ensures the atomicity of data writing to prevent incomplete data due to unexpected power outages or other failures. After the update is completed, the MCU switches the pointer or reference to the new state machine image, monitors the switching process, and ensures the continuity of the system to avoid interrupting the current operation.

[0061] Through the above technical solution, the state machine can be updated in a timely manner, and the state machine can be updated while the MCU is running without restarting, thereby improving the communication configuration efficiency and flexibility between the domain control and the lidar.

[0062] Among them, driving the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine can be carried out in the following manner: configuring the physical layer device according to the communication configuration information defined by the first state machine through the serial management interface SMI management channel.

[0063] In this embodiment, the task of the first state machine is to ensure that the PHY is configured to force 100M slave mode. The initial state of the state machine may be the "unconfigured" state. In the configuration stage, the MCU communicates with the PHY through the SMI management channel. The SMI may include two signals: management data input / output (MDIO) and management data clock (MDC). The SMI management channel is used to read and write the registers of the PHY. By reading the current state of the PHY, the state machine first reads the Basic Control Register (BCR) and Basic Status Register (BSR) of the PHY to determine the current working status and capabilities. Through the SMI management channel, the MCU sends a read command to the BCR and BSR registers of the PHY to configure the PHY to force 100M slave mode, that is, according to the configuration information of the state machine, the PHY is forced to work in 100Mbps slave mode.

[0064] Through the above process, the Serial Management Interface (SMI) management channel is used to successfully configure the physical layer device to the mandatory 100M slave mode according to the communication configuration information defined by the first state machine. This process ensures the stability, consistency and reliability of the PHY configuration and simplifies the initialization and maintenance of the configuration process.

[0065] Step S203: Receive a second response message from the vehicle domain controller, where the second response message is a message sent by the vehicle domain controller after the physical layer device configuration is completed to indicate the success or failure of the current configuration negotiation.

[0066] In this embodiment, the second response message may be in the form of a high or low level signal to indicate whether the current configuration negotiation succeeds or fails.

[0067] For example, negotiation can be started from state machine 1. If the negotiation is correct, the laser radar and the domain control communicate data. The domain control can send two low-to-high rising edges (i.e., high-level signals) to the MCU in the form of a response message ACK to ensure the accuracy of the signal. After the MCU receives the ACK, it recognizes that the negotiation between the two parties is successful. The MCU will not send instructions for the second state machine. If the state machine 1 negotiation is incorrect, the domain control can send two high-to-low falling edges (i.e., low-level signals) to the MCU. After receiving the ACK, the MCU continues to manage the PHY through the management channel, writes state machine 2, and continues to write to state machine 6. Among them, the rising edge of the second response message is as follows: Figure 3a As shown, a 200ms or other time period may be waited between two low to high rising edges.

[0068] Correspondingly, if there is no Ethernet message on the domain control MCU data link, it proves that the two parties are not communicating normally. The pre-defined ACK signal, the domain control can send two high-to-low level conversions in succession, and the MCU will identify and judge after receiving it. The identification and judgment are performed in the MCU of the conversion device. The ACK signal flag can be stored in the inherent RAM of the MCU of the Ethernet conversion box, and it is determined that the negotiation between the two parties has failed, and the adaptation of the next state machine can be started. Among them, the falling edge of the second response message is as follows Figure 3b shown.

[0069] Step S204: When the second response message indicates that the negotiation is successful, stop executing the next state machine, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine.

[0070] In this embodiment, since multiple state machines are written in the MCU, in order to avoid unnecessary repetition of the negotiation process, by stopping the execution of the next state machine when the negotiation is successful, the communication efficiency can be improved, the system resource consumption can be reduced, and the performance of the entire system can be improved.

[0071] Furthermore, when the negotiation fails, the polling execution mode of the state machine can effectively improve the configuration efficiency, such as Figure 4 As shown, the method provided in this embodiment may further include the following step S301:

[0072] Step S401: When the second response message indicates negotiation failure, execute the next state machine based on polling, so that the physical layer device performs physical layer configuration according to the communication configuration information defined by the next state machine, until the second response message indicates negotiation success or all state machines are executed.

[0073] Optionally, each state machine process is 1 second, and the corresponding PHY is configured mainly through the SMI management channel, mainly MDC / MDIO signals, using the standard SMI communication protocol to read and write PHY registers. If the first state machine negotiation fails, the next state machine is executed in sequence, that is, if the next state machine negotiation succeeds, the execution stops. If the negotiation fails, the next state machine is executed until the state machine negotiation succeeds or all state machines are executed. Among them, the read and write process and register description are shown in Table 2 and Table 3 respectively:

[0074] Table 2

[0075]

[0076]

[0077] Table 3

[0078]

[0079] Exemplarily, if the domain control and laser radar data communication is still unsuccessful, state machine 7 can be executed, and the MCU of the Ethernet box sends to the MCU of the domain control through the serial port. The negotiation fails. The reason for the negotiation failure may be a network cable problem, a laser radar hardware problem, or a domain control hardware problem, which requires detailed location analysis. It should be noted that state machine 7 defined in this embodiment is a state machine different from state machines 1 to 6, which is used to indicate that all state machines have not been successfully negotiated. In some embodiments, this state machine does not need to be set.

[0080] Through the above technical solution, the polling execution mode of the state machine can be used to quickly realize the negotiation of the master-slave mode and the communication speed, thereby improving the configuration efficiency.

[0081] Figure 5 This is a flow chart of another communication configuration method for a radar conversion device provided by an embodiment of the present application. Considering that when enough state machines fail to negotiate, it may be a network cable failure or a hardware failure. In order to troubleshoot in time, this embodiment, based on the above embodiment, sends a fault prompt message to the domain control method to improve the overall performance and security of the system. Specifically, in addition to the above steps S201-S204, the method provided by this embodiment may also include the following step S501.

[0082] Step S501: When all state machines are executed and the second response message indicates a negotiation failure, a fault prompt message is sent to the vehicle domain controller through the universal asynchronous receiver / transmitter UART serial port, and the fault prompt includes at least one of the following: network cable failure, lidar hardware failure and domain controller hardware failure.

[0083] The state machine execution is completed and the second response message is a negotiation failure, indicating that there may be communication problems in addition to the state machine configuration information. The failure of master-slave mode and speed negotiation usually means that there is a problem with the communication link between the master device and the slave device. Taking the network cable failure as an example, the network cable is the physical carrier of this communication link. If the network cable is damaged, has poor contact or is interfered with, it will cause communication failure. In network communication, the physical layer (including network cables, connectors, etc.) is the most basic layer. If there is a problem with the physical layer, the data packet may not be transmitted correctly, resulting in negotiation failure. In this way, the scope of the fault can be gradually narrowed down, and ultimately located to network cable problems, hardware problems, etc.

[0084] By using the UART serial port to send fault prompt messages to the vehicle domain controller when all state machines are executed and negotiation fails, the domain controller can achieve rapid fault diagnosis, improve reliability, simplify maintenance and enhance monitoring, thereby improving the overall performance and safety of the vehicle domain control system.

[0085] In summary, compared with the related art, the conversion device requires human participation, and the selection of rate and master-slave mode is mainly achieved through the DIP switch, which has poor maintainability. Often the vehicle's wiring harness has been laid, and it takes a lot of time and effort to change the settings of the conversion box. The self-negotiation process between the laser radar and the domain control in the embodiment of the present application does not require human participation, saving manpower and time investment, and has strong subsequent maintainability and selectivity.

[0086] Figure 6 1 is a schematic diagram of the structure of a communication configuration device of a radar conversion device provided in an embodiment of the present application, wherein the conversion device is used for radar interface conversion of a vehicle domain control, wherein the conversion device comprises a microcontroller MCU and a physical layer device electrically connected to the MCU, wherein a plurality of preset state machines are written into the MCU, wherein each state machine is used to define different communication configuration information between the domain control and the radar, wherein the communication configuration information comprises a master-slave mode configuration and / or a communication speed configuration; wherein the device is applied to the MCU, such as Figure 6 As shown, the device includes a receiving module 601, a state machine execution module 602 and a configuration completion module 603, wherein:

[0087] A receiving module 601 is configured to receive a first response message from a vehicle domain controller, wherein the response message is sent by the vehicle domain controller to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain controller;

[0088] A state machine execution module 602, which is configured to execute a first state machine, wherein the first state machine is used to drive the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine;

[0089] The receiving module 601 is further configured to receive a second response message from the vehicle domain controller, where the second response message is a message sent by the vehicle domain controller after the configuration of the physical layer device is completed to indicate whether the current configuration negotiation succeeds or fails;

[0090] The configuration completion module 603 is configured to stop executing the next state machine when the second response message indicates that the negotiation is successful, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine.

[0091] In one embodiment, the state machine execution module 602 is also configured to execute the next state machine based on a polling manner when the second response message indicates a negotiation failure, so that the physical layer device performs physical layer configuration according to the communication configuration information defined by the next state machine until the second response message indicates a negotiation success or all state machines are executed.

[0092] In one embodiment, the MCU includes a flash memory, and the multiple state machines are stored in the flash memory; the device also includes:

[0093] A determination module is configured to select a predetermined initial state machine from the flash memory as a first state machine to be executed when receiving a first response message from the vehicle domain control.

[0094] In one embodiment, the device further comprises:

[0095] An update module is configured to obtain state machine update data, and update a flash image of a flash memory based on the state machine update data, so as to update the state machine currently written in the flash memory.

[0096] In one embodiment, driving the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine includes: managing the channel through a serial management interface SMI and configuring the physical layer device according to the communication configuration information defined by the first state machine.

[0097] In one embodiment, the device further comprises:

[0098] A fault prompt module is configured to send a fault prompt message to the vehicle domain control through a universal asynchronous receiver / transmitter (UART) serial port when all state machines are executed and the second response message indicates a negotiation failure, wherein the fault prompt includes at least one of the following: a network cable failure, a lidar hardware failure, and a domain control hardware failure.

[0099] In one embodiment, the communication configuration information includes at least one of the following: configuring the radar to be in 100M slave mode, 100M master mode, 1G slave mode, and 1G master mode; and / or the second response message uses a high or low level signal to indicate whether the current configuration negotiation succeeds or fails.

[0100] It should be noted that the above-mentioned device provided in the embodiments of the present application corresponds to the contents of the above-mentioned method embodiments, and its implementation principles and technical effects are similar. For technical details not disclosed in the above-mentioned equipment embodiments of the present application, please refer to the description of the method embodiments or device embodiments of the present application for understanding.

[0101] Figure 7 is a schematic diagram of the structure of an MCU provided in an embodiment of the present application, such as Figure 7 As shown, the MCU includes: a processor 701, and a memory 702 that is communicatively connected to the processor 701; the memory 702 stores computer-executable instructions; the processor 701 executes the computer-executable instructions stored in the memory 702 to implement the radar conversion method, wherein the memory 702 and the processor 701 are connected via a bus 703.

[0102] It should be noted that the above-mentioned MCU provided in the embodiments of the present application corresponds to the contents of the above-mentioned method embodiments or device embodiments, and its implementation principles and technical effects are similar. For technical details not disclosed in the above-mentioned device embodiments of the present application, please refer to the description of the method embodiments or device embodiments of the present application for understanding.

[0103] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the communication configuration method of a radar conversion device provided in any one of the first aspects above is implemented.

[0104] It should be noted that the above-mentioned storage medium provided in the embodiments of the present application corresponds to the contents of the above-mentioned method embodiments or device embodiments, and its implementation principles and technical effects are similar. For technical details not disclosed in the above-mentioned device embodiments of the present application, please refer to the description of the method embodiments or device embodiments of the present application for understanding.

[0105] The embodiment of the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the communication configuration method of the radar conversion device is implemented. The relevant description can be understood by referring to the relevant description and effects corresponding to the steps in the method embodiment of the present application, and no further elaboration is made here.

[0106] The embodiment of the present application also provides a chip, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the communication configuration method of the radar conversion device. The relevant description can be understood by referring to the relevant description and effects corresponding to the steps in the embodiment of the method of the present application, and no further elaboration is given here.

[0107] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0108] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0109] Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0110] In the description of the embodiments of the present application, the term "and / or" merely indicates an association relationship that describes associated objects, indicating that three relationships may exist. For example, A and / or B may indicate the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" indicates any combination of at least two of any one or more of a plurality of. For example, at least one of A, B, and C may indicate any one or more elements selected from a set that includes A, B, and C.

[0111] In the description of the embodiments of the present application, the terms "upper", "lower", "front", "back", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as a limitation on the present application. In addition, the term "plurality" means two or more, unless otherwise precisely and specifically specified.

[0112] In the description of the embodiment of the present application, the terms "first", "second", "third", "fourth", etc. (if present) are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A communication configuration method for a radar conversion device, characterized in that: The conversion device is used for radar interface conversion of a vehicle domain control, and the conversion device includes a microcontroller MCU and a physical layer device electrically connected to the MCU. A plurality of preset state machines are written into the MCU, and each state machine is used to define different communication configuration information between the domain control and the radar, and the communication configuration information includes a master-slave mode configuration and / or a communication speed configuration; The method is applied to the MCU, comprising: receiving a first response message from the vehicle domain controller, wherein the response message is sent by the vehicle domain controller to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain controller; Executing a first state machine, wherein the first state machine is used to drive the physical layer device to perform physical layer configuration according to communication configuration information defined by the first state machine; receiving a second response message from the vehicle domain controller, where the second response message is a message sent by the vehicle domain controller after the configuration of the physical layer device is completed and used to indicate success or failure of the current configuration negotiation; When the second response message indicates that the negotiation is successful, the execution of the next state machine is stopped, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine.

2. The method according to claim 1, characterized in that: Also includes: When the second response message indicates negotiation failure, the next state machine is executed based on polling, so that the physical layer device performs physical layer configuration according to the communication configuration information defined by the next state machine, until the second response message indicates negotiation success or all state machines are executed.

3. The method according to claim 1 or 2, characterized in that: The MCU includes a flash memory, and the plurality of state machines are stored in the flash memory; the method further includes: When a first response message from the vehicle domain controller is received, a predetermined initial state machine is selected from the flash memory as a first state machine to be executed.

4. The method according to claim 3, characterized in that Also includes: Acquire state machine update data, and update a flash image of a flash memory based on the state machine update data to update the state machine currently written in the flash memory.

5. The method according to any one of claims 1 to 4, characterized in that: The driving the physical layer device to perform physical layer configuration according to the communication configuration information defined by the first state machine includes: The physical layer device is configured according to the communication configuration information defined by the first state machine through a serial management interface SMI management channel.

6. The method according to any one of claims 1 to 4, characterized in that: Also includes: When all state machines are executed and the second response message indicates a negotiation failure, a fault prompt message is sent to the vehicle domain controller via the universal asynchronous receiver / transmitter (UART) serial port, and the fault prompt includes at least one of the following: network cable failure, lidar hardware failure, and domain controller hardware failure.

7. The method according to any one of claims 1 to 4, characterized in that: The communication configuration information includes at least one of the following: configuring the radar to be in 100M slave mode, 100M master mode, 100M slave mode, and 100M master mode; and / or, The second response message indicates whether the current configuration negotiation succeeds or fails in the form of a high or low level signal.

8. A communication configuration device for a radar conversion device, characterized in that: The conversion device is used for radar interface conversion of a vehicle domain control, and the conversion device includes a microcontroller MCU and a physical layer device electrically connected to the MCU. A plurality of preset state machines are written into the MCU, and each state machine is used to define different communication configuration information between the domain control and the radar, and the communication configuration information includes a master-slave mode configuration and / or a communication speed configuration; The device is applied to the MCU, and includes: A receiving module, which is configured to receive a first response message from a vehicle domain controller, wherein the response message is sent by the vehicle domain controller to the MCU after the radar is connected to the conversion device and establishes data communication with the vehicle domain controller; a state machine execution module, configured to execute a first state machine, wherein the first state machine is used to drive the physical layer device to perform physical layer configuration according to communication configuration information defined by the first state machine; The receiving module is further configured to receive a second response message from the vehicle domain controller, where the second response message is a message sent by the vehicle domain controller after the configuration of the physical layer device is completed, indicating whether the current configuration negotiation succeeds or fails; A configuration completion module is configured to stop executing the next state machine when the second response message indicates that the negotiation is successful, so that the vehicle domain control and the radar perform data communication based on the communication configuration information corresponding to the first state machine.

9. An MCU, characterized in that: include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the MCU executes the communication configuration method of the radar conversion device according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the communication configuration method of the radar conversion device according to any one of claims 1 to 7.