Energy-saving control method, device and equipment for ECU and storage medium
By detecting the wake-up source of the ECU and setting the CAN transceiver and power management module to sleep, the problem that the automotive embedded system cannot effectively reduce power consumption is solved, and efficient energy utilization is achieved.
Patent Information
- Application Number
- CN202411749208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, automotive embedded systems cannot effectively reduce power consumption, resulting in energy waste.
By detecting the wake-up source of the ECU, if there is no wake-up source, the CAN transceiver is set to sleep state, and the power management module sleeps through the wake-up pin of the power management module, thereby reducing power consumption.
When there is no wake-up source in the ECU, the joint optimization of the CAN transceiver and the power management module reduces energy waste and improves the efficiency of energy utilization.
Smart Images

Figure CN119628978A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile power management technology, and in particular to an energy-saving control method, device, equipment and storage medium of an ECU. Background Art
[0002] In the design of modern automotive embedded systems, power consumption management plays a vital role, especially in the context of the increasing popularity of smart cars and advanced driver assistance systems, the pursuit of energy efficiency has become more urgent. As a widely used communication protocol in automobiles, the CAN bus is the core of data transmission. The CAN bus is responsible for connecting and transmitting data between various modules in the vehicle. At the same time, the power management module provides key power support for embedded systems with its efficient power management capabilities.
[0003] In the prior art, in order to improve energy efficiency and reduce power consumption, the CAN network management and power management modules are usually optimized. For example, the optimization goal of the CAN network management module is to improve the transmission efficiency of the CAN network management, reduce transmission delay, and ensure data integrity. The optimization goal of the power management module is to reduce the overall energy consumption of the automotive embedded system, extend battery life, and improve the efficiency of power utilization.
[0004] However, the CAN network management and power management of the existing technology both adopt independent optimization strategies, which makes it impossible to reasonably allocate power consumption according to the actual needs of the automotive embedded system. For example, when the amount of data transmitted by the CAN network is small, the power management module cannot effectively reduce power consumption, which causes energy waste and cannot improve energy utilization efficiency. Summary of the invention
[0005] The present application provides an ECU energy-saving control method, device, equipment and storage medium to solve the problem in the prior art that the automotive embedded system cannot effectively reduce power consumption, resulting in energy waste.
[0006] In a first aspect, the present application provides an energy-saving control method of an ECU, which is applied to an MCU in the ECU, wherein the ECU comprises: the MCU, a CAN transceiver and a power management module, and the method comprises:
[0007] Detecting a wake-up source of the ECU;
[0008] If the ECU does not have a wake-up source, the CAN transceiver is set to a sleep state, and the CAN transceiver stops sending and receiving messages in the sleep state;
[0009] Acquire a level state of a wake-up pin of the power management module, where the wake-up pin of the power management module is connected to the CAN transceiver;
[0010] Control the power management module to sleep according to the level state
[0011] In a possible design, controlling the power management module to sleep according to the level state includes:
[0012] Obtaining the current on the MCU;
[0013] The power management module is controlled to sleep according to the level state and the current.
[0014] In a possible design, controlling the power management module to sleep according to the level state and the current includes:
[0015] If the level state is a low level and the current on the MCU is less than or equal to a preset current threshold, the power management module is controlled to be in a sleep state, and the power management module supplies power to the MCU transceiver and the CAN transceiver in the sleep state;
[0016] If the level state is a low level and the current on the MCU is greater than the preset current threshold, the power management module is controlled to be in a standby state, and the power management module supplies power to the CAN transceiver in the standby state.
[0017] In a possible design, before setting the CAN transceiver to a sleep state, the method further includes:
[0018] The network state of the MCU is set to a network sleep state, in which the MCU stops processing messages between the ECU and other ECUs.
[0019] In one possible design, it also includes:
[0020] If the wake-up source exists, obtaining the state of the power management module;
[0021] If the power management module is in the standby state, the power management module is controlled to enter the initialization state. In the initialization state, the power management module supplies power to the MCU so that the MCU performs an initialization process. The initialization process is used to restore the MCU and the CAN transceiver to a normal state.
[0022] In one possible design, the method further includes:
[0023] If the power management module is in a sleep state, the network state of the MCU is restored from a network sleep state to a repeated message state, and the CAN transceiver is controlled to be restored from a sleep state to a normal state, and the power management module enters a wake-up state;
[0024] According to the type of the wake-up source, the network state of the MCU is switched from the repeated message state to the target state, and the type of the wake-up source includes an active wake-up source and a passive wake-up source;
[0025] When the target state is a normal operating state, the power management module is controlled to recover from the awake state to a normal state.
[0026] In a possible design, switching the network state of the MCU from the repeated message state to the target state according to the type of the wake-up source includes:
[0027] If the wake-up source is an active wake-up source, switching the network state of the MCU from the repeated message state to a normal operation state;
[0028] If the wakeup source is a passive wakeup source, obtaining a network request operation;
[0029] If the network request operation is obtained, the network state of the MCU is switched from the repeated message state to the normal operation state;
[0030] If the network request operation is not obtained, the network state of the MCU is switched from the repeat message state to the ready sleep state.
[0031] In a second aspect, the present application provides an energy-saving control device for an ECU, comprising: an MCU, a CAN transceiver, and a power management module;
[0032] The MCU is used to detect the wake-up source of the ECU;
[0033] If the ECU does not have a wake-up source, the MCU is further used to set the CAN transceiver to a sleep state, and the CAN transceiver stops sending and receiving messages in the sleep state;
[0034] The MCU is further used to obtain the level state of the wake-up pin of the power management module, where the wake-up pin of the power management module is connected to the CAN transceiver;
[0035] The MCU is further used to control the power management module to sleep according to the level state.
[0036] In one possible design, it also includes:
[0037] The MCU is used to obtain the current on the MCU;
[0038] The MCU controls the power management module to sleep according to the level state and the current.
[0039] In one possible design, it also includes:
[0040] If the level state is a low level and the current on the MCU is less than or equal to a preset current threshold, the MCU controls the power management module to be in a sleep state, and the power management module supplies power to the MCU transceiver and the CAN transceiver in the sleep state;
[0041] If the level state is a low level and the current on the MCU is greater than the preset current threshold, the MCU controls the power management module to be in a standby state, and the power management module supplies power to the CAN transceiver in the standby state.
[0042] In one possible design, it also includes:
[0043] The network state of the MCU is set to a network sleep state, in which the MCU stops processing messages between the ECU and other ECUs.
[0044] In one possible design, it also includes:
[0045] If the wake-up source exists, the MCU obtains the status of the power management module;
[0046] If the power management module is in standby state, the MCU controls the power management module to enter an initialization state. In the initialization state, the power management module supplies power to the MCU so that the MCU performs an initialization process. The initialization process is used to restore the MCU and the CAN transceiver to a normal state.
[0047] In one possible design, it also includes:
[0048] If the power management module is in a sleep state, the network state of the MCU is restored from a network sleep state to a repeated message state, and the CAN transceiver is controlled to be restored from a sleep state to a normal state, and the power management module enters a wake-up state;
[0049] According to the type of the wake-up source, the network state of the MCU is switched from the repeated message state to the target state, and the type of the wake-up source includes an active wake-up source and a passive wake-up source;
[0050] When the target state is a normal operating state, the MCU controls the power management module to recover from the awake state to a normal state.
[0051] In one possible design, it also includes:
[0052] If the wake-up source is an active wake-up source, the network state of the MCU is switched from the repeated message state to a normal operation state;
[0053] If the wake-up source is a passive wake-up source, the MCU obtains a network request operation;
[0054] If the network request operation is obtained, the network state of the MCU is switched from the repeated message state to the normal operation state;
[0055] If the network request operation is not obtained, the network state of the MCU is switched from the repeat message state to the ready sleep state.
[0056] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the energy-saving control method of the ECU described in the first aspect and various possible designs of the first aspect.
[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the energy-saving control method of the ECU described in the first aspect and various possible designs of the first aspect is implemented.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the energy-saving control method of the ECU as described in the first aspect and various possible designs of the first aspect.
[0059] The energy-saving control method, device, equipment and storage medium of the ECU provided by the present application detect the wake-up source of the ECU. If the wake-up source does not exist in the ECU, the CAN transceiver is set to a dormant state. The CAN transceiver stops sending and receiving messages in the dormant state, and then obtains the level state of the wake-up pin of the power management module. The wake-up pin of the power management module is connected to the CAN transceiver, and the power management module is controlled to sleep according to the level state. Compared with the prior art, independent optimization strategies are adopted for CAN network management and power management, respectively, which makes it impossible to reasonably allocate power consumption according to the actual needs of the automotive embedded system, thereby causing energy waste. The present application detects the wake-up source of the ECU. When there is no wake-up source in the ECU, the CAN transceiver is set to a dormant state. In the dormant state, the power consumption of the CAN transceiver is reduced, and because the wake-up pin of the power management module is connected to the CAN transceiver, when the CAN transceiver is in a dormant state, the wake-up pin is pulled low, and the power management module also enters a dormant state. Therefore, when there is no wake-up source for the ECU, after the CAN transceiver goes into sleep mode, the power management module can also go into sleep mode through the state of the wake-up pin connected to the CAN transceiver. Therefore, by combining the CAN transceiver and the power management module for optimization, energy waste is reduced and energy utilization efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0061] Figure 1 This is an application scenario diagram of the energy-saving control method of the ECU applicable to the embodiment of the present application;
[0062] Figure 2 A schematic diagram of a flow chart of a first embodiment of an energy-saving control method for an ECU provided in the present application;
[0063] Figure 3 A schematic diagram of a flow chart of a second embodiment of an energy-saving control method for an ECU provided in the present application;
[0064] Figure 4 A flowchart of a third embodiment of an energy-saving control method for an ECU provided in the present application;
[0065] Figure 5 A flowchart of a fourth embodiment of an energy-saving control method for an ECU provided in the present application;
[0066] Figure 6 A flowchart of a fifth embodiment of an energy-saving control method for an ECU provided in the present application;
[0067] Figure 7It is a schematic diagram of the state transition of the power management module;
[0068] Figure 8 It is the conversion process of CAN network sleep state;
[0069] Fig. 9 It is the conversion process of CAN network wake-up state;
[0070] Fig.10 A schematic diagram of the structure of an energy-saving control device of an ECU provided in an embodiment of the present application;
[0071] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0072] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0073] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0074] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0075] Terminology explanation:
[0076] ECU: Engine Control Unit, the abbreviation of Engine Control Unit, is a microcomputer controller dedicated to automobiles, responsible for monitoring and controlling various mechanical and electronic components of the vehicle, especially the working status of the engine.
[0077] MCU: Microcontroller Unit, the abbreviation of Microcontroller Unit in English, is a highly integrated computer chip, mainly used to control and execute the operations of embedded devices.
[0078] CAN transceiver: The abbreviation of Controller Area Network, is a device used for CAN bus communication. Its main function is to convert the logic level of the CAN controller into the differential level of the CAN bus and transmit data on two bus cables with differential voltages.
[0079] Power management module: provides efficient power management functions for embedded systems. The power management module used in this application is the TLF35584 power management chip.
[0080] In the prior art, in order to improve energy utilization efficiency and reduce power consumption, the CAN network management and power management modules are usually optimized. However, in the prior art, the CAN network management and power management modules are usually optimized separately, which leads to the inability to reasonably allocate power consumption according to the actual needs of the automotive embedded system, thus resulting in unreasonable power consumption allocation and ultimately energy waste, and the inability to improve energy utilization efficiency.
[0081] In view of the above technical problems, the inventive concept of this application is how to provide an energy-saving control method for an ECU, and how to combine the CAN network management and the power management module for optimization. Based on this, the CAN transceiver and the power management module are connected by a wake-up pin. When the ECU cannot detect the wake-up source, the CAN transceiver enters a sleep state to reduce power consumption. At this time, since the CAN transceiver enters a sleep state, the wake-up pin will be pulled low. When the wake-up pin is pulled low, the power management module also enters a sleep state, thereby reducing power consumption. Therefore, the CAN network management and the power management module are combined for optimization, and ultimately the energy utilization efficiency is improved.
[0082] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0083] Figure 1 is an application scenario diagram of the energy-saving control method of the ECU applicable to the embodiment of the present application, such as Figure 1As shown, the energy-saving control method of the ECU is applied to the MCU in the ECU. The ECU includes: an MCU, a CAN transceiver and a power management module. The CAN transceiver and the power management module are connected through a wake-up pin. When there is no wake-up source in the ECU, the MCU will control the CAN transceiver to be set to a dormant state. When the CAN transceiver is in a dormant state, the wake-up pin between the CAN transceiver and the power management module will be pulled low. At this time, the MCU will control the power management module to enter a dormant state. When there is a wake-up source in the ECU, the MCU, the CAN transceiver and the power management module are woken up in turn according to the different states of the power management module.
[0084] Figure 2 A schematic diagram of a flow chart of an energy-saving control method for an ECU provided in this application, as shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0085] S201: Detect the wake-up source of the ECU.
[0086] In an embodiment of the present application, the MCU detects the wake-up source of the ECU. Optionally, the wake-up source of the ECU includes an active wake-up source and a passive wake-up source. Among them, the active wake-up source refers to the wake-up request generated inside the ECU, such as: K15 hard-line wake-up or hardware-sensing wake-up. The passive wake-up source refers to the wake-up request from outside the ECU or other ECUs, such as: a message sent from another ECU or a CAN message detected on the bus by the CAN transceiver.
[0087] S202: If there is no wake-up source for the ECU, the CAN transceiver is set to a sleep state, and the CAN transceiver stops sending and receiving messages in the sleep state.
[0088] In an embodiment of the present application, when the MCU detects that there is no wake-up source for the ECU, that is, when it detects that there is neither an active wake-up source nor a passive wake-up source for the ECU, the MCU will send a command to set the CAN transceiver to a sleep state, and the CAN transceiver will stop sending and receiving messages in the sleep state.
[0089] At the same time, if there is no wake-up source for the ECU, before setting the CAN transceiver to sleep mode, the network state of the MCU needs to be set to network sleep mode. In the network sleep mode, the MCU stops processing messages between the ECU and other ECUs, thereby reducing the power consumption of the ECU.
[0090] S203: Acquire the level state of the wake-up pin of the power management module, where the wake-up pin of the power management module is connected to the CAN transceiver.
[0091] In the embodiment of the present application, the power management module and the CAN transceiver are connected via a wake-up pin, so when the CAN transceiver is in a dormant state, the CAN transceiver will pull down the wake-up pin of the power management module. Therefore, the MCU will obtain the level state of the wake-up pin of the power management module to determine whether the power management module should enter a dormant state.
[0092] S204: Control the power management module to sleep according to the power level status.
[0093] In an embodiment of the present application, the MCU sends a command to the power management module according to the level state of the wake-up pin of the power management module, thereby putting the power management module into sleep mode.
[0094] In an embodiment of the present application, by detecting the wake-up source of the ECU, if the ECU does not have a wake-up source, the CAN transceiver is set to a dormant state, the CAN transceiver stops sending and receiving messages in the dormant state, and then obtains the level state of the wake-up pin of the power management module, the wake-up pin of the power management module is connected to the CAN transceiver, and the power management module is controlled to sleep according to the level state. Compared with the prior art, independent optimization strategies are adopted for CAN network management and power management, which leads to the inability to reasonably allocate power consumption according to the actual needs of the automotive embedded system, thereby causing the problem of energy waste. The present application detects the wake-up source of the ECU, and when the wake-up source does not exist in the ECU, the CAN transceiver is set to a dormant state, the power consumption of the CAN transceiver is reduced in the dormant state, and because the wake-up pin of the power management module is connected to the CAN transceiver, when the CAN transceiver is in a dormant state, the wake-up pin is pulled low, and the power management module also enters a dormant state. Therefore, when the ECU does not have a wake-up source, after the CAN transceiver is dormant, the power management module can also enter a dormant state through the state of the wake-up pin connected to the CAN transceiver, so by combining the CAN transceiver and the power management module for optimization, energy waste is reduced and energy utilization efficiency is improved.
[0095] Figure 3 The schematic diagram of the flow chart of the second embodiment of the energy-saving control method of an ECU provided in this application is as follows: Figure 2 Based on the illustrated embodiment, a specific implementation of step S204 is as follows:
[0096] S301: Obtain the current on the MCU.
[0097] In the embodiment of the present application, for example, the current on the MCU is monitored in real time through a current sensor or a measurement circuit.
[0098] S302: Control the power management module to sleep according to the level state and current.
[0099] In the embodiment of the present application, when the level state of the wake-up pin of the power management module is low, it can be judged that there is no wake-up source for the ECU. At this time, the current on the MCU is obtained, and the system can be judged to be in an idle or low power consumption state through the current on the MCU. At this time, whether the power management module enters the sleep state can be controlled.
[0100] In an embodiment of the present application, by obtaining the current on the MCU and the level state of the wake-up pin of the power management module, the power management module is controlled to sleep, thereby achieving optimal power consumption efficiency in different working scenarios and extending the battery of the entire system.
[0101] Figure 4 The flowchart of the third embodiment of the energy-saving control method of an ECU provided in this application is shown in the above Figure 3 Based on the illustrated embodiment, a specific implementation of step S302 is as follows:
[0102] S401: If the level state is low and the current on the MCU is less than or equal to the preset current threshold, the power management module is controlled to be in a sleep state, and the power management module supplies power to the MCU transceiver and the CAN transceiver in the sleep state.
[0103] In an embodiment of the present application, if the level state of the wake-up pin of the power management module is low, and the current obtained on the MCU is less than or equal to the preset current threshold, the MCU sends a command to the power management module to put the power management module into a sleep state. It should be noted here that the MCU in a sleep state is still capable of sending commands to the power management module to put it into a sleep state, but it does not have the ability to monitor and respond to network communication messages from other ECUs. In order to receive external events or wake up quickly when interrupted, the power management module still supplies power to the MCU transceiver when it is in a sleep state, and in order to maintain the communication capability of the system, the power management module needs to supply power to the CAN transceiver.
[0104] S402: If the level state is a low level and the current on the MCU is greater than a preset current threshold, the power management module is controlled to be in a standby state, and the power management module supplies power to the CAN transceiver in the standby state.
[0105] In an embodiment of the present application, if the level state of the wake-up pin of the power management module is low, and the current obtained on the MCU is greater than the preset current threshold, the MCU sends a command to the power management module, so that the power management module is in standby state. Similarly, it should be noted here that the MCU in sleep state is still capable of sending commands to the power management module to put it into standby state, but it does not have the ability to monitor and respond to network communication messages from other ECUs. When the power management module is in standby state, the MCU does not need to respond immediately, so it still supplies power to the CAN transceiver, but not to the MCU transceiver.
[0106] In an embodiment of the present application, if the level state is low and the current on the MCU is less than or equal to the preset current threshold, the power management module is controlled to be in a sleep state, and the power management module supplies power to the MCU transceiver and the CAN transceiver in the sleep state. If the level state is low and the current on the MCU is greater than the preset current threshold, the power management module is controlled to be in a standby state, and the power management module supplies power to the CAN transceiver in the standby state. By monitoring the current size on the MCU, the state of the power management module is changed. When the power management module is in a sleep state, in order to reduce power consumption while maintaining the responsiveness and communication capabilities of the system, the power management module only needs to supply power to the MCU transceiver and the CAN transceiver, and when the power management module is in a standby state, in order to further reduce power consumption, the power management module only needs to supply power to the CAN transceiver. Therefore, by reasonably adjusting the power supply strategy, power consumption can be minimized while meeting system requirements.
[0107] Figure 5 A flowchart of a fourth embodiment of an energy-saving control method for an ECU provided in this application is shown in FIG. Figure 5 As shown, the method comprises the following steps:
[0108] S501: If a wake-up source exists, obtain the status of the power management module.
[0109] In an embodiment of the present application, if the MCU detects that the ECU has a wake-up source, the MCU will check the status of the power management module, where the wake-up source includes an active wake-up source and a passive wake-up source.
[0110] S502: If the power management module is in the standby state, the power management module is controlled to enter the initialization state. In the initialization state, the power management module supplies power to the MCU so that the MCU performs an initialization process. The initialization process is used to restore the MCU and the CAN transceiver to a normal state.
[0111] In an embodiment of the present application, when the power management module receives a wake-up source while in standby state, the wake-up pin of the power management module will be pulled high. At this time, the power management module enters the initialization state. In the initialization state, the power management module supplies power to the MCU. After the MCU is powered on, the CAN transceiver will be initialized, so that the CAN transceiver returns to normal state. After the MCU is powered on, it will initialize itself at the same time.
[0112] In an embodiment of the present application, if the power management module receives a wake-up source when it is in standby mode, the power management module will switch from standby mode to initialization mode to provide a stable power supply for the MCU. After obtaining power, the MCU will perform a series of initialization operations to ensure that both the MCU and the CAN transceiver are restored to a normal working state. The ECU can quickly return to a normal working state after detecting the wake-up source, ensuring that the ECU can respond to various events and requests in the vehicle system in a timely manner. And the switching of the power management module between the standby mode and the initialization mode helps to reduce power consumption when the ECU is inactive.
[0113] Figure 6 The flowchart of the fifth embodiment of the energy-saving control method of an ECU provided in this application is shown in the above Figure 5 Based on the embodiment shown, Figure 6 As shown, the method comprises the following steps:
[0114] S601: If the power management module is in the sleep state, the network state of the MCU is restored from the network sleep state to the repeated message state, and the CAN transceiver is controlled to be restored from the sleep state to the normal state, and the power management module enters the wake-up state.
[0115] In the embodiment of the present application, since the power management module still supplies power to the MCU when it is in the sleep state, when there is a wake-up source, the network state of the MCU will be restored from the sleep state to the repeated message state, and the MCU will control the CAN transceiver to recover from the sleep state to the normal state. Since the wake-up pin of the power management module has been pulled high when the wake-up source is received, the power management module enters the wake-up state. Specifically, in the repeated message state, the MCU will repeatedly send wake-up messages to the CAN bus to notify other nodes in the network that the MCU has been awakened.
[0116] S602: Switch the network state of the MCU from the repeated message state to the target state according to the type of the wakeup source, where the types of the wakeup source include active wakeup source and passive wakeup source.
[0117] In the embodiment of the present application, according to whether the type of the wake-up source is an active wake-up source or a passive wake-up source, the network state of the MCU is switched from the repeated message state to a different target state.
[0118] Specifically, according to the type of wake-up source, a specific implementation method of switching the network state of the MCU from the repeated message state to the target state is:
[0119] If the wakeup source is an active wakeup source, the network state of the MCU is switched from the repeated message state to the normal operation state.
[0120] In the embodiment of the present application, if the wake-up source is an active wake-up source, the network state of the MCU is directly switched from the repeated message state to the normal operation state.
[0121] If the wakeup source is a passive wakeup source, obtain the network request operation.
[0122] In the embodiment of the present application, if the wake-up source is a passive wake-up source, the MCU needs to further determine whether a network request operation is obtained.
[0123] If a network request operation is obtained, the network state of the MCU is switched from the repeated message state to the normal operation state.
[0124] In an embodiment of the present application, if the wakeup source is a passive wakeup source and the MCU obtains a network request operation, the network state of the MCU is directly switched from the repeated message state to the normal operation state.
[0125] If the network request operation is not obtained, the network state of the MCU is switched from the repeat message state to the ready sleep state.
[0126] In an embodiment of the present application, if the wake-up source is a passive wake-up source and the MCU does not obtain a network request operation, the network state of the MCU is switched from the repeat message state to the ready sleep state, waiting for further wake-up signals or network requests.
[0127] S603: When the target state is a normal operating state, control the power management module to recover from the awake state to the normal state.
[0128] In an embodiment of the present application, when the network state of the MCU is a normal operating state, the MCU controls the power management module to recover from the wake-up state to the normal state so as to provide a stable power supply for the system.
[0129] In an embodiment of the present application, when the wake-up source is an active wake-up source, the MCU does not need to wait for an external network request, and can directly start to execute its normal functions, that is, switch the network state of the MCU from the repeated message state to the normal operation state. Since the passive wake-up source is usually a request initiated by other nodes in the network, the MCU needs to further check whether it has received a request operation from other nodes in the network. When the MCU receives a network request operation from other nodes in the network, the network state of the MCU will switch from the repeated message state to the normal operation state to start executing functions related to the request. If the network request operation is not received, in order to save energy, the network state of the MCU will switch from the repeated message state to the ready sleep state. In this state, the MCU still maintains the ability to respond to the wake-up source, but the power consumption will be reduced. The MCU flexibly switches the network state according to the type of wake-up source, ensuring that the MCU can respond quickly and start to execute its functions when needed, and can enter a low-power state to save energy when not needed.
[0130] Figure 7 Figure 1 is a schematic diagram of the power management module state transition. Figure 7 As shown, when the power management module is in the standby state, if there is a wake-up source, the power management module will switch from the standby state to the initialization state. In the initialization state, the power management module continues to power the MCU. When the MCU obtains enough power to perform its initialization process, the power management module will switch from the initialization state to the normal state. In the normal state, the power management module provides a stable power supply to all components of the ECU, and the MCU also starts to perform normal operations. When the power management module is in the normal state, if the wake-up signal is continuously not detected, the MCU will send a standby command or a sleep command to convert the power management module to the standby state or the sleep state. When the power management module is in the sleep state, if the wake-up signal is detected or the MCU sends a wake-up command, the power management module will switch from the sleep state to the wake-up state, and finally enter the normal state.
[0131] The CAN network includes three states, namely, network sleep state, network ready sleep state and network wake-up state, among which the network wake-up state includes: repeated message state, normal operation state and ready sleep state. In the network sleep state, the ECU does not send any message to the CAN bus, nor does it process the received message; in the network ready sleep state, the ECU can receive and send some management messages, but does not process other types of messages; in the network wake-up state, the ECU can receive and send all types of messages; in the repeated message state, the ECU will repeatedly send network management messages to inform other ECUs of its existence and communication needs. This is the initial state after the ECU is awakened, which is used to quickly establish network communication; in the normal operation state, the ECU will periodically send network management messages and application messages for normal network communication. In the ready sleep state, the ECU is ready to enter the sleep state, but it will still monitor whether it has received a wake-up request or network management message. If these requests are not received, the ECU will enter the network sleep state.
[0132] Figure 8 It is the conversion process of CAN network sleep state, such as Figure 8 As shown in the figure, when no wake-up source is received, the CAN network first switches from the normal operation state to the ready sleep state. In the ready sleep state, if no wake-up source is received within a certain period of time, it will switch to the network ready sleep state. If in the network ready sleep state, the ECU does not receive a wake-up request and network management message within a certain period of time, it will eventually switch to the network sleep state. Fig. 9 It is the conversion process of CAN network wake-up state, such as Fig. 9 As shown, when the CAN network receives a wake-up source in the network sleep state, it will first switch to the repeated message state. In the repeated message state, when the ECU detects that other ECUs on the CAN bus have been awakened and are ready to communicate, the CAN network will eventually switch from the repeated message state to the normal operation state.
[0133] Fig.10 This is a schematic diagram of the structure of the energy-saving control device of the ECU provided in the embodiment of the present application. Fig.10 As shown, the energy-saving control device of the ECU includes: an MCU 1001, a CAN transceiver 1002 and a power management module 1003;
[0134] Among them, MCU 1001 is used to detect the wake-up source of the ECU; if the ECU does not have a wake-up source, MCU 1001 is also used to set the CAN transceiver 1002 to a sleep state, and the CAN transceiver 1002 stops sending and receiving messages in the sleep state; MCU1001 is also used to obtain the level state of the wake-up pin of the power management module 1003, and the wake-up pin of the power management module 1003 is connected to the CAN transceiver 1002; MCU1001 is also used to control the power management module 1003 to sleep according to the level state.
[0135] The energy-saving control device of the ECU provided in the embodiment of the present application can be used to execute the technical solution of the energy-saving control method of the ECU in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0136] Fig.11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device may include: a transceiver 1101 , a processor 1102 , and a memory 1103 .
[0137] The processor 1102 executes the computer execution instructions stored in the memory, so that the processor 1102 executes the scheme in the above embodiment. The processor 1102 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0138] The memory 1103 is connected to the processor 1102 via a system bus and completes communication between them. The memory 1103 is used to store computer program instructions.
[0139] The transceiver 1101 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0140] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.
[0141] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0142] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the energy-saving control method of the ECU in the above embodiment.
[0143] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the energy-saving control method of the ECU in the above embodiment.
[0144] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution of the energy-saving control method of the ECU in the above embodiment can be implemented.
[0145] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0146] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0147] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0148] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0149] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0150] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0151] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0152] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0153] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0154] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0155] 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. An energy-saving control method for an ECU, characterized in that: The MCU applied to the ECU includes: the MCU, a CAN transceiver and a power management module, and the method includes: Detecting a wake-up source of the ECU; If the ECU does not have a wake-up source, the CAN transceiver is set to a sleep state, and the CAN transceiver stops sending and receiving messages in the sleep state; Acquire the level state of the wake-up pin of the power management module, where the wake-up pin of the power management module is connected to the CAN transceiver; The power management module is controlled to sleep according to the level state.
2. The method according to claim 1, characterized in that The step of controlling the power management module to sleep according to the level state includes: Obtaining the current on the MCU; The power management module is controlled to sleep according to the level state and the current.
3. The method according to claim 2, characterized in that The step of controlling the power management module to sleep according to the level state and the current includes: If the level state is a low level and the current on the MCU is less than or equal to a preset current threshold, the power management module is controlled to be in a sleep state, and the power management module supplies power to the MCU transceiver and the CAN transceiver in the sleep state; If the level state is a low level and the current on the MCU is greater than the preset current threshold, the power management module is controlled to be in a standby state, and the power management module supplies power to the CAN transceiver in the standby state.
4. The method according to any one of claims 1 to 3, characterized in that Before setting the CAN transceiver to a sleep state, the method further includes: The network state of the MCU is set to a network sleep state, in which the MCU stops processing messages between the ECU and other ECUs.
5. The method according to claim 4, characterized in that The method further comprises: If the wake-up source exists, obtaining the state of the power management module; If the power management module is in the standby state, the power management module is controlled to enter the initialization state. In the initialization state, the power management module supplies power to the MCU so that the MCU performs an initialization process. The initialization process is used to restore the MCU and the CAN transceiver to a normal state.
6. The method according to claim 5, characterized in that The method further comprises: If the power management module is in a sleep state, the network state of the MCU is restored from a network sleep state to a repeated message state, and the CAN transceiver is controlled to be restored from a sleep state to a normal state, and the power management module enters a wake-up state; According to the type of the wake-up source, the network state of the MCU is switched from the repeated message state to the target state, and the type of the wake-up source includes an active wake-up source and a passive wake-up source; When the target state is a normal operating state, the power management module is controlled to recover from the awake state to a normal state.
7. The method according to claim 6, characterized in that The switching of the network state of the MCU from the repeated message state to the target state according to the type of the wake-up source includes: If the wake-up source is an active wake-up source, switching the network state of the MCU from the repeated message state to a normal operation state; If the wakeup source is a passive wakeup source, obtaining a network request operation; If the network request operation is obtained, the network state of the MCU is switched from the repeated message state to the normal operation state; If the network request operation is not obtained, the network state of the MCU is switched from the repeat message state to the ready sleep state.
8. An energy-saving control device for an ECU, characterized in that: include: MCU, CAN transceiver and power management module; The MCU is used to detect the wake-up source of the ECU; If the ECU does not have a wake-up source, the MCU is further used to set the CAN transceiver to a sleep state, and the CAN transceiver stops sending and receiving messages in the sleep state; The MCU is further used to obtain the level state of the wake-up pin of the power management module, where the wake-up pin of the power management module is connected to the CAN transceiver; The MCU is further used to control the power management module to sleep according to the level state.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method 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, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.