Apparatus and method for controlling an ethernet switch for a vehicle
Patent Information
- Application Number
- CN202310084357.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-15
- Filing Date
- 2023-01-20
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-01-20
AI Technical Summary
[0022] According to another aspect of this disclosure, the system can be stably maintained even without resetting it, thereby reducing the time required for system restart and storage of existing data, and avoiding dangerous situations caused by sudden abnormal functions and operational stoppages.
Smart Images

Figure CN116781647B_ABST
Abstract
Description
Technical Field
[0001] Exemplary embodiments of this disclosure relate to an apparatus and method for controlling an Ethernet switch for a vehicle. Background Technology
[0002] Recently, Level 3 or higher autonomous driving controllers are equipped with high-performance system-on-a-chip (SoC) to receive large amounts of data from multiple sensors (Lidar or camera) and use this data for image processing and deep learning algorithm processing.
[0003] To meet the functional safety levels of existing vehicle controllers, autonomous driving controllers are basically equipped with microcontroller units (MCUs) and additionally equipped with high-performance SoCs to perform operational processing on large amounts of data.
[0004] Ethernet communication is used to exchange large amounts of data within the vehicle controller, and Ethernet switches are used to route data between these SoCs.
[0005] The background technology disclosed herein is in Korean Patent Application Publication No. 10-2019-0013165 (published on February 11, 2019, entitled "Device of Ethernet Communication in Vehicle, and Method for Error Recover of End Node and Switch"). Summary of the Invention
[0006] Since Ethernet switches are responsible for sending and receiving data between hosts, it is necessary to ensure their normal operation.
[0007] In existing technologies, when an Ethernet switch malfunctions, the system is reset simply by checking the error status register information of the Ethernet switch.
[0008] However, when the system is reset during operation, the current operating functions stop, and the current status is also displayed via the display device, causing anxiety and inconvenience to the occupants.
[0009] Various embodiments relate to an apparatus and method for controlling an Ethernet switch for a vehicle, wherein when a reference clock changes due to an Ethernet system error, the Ethernet interface can be reset according to the changed clock state to proactively prepare for the Ethernet system error.
[0010] In one embodiment, an apparatus for controlling an Ethernet switch for a vehicle includes: a switch status detection unit configured to acquire the clock of the Ethernet switch; and a processor configured to determine whether the clock of the Ethernet switch detected by the switch status detection unit has changed, and when the clock of the Ethernet switch has changed, to set the Ethernet interface according to the changed clock of the Ethernet switch.
[0011] The processor disclosed herein can compare the clock of the Ethernet switch detected by the switch status detection unit with a preset reference clock.
[0012] The switch status detection unit disclosed herein can obtain the clock of the Ethernet switch by reading the clock register of the Ethernet switch via serial peripheral interface (SPI) communication.
[0013] The processor disclosed herein allows a microcontroller unit (MCU) to operate by changing the MCU's operating mode to a degraded mode without resetting the MCU.
[0014] In one embodiment, a method for controlling an Ethernet switch for a vehicle includes: acquiring the clock of the Ethernet switch by a switch status detection unit; determining by a processor whether the clock of the Ethernet switch detected by the switch status detection unit has changed; and when the clock of the Ethernet switch has changed, setting the Ethernet interface by the processor according to the changed clock of the Ethernet switch.
[0015] In this disclosure, in determining whether the clock of the Ethernet switch detected by the switch status detection unit has changed, the processor can compare the clock of the Ethernet switch detected by the switch status detection unit with a preset reference clock.
[0016] This disclosure may further include allowing the processor to enable the microcontroller unit (MCU) to operate by changing the operating mode of the MCU to a degraded mode without resetting the MCU.
[0017] In one embodiment, a method for controlling an Ethernet switch for a vehicle includes: initializing the clock of the Ethernet switch to a preset reference clock by a processor; acquiring the clock of the Ethernet switch by a switch status detection unit; determining, by the processor, whether the clock of the Ethernet switch detected by the switch status detection unit has changed by comparing the clock of the Ethernet switch with the reference clock; and when the clock of the Ethernet switch has changed, setting the Ethernet interface by the processor according to the changed clock of the Ethernet switch.
[0018] In this disclosure, when the switch status detection unit obtains the clock of the Ethernet switch, the switch status detection unit can obtain the clock of the Ethernet switch by reading the clock register of the Ethernet switch via serial peripheral interface (SPI) communication.
[0019] This disclosure may further include allowing the processor to enable the microcontroller unit (MCU) to operate by changing the operating mode of the MCU to a degraded mode without resetting the MCU.
[0020] In this disclosure, in the process of the processor allowing the MCU to operate by changing the MCU's operating mode to a degraded mode without resetting the MCU, the processor can check whether the Ethernet switch is receiving Ethernet packets normally by reading the status register via the switch status detection unit, the processor changes the MCU's operating mode to a degraded mode, sends information about the degraded mode to the application program, and operates the logic settings in the degraded mode.
[0021] According to one aspect of this disclosure, when the reference clock changes due to an Ethernet system error, the Ethernet interface can be reset according to the changed clock state to proactively prepare for the Ethernet system error.
[0022] According to another aspect of this disclosure, the system can be stably maintained even without resetting it, thereby reducing the time required for system restart and storage of existing data, and avoiding dangerous situations caused by sudden abnormal functions and operational stoppages. Attached Figure Description
[0023] Figure 1 This is a block diagram configuration of an apparatus for controlling an Ethernet switch for a vehicle, according to an embodiment of the present disclosure.
[0024] Figure 2 This is a flowchart of a method for controlling an Ethernet switch for a vehicle according to an embodiment of the present disclosure. Detailed Implementation
[0025] Hereinafter, apparatus and methods for controlling an Ethernet switch for a vehicle will be described with reference to the accompanying drawings through various exemplary embodiments. In this process, for clarity and ease of explanation, the thickness of lines or the dimensions of elements shown in the drawings may be exaggerated. Furthermore, the terms described below are defined in consideration of their function in this disclosure and may be changed according to the intent or practice of the user or operator. Therefore, these terms should be defined based on the disclosure of this specification.
[0026] Figure 1 This is a block diagram configuration of an apparatus for controlling an Ethernet switch for a vehicle, according to an embodiment of the present disclosure.
[0027] refer to Figure 1 An apparatus for controlling an Ethernet switch for a vehicle according to an embodiment of the present disclosure includes a processor 26, a switch status detection unit 24, and an Ethernet media access control (ETH MAC) 22.
[0028] ETH MAC 22 connects to Ethernet switch 10 and sends data to / receives data from Ethernet switch 10.
[0029] Examples of Ethernet interfaces supported by ETH MAC 22 may include Media Independent Interface (MII), Reduced MII (RMII), Gigabit MII (GMII), Reduced Gigabit MII (RGMII), Serial Gigabit MII (SGMII), and 10 Gigabit MII (XGMII), and there are no particular limitations. In this embodiment, MII, RMII, and RGMII will be described as examples.
[0030] Ethernet switch 10 sends / receives data between hosts based on at least one of the aforementioned Ethernet interfaces.
[0031] That is, the Ethernet switch 10 can be connected to electronic devices installed in the vehicle and can perform Ethernet communication.
[0032] Typically, a vehicle may be equipped with multiple controllers, which can be connected to an Ethernet switch 10.
[0033] In this case, the controller can be the controller of an autonomous driving system, a radar controller, a braking system controller, or a steering system controller. There are no particular restrictions on the controller connected to the Ethernet switch 10.
[0034] This Ethernet switch 10 can send signals between controllers based on the MAC address of the controller in the vehicle.
[0035] The switch status detection unit 24 detects the clock of the Ethernet switch 10.
[0036] The switch status detection unit 24 is connected to the Ethernet switch 10 via a serial peripheral interface (SPI) and obtains a reference clock by reading the clock register of the Ethernet switch 10 via SPI communication with the Ethernet switch 10.
[0037] Typically, when a system error occurs in the controller of an autonomous driving system (e.g., transient voltage instability), Ethernet switch 10 may malfunction. In this case, Ethernet switch 10 may not output a normal reference clock.
[0038] That is, when the reference clock is 125MHz, there may be a phenomenon where the output reference clock frequency is other than the preset 125MHz, which is used to achieve gigabit high-speed communication. In this case, the software of the microcontroller unit (MCU) 20 that uses the clock may not be able to send / receive normal Ethernet packets.
[0039] Therefore, the switch status detection unit 24 detects whether the clock of the Ethernet switch 10 has changed due to voltage instability, etc., thereby allowing the Ethernet interface to be changed according to the changed clock information of the Ethernet switch 10.
[0040] The processor 26 acquires the clock of the Ethernet switch 10 by controlling the switch status detection unit 24. The processor 26 compares the clock of the Ethernet switch 10 acquired by the switch status detection unit 24 with a reference clock and determines whether the clock of the Ethernet switch 10 has changed. When the clock of the Ethernet switch 10 has changed, the processor 26 sets the Ethernet interface according to the changed clock of the Ethernet switch 10, thereby allowing the controller to continue operating without a reset and avoiding sudden abnormal functions and dangerous situations caused by a reset.
[0041] In this embodiment, an example with a reference clock of 225MHz will be described.
[0042] More specifically, when power is on, the processor 26 initializes the Ethernet interface to a preset Ethernet interface for the Ethernet channel and acquires the switch clock by controlling the switch status detection unit 24. To check whether the Ethernet switch 10 is properly ready for initialization, the switch status detection unit 24 checks the switch ID by reading the Ethernet switch ID register using SPI communication.
[0043] When the switch ID checked by the switch status detection unit 24 is valid, the processor 26 initializes the Ethernet switch 10 via SPI communication.
[0044] Then, the processor 26 obtains the clock of the Ethernet switch 10 by reading the clock register of the Ethernet switch 10 via the switch status detection unit 24, and compares the clock of the Ethernet switch 10 with the reference clock.
[0045] When the clock of the Ethernet switch 10 detected by the switch status detection unit 24 is the same as the reference clock, the processor 26 changes the operating mode of the MCU 20 to the normal mode state and sends the mode information to the application.
[0046] However, when the clock of the Ethernet switch 10 detected by the switch status detection unit 24 is different from the reference clock, for example, when the clock of the Ethernet switch 10 detected by the switch status detection unit 24 is 25MHz or 50MHz, the processor 26 resets the Ethernet interface to an Ethernet interface that matches the new clock.
[0047] When the clock is 25MHz, the processor 26 sets the Ethernet interface to MII, and when the clock is 50MHz, the processor 26 sets the Ethernet interface to RMII, thereby maintaining functional operation so that Ethernet packet forwarding can still be performed between the MCU 20 and the access point (AP) without restarting the system.
[0048] In the following text, reference will be made to Figure 2 A method for controlling an Ethernet switch for a vehicle, according to embodiments of the present disclosure, is described.
[0049] Figure 2 This is a flowchart of a method for controlling an Ethernet switch for a vehicle according to an embodiment of the present disclosure.
[0050] First, when the MCU 20 is powered on, the processor 26 initializes the Ethernet interface to a preset Ethernet interface for the Ethernet channel (S10). The preset Ethernet interface is RGMII, and the reference clock is 225MHz.
[0051] Subsequently, the processor 26 obtains the clock of the Ethernet switch by controlling the switch status detection unit 24. That is, in order to check whether the Ethernet switch 10 is ready for initialization, the switch status detection unit 24 checks the switch ID by reading the Ethernet switch ID register through SPI communication (S20).
[0052] When checking the switch ID, processor 26 determines whether the switch ID is valid (S30).
[0053] When the switch ID is valid as the result of the determination in step S30, the processor 26 initializes the Ethernet switch 10 via SPI communication (S50).
[0054] However, when the switch ID is invalid as determined in step S30, the processor 26 re-determines whether the switch ID is valid by reading the Ethernet switch ID register. When the switch ID value is invalid more than a set number of times (S40), the processor 26 resets or shuts down the MCU 20 (S140).
[0055] After initializing the Ethernet switch 10 via SPI communication, the processor 26 checks the clock by controlling the switch status detection unit 24. That is, the switch status detection unit 24 checks the clock by reading the clock register of the Ethernet switch 10 (S60).
[0056] The processor 26 determines whether the clock of the Ethernet switch 10 detected by the switch status detection unit 24 has a normal value.
[0057] That is, the processor 26 determines whether the clock of the Ethernet switch 10 detected by the switch status detection unit 24 is included in the predefined clock (S70). For example, when the predefined clock is 25MHz, 50MHz and 225MHz, the processor 26 determines whether the clock of the Ethernet switch 10 is included in 25MHz, 50MHz and 225MHz.
[0058] When the clock of the Ethernet switch 10, detected by the switch status detection unit 24, is not included in the predefined clock, the processor 26 determines that this is a permanent hardware error. Subsequently, the processor 26 notifies the driver of the fault of the multi-master system controller via the cluster's warning lights and resets or shuts down the MCU 20 (S140).
[0059] However, when the clock of the Ethernet switch 10 detected by the switch status detection unit 24 is included in the predefined clock as a result of the determination in step S70, the processor 26 determines that the clock of the Ethernet switch 10 is a reference clock of 225MHz (S80).
[0060] When the clock of Ethernet switch 10 is the same as the 225MHz reference clock as determined in step S80, processor 26 changes the operating mode of MCU 20 to normal mode and sends the mode information to the application program (S90 and S100).
[0061] However, when the clock of Ethernet switch 10 is not the same as the 225MHz reference clock as determined in step S80, that is, when the clock of Ethernet switch 10 detected by switch status detection unit 24 is 25MHz or 50MHz, processor 26 resets the Ethernet interface to an Ethernet interface that matches the new clock (S110).
[0062] When the clock is 25MHz, the processor 26 sets the Ethernet interface to MII, and when the clock is 50MHz, the processor 26 sets the Ethernet interface to RMII.
[0063] Subsequently, the processor 26 checks the status of the Ethernet switch 10 via SPI communication, changes the Ethernet interface, and changes the operating mode of the MCU 20 to a degraded mode (S120 and S130) to send the mode information to the application, thereby allowing only minimal logic operations.
[0064] That is, even if the clock of Ethernet switch 10 is different from the reference clock, processor 26 maintains functional operation, so that Ethernet packet forwarding can still be performed between MCU 20 and access point (AP) without restarting the system.
[0065] According to the apparatus and method for controlling an Ethernet switch for a vehicle according to embodiments of the present disclosure as described above, when the reference clock changes due to an Ethernet system error, the Ethernet interface can be reset according to the changed clock state to proactively prepare for an Ethernet system error.
[0066] Furthermore, according to the apparatus and method for controlling an Ethernet switch for a vehicle according to embodiments of the present disclosure as described above, the system can be stably maintained even without resetting the system, thereby reducing the time required for system restart and storage of existing data, and avoiding dangerous situations caused by sudden abnormal functions and operational stops.
[0067] For example, the features described in this specification can be implemented as methods or processes, apparatus, software programs, data streams, or signals. Although discussed only in the context of a single form of implementation (e.g., discussed only as a method), the features discussed can also be implemented in other forms (e.g., apparatus or program). The apparatus can be implemented as suitable hardware, software, firmware, etc. The method can be implemented in an apparatus such as a processor, which generally refers to a processing device including a computer, microprocessor, integrated circuit, or programmable logic device. The processor includes communication devices such as computers, cellular phones, portable / personal digital assistants (PDAs), and other devices that facilitate information communication between end users.
[0068] Although this disclosure has been described with reference to embodiments shown in the accompanying drawings, the embodiments of this disclosure are for illustrative purposes only, and those skilled in the art will understand that various modifications and other equivalent embodiments can be made from these embodiments. Therefore, the true technical scope of this disclosure should be defined by the appended claims.
Claims
1. An apparatus for controlling an Ethernet switch for a vehicle, the apparatus comprising: A switch status detection unit is configured to acquire the clock of an Ethernet switch, which communicates with an Ethernet MAC via one of a plurality of interfaces of the Ethernet Media Access Control (MAC). as well as The processor is configured as follows: The Ethernet interface of the Ethernet MAC is initialized as the first interface among the plurality of interfaces, the first interface being designed to communicate with the Ethernet switch using a first reference clock. Determine whether the current clock of the Ethernet switch detected by the switch status detection unit corresponds to the first reference clock of the first interface, and When the current clock of the Ethernet switch does not correspond to the first reference clock of the first interface, the Ethernet interface of the Ethernet MAC is changed from the first interface to the second interface among the plurality of interfaces. The second interface is designed to communicate with the Ethernet switch using a second reference clock corresponding to the current clock of the Ethernet switch.
2. The apparatus according to claim 1, wherein, The switch status detection unit obtains the current clock of the Ethernet switch by reading the clock register of the Ethernet switch via the serial peripheral interface SPI communication.
3. The apparatus according to claim 1, wherein, The processor allows the microcontroller unit (MCU) to operate without resetting the MCU by changing its operating mode to a degraded mode.
4. A method for controlling an Ethernet switch for a vehicle, the Ethernet switch communicating with an Ethernet MAC via one of a plurality of interfaces of an Ethernet Media Access Control MAC, the method comprising: The processor initializes the Ethernet interface of the Ethernet MAC as the first interface among the plurality of interfaces, the first interface being designed to communicate with the Ethernet switch using a first reference clock; The current clock of the Ethernet switch is obtained by the switch status detection unit; The processor determines whether the current clock of the Ethernet switch detected by the switch status detection unit corresponds to the first reference clock of the first interface; as well as When the current clock of the Ethernet switch does not correspond to the first reference clock of the first interface, the processor changes the Ethernet interface of the Ethernet MAC from the first interface to the second interface among the plurality of interfaces. The second interface is designed to communicate with the Ethernet switch using a second reference clock corresponding to the current clock of the Ethernet switch.
5. The method according to claim 4, wherein, In obtaining the current clock of the Ethernet switch by the switch status detection unit, the switch status detection unit obtains the current clock of the Ethernet switch by reading the clock register of the Ethernet switch via serial peripheral interface (SPI) communication.
6. The method of claim 4, further comprising: The processor allows the microcontroller unit (MCU) to operate in a degraded mode without resetting the MCU.
7. The method according to claim 6, wherein, In the process where the processor allows the MCU to operate by changing the MCU's operating mode to a degraded mode without resetting the MCU, the processor checks whether the Ethernet switch is receiving Ethernet packets normally by reading the status register via the switch status detection unit, the processor changes the MCU's operating mode to the degraded mode, sends information about the degraded mode to the application program, and operates the logic settings in the degraded mode.
Citation Information
Patent Citations
Device of ethernet communication in vehicle, and method for error recover of end node and switch
KR1020190013165A
Ethernet port adaptation realization method, network system and network equipment
CN102098814A