Electronic device and related reset recovery method
By utilizing timing control and pin connections without complete power outage, the reset operation of multi-core processors is realized, which solves the problem of data loss caused by reset in dual-core systems and ensures the time accuracy and reset stability of electronic equipment. .
Patent Information
- Application Number
- PCT/CN2024/078813
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-01
- Filing Date
- 2024-02-27
- Publication Date
- 2024-09-06
AI Technical Summary
In a dual-core system, when an abnormality occurs in the dual-core processor, the existing technology requires the entire electronic device to be powered off to implement the reset operation, resulting in the loss of real-time clock register data and affecting the time accuracy after reset and restart.
By utilizing timing control and pin connections without complete power outage, the reset operation of the multi-core processor is implemented to ensure the retention of real-time clock register data, thereby solving the problem of data loss.
It realizes the reset operation of multi-core processors without affecting the time accuracy, avoids data loss caused by power outage of the entire machine, and improves the reset stability and recovery speed of electronic equipment.
Smart Images

Figure CN2024078813_06092024_PF_FP
Abstract
Description
Electronic device and related reset recovery method
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 1, 2023, with application number 202310232591.4, and priority to the Chinese patent application entitled “An electronic device and related reset recovery method”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal devices, and in particular to an electronic device and a related reset recovery method. Background Art
[0003] Existing electronic devices (such as smart watches) generally use dual-core processors. In a dual-core system, one processing core can be an application processor (AP) that can be used to process business logic such as the user interface (UI), and the other processing core is generally a low-power microcontroller unit (MCU) processor that can implement functions such as a sensing hub. The dual-core design can not only ensure smooth UI business, but also reduce power consumption and improve the battery life of electronic devices.
[0004] Currently, in a dual-core system, if an abnormality occurs in the dual-core or one of the cores is stuck, it will cause the entire electronic device to malfunction. Therefore, a recovery plan for the stability of the entire device is needed, such as by resetting the processing core. When a problem occurs in one of the processing cores in the dual-core processor, the problematic processing core can be reset; when both cores in the electronic device are abnormal, both cores can be reset, and the electronic device can return to normal working state. In the existing solution, the entire electronic device needs to be powered off (including all registers needing to be powered off) in order to implement the dual-core reset operation, but directly powering off the electronic device will cause the data in the real-time clock register to be lost, affecting the time accuracy of the electronic device after reset and restart.
[0005] Therefore, how to provide an electronic device and a related reset recovery method that can implement a reset operation of a multi-core processor when the electronic device is not completely powered off is an urgent problem to be solved.
[0006] Summary of the Invention
[0007] The technical problem to be solved by the embodiments of the present application is how to provide an electronic device and a related reset recovery method to implement a reset operation of a multi-core processor when the electronic device is not completely powered off.
[0008] In a first aspect, an embodiment of the present application provides an electronic device, characterized in that the electronic device includes a first processing core, a second processing core and a power management unit, the first output pin of the first processing core is connected to the first input pin of the second processing core, the first reset pin of the first processing core is connected to the first control pin of the second processing core, the second reset pin of the second processing core is respectively connected to the second control pin of the first processing core and the third control pin of the power management unit, and the second processing core is used to: when the second reset pin of the second processing core receives a reset signal, the second processing core enters a reset state; judge whether the first input pin is in a first state, and if the first input pin is in the first state, send a reset signal to the first reset pin through the first control pin, so that the first processing core enters a reset state.
[0009] Since the second reset pin of the second processing core is connected to both the second control pin of the first processing core and the third control pin of the power management unit, it is difficult to determine which device sent the reset signal after the second processing core receives the reset signal. In the present application, if the reset signal is sent by the first processing core, the first processing core will also set the first input pin of the second processing core to a second state (such as a high level state) when sending the reset signal. Therefore, when the second processing core receives the reset signal and completes the reset, the state of the first input pin of the second processing core can be determined to determine which device initiated the reset signal received by the second processing core. Specifically, when the first input pin is in the first state (such as a low level state) after the second processing core completes the reset, it means that the reset signal was initiated by the user triggering the power management unit, and a multi-core reset is required. After the reset of the second processing core is completed, the second processing core also needs to control the first processing core to enter the reset state, that is, the second processing core can send a reset signal to the first reset pin of the first processing core via the first control pin, causing the first processing core to enter the reset state, thereby achieving a multi-core reset without completely powering off the electronic device. However, in some embodiments, if a multi-core processor freezes, a multi-core reset is typically performed using the processor's power-off and restart function. This involves cutting off the power supply to the dual-core chip at the back end, thereby resetting the entire system. This has the disadvantage that the real-time clock register cannot maintain time after the entire system loses power, resulting in data loss in the real-time clock register, affecting the accuracy of time after the reset and restart. However, the entire system reset solution (such as the dual-core reset solution) in the embodiments of the present application does not cause the entire system to lose power. Instead, it achieves the purpose of reset by pulling the reset pin of the other chip through certain timing control, which can solve the problem of the real-time clock register being unable to maintain time.
[0010] In some embodiments, the power management unit is used to: send a reset signal to the second reset pin of the second processing core through the third control pin in response to a user operation, and the user operation includes the user long pressing the power button; the second processing core is also used to: receive the reset signal sent by the third control pin through the second reset pin.
[0011] In an embodiment of the present application, the power button can be connected to the power management unit, and the third control pin of the power management unit can be connected to the second reset pin of the second processing core. When the electronic device is stuck, the user can trigger the reset operation of the processing core by long pressing the power button. For example, the user can trigger the power management unit to send a reset signal to the second reset pin of the second processing core by long pressing the power button, thereby triggering the second processing core to enter the reset state, and the second processing core can be restored to the initial configuration state.
[0012] In some embodiments, the first processing core is used to: when it is detected that the response time of the second processing core exceeds a preset time, control the first input pin to switch from the first state to the second state through the first output pin; send a reset signal to the second reset pin through the second control pin; the second processing core is also used to: receive the reset signal sent by the second control pin through the second reset pin.
[0013] In an embodiment of the present application, after the first processing core sends a request to the second processing core, if the second processing core does not respond for a long time, the first processing core can determine that the second processing core has an abnormality and needs to be reset. Then, the first processing core can control the first input pin through the first output pin to switch from a first state (such as a low-level state) to a second state (such as a high-level state) to inform the second processing core that this reset is initiated by the first processing core, and the first processing core can send a reset signal to the second reset pin of the second processing core through the second control pin, so that the second processing core enters the reset state, so that the processing core can return to a normal working state.
[0014] In some embodiments, the second input pin of the first processing core is connected to the second output pin of the second processing core, and the second processing core is further used to: if the first input pin is in the second state, control the second input pin to switch from the third state to the fourth state through the second output pin; the first processing core is further used to: determine whether the second input pin is in the fourth state, and if the second input pin is in the fourth state, control the first input pin to switch from the second state to the first state through the first output pin.
[0015] In an embodiment of the present application, the first output pin is connected to the first input pin of the second processing core; the second input pin is connected to the second output pin of the second processing core. When the reset of the second processing core is completed, if it is determined that the first input pin is in the second state (such as a high level state), it means that the reset is initiated by the first processing core and there is no need to perform a multi-core reset operation. Furthermore, the second processing core can control the second input pin of the first processing core to switch from a third state (such as a low level state) to a fourth state (such as a high level state) through the second output pin, which is used to reply to the first processing core's current processing state of the second processing core, that is, the second input pin is in the fourth state, indicating that the reset of the second processing core has been completed. Next, the first processing core can determine whether the second input pin is in the fourth state. If the second input pin is in the fourth state, the first input pin is controlled by the first output pin to switch from the second state to the first state, so that the electronic device can complete the single-core reset operation and the first processing core can access the second processing core normally.
[0016] In some embodiments, the first processing core is further configured to: if the second input pin is in the third state within a preset time period, control the first input pin to switch from the second state to the first state via the first output pin.
[0017] In an embodiment of the present application, when the first processing core controls the second processing core to enter the reset state, and the second input pin of the first processing core has been in the third state (such as a low level state) within a custom time period, it means that the second processing core has not replied to the information after the reset is completed. In order to avoid the first processing core being in a waiting state for a long time, the first processing core can actively control the first input pin through the first output pin to switch from the second state to the first state, so that the multi-core processor completes the single-core reset operation, and the first processing core can access the second processing core normally.
[0018] In some embodiments, the second processing core is further configured to: upon detecting that the first input pin switches from the second state to the first state, control the second input pin to switch from the fourth state to the third state through the second output pin.
[0019] In an embodiment of the present application, when the second processing core detects that the first input pin switches from the second state to the first state, it indicates that the first processing core can access the second processing core normally. Therefore, the second processing core can control the second input pin to switch from the fourth state to the third state through the second output pin, so that the second processing core can be fully restored to a normal working state, that is, the second processing core can also access the first processing core normally, thereby realizing normal dual-core interaction between the first processing core and the second processing core.
[0020] In second aspect, the present application provides a reset recovery method, characterized in that it is applied to an electronic device, the electronic device comprising a first processing core, a second processing core and a power management unit, the first output pin of the first processing core is connected to the first input pin of the second processing core, the first reset pin of the first processing core is connected to the first control pin of the second processing core, and the second reset pin of the second processing core is respectively connected to the second control pin of the first processing core and the third control pin of the power management unit, the method comprising: when the second reset pin of the second processing core receives a reset signal, the second processing core enters a reset state; through the second processing core, judging whether the first input pin is in the first state; if the first input pin is in the first state, sending a reset signal to the first reset pin through the first control pin, so that the first processing core enters a reset state.
[0021] In some embodiments, the method further includes: sending a reset signal to the second reset pin of the second processing core through the third control pin in response to a user operation through the power management unit, wherein the user operation includes a long press of the power button by the user; and receiving the reset signal sent by the third control pin based on the second reset pin through the second processing core.
[0022] In some embodiments, the method further includes: when the first processing core detects that the response time of the second processing core exceeds a preset time, controlling the first input pin to switch from the first state to the second state through the first output pin; sending a reset signal to the second reset pin through the second control pin; and receiving the reset signal sent by the second control pin based on the second reset pin through the second processing core.
[0023] In some embodiments, the second input pin of the first processing core is connected to the second output pin of the second processing core, and the method further includes: if the first input pin is in the second state, the second processing core controls the second input pin to switch from the third state to the fourth state through the second output pin; and determines, through the first processing core, whether the second input pin is in the fourth state; if the second input pin is in the fourth state, controls the first input pin to switch from the second state to the first state through the first output pin.
[0024] In some embodiments, the method further includes: if the second input pin is in a third state within a preset time period, the first processing core controlling the first input pin to switch from the second state to the first state through the first output pin.
[0025] In some embodiments, the method further includes: after detecting, by the second processing core, that the first input pin switches from the second state to the first state, controlling, by the second output pin, the second input pin to switch from the fourth state to the third state.
[0026] In the third aspect, the present application provides a reset recovery method, characterized in that it is applied to the second processing core, the first input pin of the second processing core is connected to the first output pin of the first processing core, the first control pin of the second processing core is connected to the first reset pin of the first processing core, and the second reset pin of the second processing core is respectively connected to the second control pin of the first processing core and the third control pin of the power management unit. The method includes: when the second reset pin of the second processing core receives a reset signal, the second processing core enters a reset state; through the second processing core, it is determined whether the first input pin is in the first state; if the first input pin is in the first state, a reset signal is sent to the first reset pin through the first control pin, so that the first processing core enters a reset state.
[0027] In some embodiments, the method further includes: receiving a reset signal sent by the third control pin based on the second reset pin, wherein the reset signal sent by the third control pin is a reset signal sent by the power management unit in response to a user operation, and the user operation includes the user long pressing the power button.
[0028] In some embodiments, the method further includes: receiving a reset signal sent by the second control pin based on the second reset pin, wherein the reset signal sent by the second control pin is a reset signal sent when the first processing core detects that the response time of the second processing core exceeds a preset time.
[0029] In some embodiments, the second input pin of the first processing core is connected to the second output pin of the second processing core, and the method further includes: if the first input pin is in the second state, controlling the second input pin to switch from the third state to the fourth state through the second output pin, so that after the first processing core detects that the second input pin is in the fourth state, it controls the first input pin to switch from the second state to the first state through the first output pin, wherein the second state is a high-level state initiated by the first processing core to the first input pin.
[0030] In some embodiments, the method further includes: after detecting that the first input pin switches from the second state to the first state, controlling the second input pin to switch from the fourth state to the third state through the second output pin.
[0031] In a fourth aspect, the present application provides a control processing unit, characterized in that the first input pin of the control processing unit is connected to the first output pin of the application processing unit, the first control pin of the control processing unit is connected to the first reset pin of the application processing unit, and the second reset pin of the control processing unit is respectively connected to the second control pin of the application processing unit and the third control pin of the power management unit. The control processing unit is used to: when the second reset pin of the control processing unit receives a reset signal, the control processing unit enters a reset state; judge whether the first input pin is in a first state, and if the first input pin is in the first state, send a reset signal to the first reset pin through the first control pin, so that the application processing unit enters a reset state. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
[0033] FIG2 is a schematic diagram of the internal structure of an electronic device provided in an embodiment of the present application.
[0034] FIG3 is a control timing diagram of a dual-core reset and a single-core reset provided by an embodiment of the present invention.
[0035] FIG4 is a control timing diagram of a dual-core reset of a smart watch provided in an embodiment of the present application.
[0036] FIG5 is a control timing diagram of a smart watch core reset provided by an embodiment of the present application.
[0037] FIG6 is a flowchart of a method for resetting and restoring an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0039] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a specific order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0040] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0041] Based on the technical problems raised above, in order to facilitate understanding of the embodiments of the present invention, the electronic device on which the embodiments of the present invention are based is described below. The electronic device in this application can be a smart wearable device (such as a smart watch), a smart phone, a tablet computer, etc. Please refer to Figure 1, which is a structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device 100 may include but is not limited to a first processing core 101, a second processing core 102, a first power management unit 103, a second power management unit 104, and a battery 105, etc., wherein,
[0042] The first processing core 101 can run an operating system, a file system (such as a flash file system F2FS) or an application program, etc., to control multiple hardware or software components connected to the first processing core 101, and can process various data and perform operations. The first processing core 101 can load instructions or data stored in an external memory (the electronic device 100 may also include an external memory not shown in FIG1 ) into an internal memory (the electronic device 100 may also include an internal memory not shown in FIG1 ), and transfer the instructions or data that need to be calculated to the first processing core 101 for calculation. After the calculation is completed, the first processing core 101 temporarily stores the result in the internal memory, and stores the instructions or data that need to be stored for a long time in the external memory. The first processing core 101 may include one or more processing units, for example, a central processing unit (CPU), an application processing unit (AP), a modem processing unit, a graphics processing unit (GPU), an image signal processing unit (ISP), a video codec unit, a digital signal processing unit (DSP), a baseband processing unit, and a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more devices. In some embodiments, the first processing core 101 may be an application processing unit that can be used to process business logic such as a user interface (UI).
[0043] The second processing core 102 can be a low-power micro-control unit (MCU) processor that can realize functions such as a sensing hub. It should be noted that the main function of the sensing hub is to connect and process data from various sensor devices. The dual-core design of the electronic device 100 can not only ensure smooth UI business, but also reduce power consumption and improve the battery life of the electronic device 100. At present, in an electronic device 100 with a multi-core processor, if multiple processing cores have abnormalities or a processing core is stuck, it will cause the entire electronic device 100 to function abnormally. Therefore, a recovery solution for the stability of the entire device is required, such as by resetting the processing core. When a problem occurs in one of the processing cores in the dual-core processor, the problematic processing core can be reset separately; when both processing cores have abnormalities, both processing cores can be reset, and the electronic device 100 can return to normal working state.
[0044] The first power management unit 103 and the second power management unit 104 can manage the power of the electronic device 100. The first power management unit 103 can be used to manage the power of the first processing core 101 (e.g., an application processor), and the second power management unit 104 can be used to manage the power of the second processing core 102 (e.g., a microcontroller). The first power management unit 103 can be connected to the first processing core 101 and the battery 105; the second power management unit 104 can be connected to the second processing core 102 and the battery 105. The first power management unit 103 and the second power management unit 104 can receive input from the battery 105 and respectively power the first processing core 101 and the second processing core 102. The first power management unit 103 and the second power management unit 104 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). The battery 105 can include a rechargeable battery and / or a lithium battery.
[0045] In some embodiments, if multiple processing cores in the electronic device 100 are abnormal, or a processing core is stuck, the entire electronic device 100 will be abnormal. If one of the dual-core processing cores is abnormal, the configuration of the processing core can be restored to its initial state by controlling the reset button of the processing core, thereby achieving a reset operation. If both dual cores (such as the AP and the MCU) are abnormal, the first power management unit 103 and the second power management unit 104 can respectively control the first processing core 101 and the second processing core 102 to be completely powered off, so as to achieve the effect of powering off the entire device, thereby achieving a reset operation of the entire device. However, directly powering off the electronic device 100 will cause the loss of data in various registers such as the real-time clock register, affecting the time accuracy of the electronic device 100 after reset and restart, etc., resulting in the electronic device 100 being unable to quickly return to normal use. In order to solve the above technical problems, a reset recovery scheme for a multi-core processor is proposed in this application, which can achieve a reset operation of the multi-core processor when the electronic device 100 is not completely powered off. The detailed description will be given later and will not be repeated here.
[0046] It can be understood that the electronic device 100 in FIG. 1 is only some exemplary implementations provided by the embodiments of the present invention, and the electronic devices in the embodiments of the present invention include but are not limited to the above implementations.
[0047] The embodiments of the present application are described below with reference to the accompanying drawings.
[0048] The present embodiment of the present application can improve the first processing core 101 and the second processing core 102 in the electronic device 100 in Figure 1 above to implement a reset operation of the multi-core processor when the electronic device 100 is not completely powered off. Please refer to Figure 2, which is a schematic diagram of the internal structure of an electronic device provided in the embodiment of the present application. The electronic device 100 in the embodiment of the present application will be described in detail below in conjunction with Figure 2. The electronic device 100 may include but is not limited to a first processing core 101, a second processing core 102, and a power management unit (the power management unit is described below as the second power management unit 104 in Figure 1), wherein the first output pin of the first processing core 101 is connected to the first input pin of the second processing core 102; the first reset pin of the first processing core 101 is connected to the first control pin of the second processing core 102; the second control pin of the first processing core 101 is connected to the second reset pin of the second processing core 102; the third control pin of the second power management unit 104 is connected to the second reset pin of the second processing core 102; and the second input pin of the first processing core 101 is connected to the second output pin of the second processing core 102. The second reset pin of the second processing core 102 is connected to both the second control pin of the first processing core 101 and the third control pin of the second power management unit 104. After the second processing core 102 receives a reset signal, it is difficult to determine which device sent the reset signal. To solve this technical problem, the electronic device 100 is improved. The detailed process is as follows:
[0049] The second processing core 102 is configured to enter a reset state when a second reset pin of the second processing core 102 receives a reset signal.
[0050] Specifically, the first input pin may be an input pin on the second processing core 102; the first control pin may be an input / output (IO) pin on the second processing core 102; the first reset pin may be a reset pin on the first processing core 101; and the second reset pin may be a reset pin on the second processing core 102. The reset signal may be understood as a pulse signal, such as a high-low level signal; and the reset state may be understood as the process of clearing the current configuration of the processing core and restoring it to the initial configuration state after receiving the reset signal.
[0051] The second processing core 102 is further configured to: after the second processing core 102 is reset, determine the current pin state of the first input pin; if the first input pin is in the first state, send a reset signal to the first reset pin via the first control pin, so that the first processing core 101 enters the reset state.
[0052] Specifically, since the second reset pin of the second processing core 102 is connected to both the second control pin of the first processing core 101 and the third control pin of the second power management unit 104, after the second processing core 102 receives the reset signal, it is difficult to determine which device sent the reset signal. Therefore, in the present application, if the reset signal is sent by the first processing core 101, the first processing core 101 will also output a high-level signal to the second processing core 102 while sending the reset signal, so that the first input pin of the second processing core 102 is in a second state (such as a high-level state). Furthermore, when the second processing core 102 receives the reset signal and the reset is completed, the state of the first input pin of the second processing core 102 can be determined to determine which device initiated the reset signal received by the second processing core 102.
[0053] In the present application, if the first input pin of the second processing core 102 is in a first state (e.g., a low level state) after the second processing core 102 is reset, it indicates that the reset signal was initiated by the user controlling the second power management unit 104. It is understandable that when both cores in the electronic device 100 experience an abnormality, the user can long-press the power button to trigger the third control pin of the second power management unit 104 to send a reset signal to the second processing core 102. In this case, after the second processing core 102 is reset, the second processing core 102 also needs to control the first processing core 101 to enter a reset state. That is, the second processing core 102 can send a reset signal to the first reset pin of the first processing core 101 via the first control pin, causing the first processing core 101 to also enter a reset state, thereby achieving a multi-core reset without completely powering off the electronic device 100.
[0054] If, after the second processing core 102 is reset, the first input pin of the second processing core 102 is in the second state (e.g., a high level state), this indicates that the reset signal was initiated by the first processing core 101. It is understood that if the first processing core 101 can normally access the second processing core 102, this indicates that the first processing core 101 is in normal working order and does not require a reset operation. Therefore, after the second processing core 102 is reset, the reset operation can be terminated and normal working order can be resumed.
[0055] It should be noted that the first state may include a low-level state, but the signal state of the first state can be determined according to the specific system settings, and the present application is not limited to the low-level state; the second state may be a high-level state, but the signal state of the second state can be determined according to the specific system settings, and the present application is not limited to the high-level state.
[0056] However, in some embodiments, if a multi-core processor freezes, a multi-core reset is typically performed using the multi-core processor's power-off and restart function. This involves cutting off the power supply to the dual-core chips at the back end, thereby resetting the entire device. However, this has the disadvantage that the real-time clock register cannot maintain time after the entire device loses power, resulting in data loss in the real-time clock register, which affects the time accuracy of the electronic device 100 after the reset and restart. The entire device reset solution (such as the dual-core reset solution) in the embodiments of the present application does not cause the entire device to lose power. Instead, it achieves the reset purpose by pulling the reset pin of the other chip through certain timing control, which can solve the problem of the real-time clock register being unable to maintain time.
[0057] For example, the first processing core 101 may be an AP chip, and the second processing core 102 may be an MCU chip. When the MCU chip receives a reset signal and the reset is completed, the pin state of the first input pin (which may also be represented by RST_FLAG_PIN) may be determined. If the pin is in a low level state (such as RST_FLAG_PIN=0), it indicates that the reset signal is initiated by the second power management unit 104. After the MCU chip is reset, a dual-core reset operation is required. The MCU chip sends a reset signal to the first reset pin (which may also be represented by RST_PIN) of the AP chip through the first control pin (which may also be represented by AP_RST), causing the AP chip to enter a reset state, thereby enabling a dual-core reset operation to be implemented without powering off.
[0058] Next, with reference to FIG3 , which is a control timing diagram of a dual-core reset and a single-core reset provided by an embodiment of the present invention, the reset process initiated by the user (i.e., triggering scenario 1) and the reset process initiated by the first processing core 101 (i.e., triggering scenario 2) in this application will be described in detail. For triggering scenario 1, the electronic device 100 may sequentially execute steps S201A, S202, S203, S204A, and S205A; for triggering scenario 2, the electronic device 100 may sequentially execute steps S201B, S202, S203, S204B, and S205B, as described in detail as follows:
[0059] Step S201A: the second power management unit 104 responds to the user operation and sends a reset signal to the second reset pin of the second processing core 102 .
[0060] Specifically, the user operation may be a long press of the power button, which can be understood as a trigger condition for triggering scenario 1 (ie, the reset process initiated by the user).
[0061] Step S201B: When the first processing core 101 detects that the response time of the second processing core 102 is longer than the preset time, the first processing core 101 controls the first input pin to be in the second state through the first output pin, and sends a reset signal to the second reset pin through the second control pin.
[0062] Specifically, the preset duration can be a custom duration. After the electronic device 100 is started, the first processing core 101 can interact normally with the second processing core 102. After the first processing core 101 sends a request to the second processing core 102, if the second processing core 102 does not respond for a long time, the first processing core 101 can determine that the second processing core 102 is abnormal and needs to be reset. Then, the first processing core 101 can control the first input pin to be in a second state (such as a high level state) through the first output pin to inform the second processing core 102 that this reset is initiated by the first processing core 101, and the first processing core 101 can send a reset signal to the second reset pin of the second processing core 102 through the second control pin, so that the second processing core 102 enters the reset state. It can be understood as a trigger condition for triggering scenario 2 (i.e., the reset process initiated by the first processing core 101).
[0063] Optionally, the first output pin may send a high level signal to the first input pin, so that the first input pin is in the second state.
[0064] Step S202: the second processing core 102 receives a reset signal and enters a reset state.
[0065] Specifically, the power button of the electronic device 100 can be connected to the second power management unit 104, and the third control pin of the second power management unit 104 can be connected to the second reset pin of the second processing core 102. In trigger scenario 1, when the electronic device 100 is stuck, the user can trigger the reset operation of the second processing core 102 by long pressing the power button. For example, the user can long press the power button to cause the second power management unit 104 to send a reset signal to the second reset pin, thereby triggering the second processing core 102 to enter a reset state, and the second processing core 102 can be restored to an initial configuration state. In trigger scenario 2, the first processing core 101 can send a reset signal to the second reset pin through the second control pin when detecting that the second processing core 102 has an abnormality, thereby triggering the second processing core 102 to enter a reset state after receiving the reset signal sent by the first processing core 101, so that the second processing core 102 can be restored to an initial configuration state.
[0066] Step S203 : After the second processing core 102 is reset, the pin status of the first input pin is determined.
[0067] Specifically, since the second reset pin of the second processing core 102 is connected to both the second control pin of the first processing core 101 and the third control pin of the second power management unit 104, it is difficult to determine which device sent the reset signal after the second processing core 102 receives the reset signal. Therefore, in the present application, if the reset signal is sent by the first processing core 101, the first processing core 101 will also set the first input pin of the second processing core 102 to a second state (such as a high level state) while sending the reset signal. Furthermore, when the second processing core 102 receives the reset signal and the reset is completed, the state of the first input pin of the second processing core 102 can be determined to determine which device initiated the reset signal received by the second processing core 102.
[0068] It should be noted that after the second processing core 102 executes step S203 , if it is determined that the first input pin is in the first state, step S204A is executed; if it is determined that the first input pin is in the second state, step S204B is executed.
[0069] Step S204A: If the second processing core 102 determines that the first input pin is in the first state, it sends a reset signal to the first reset pin through the first control pin.
[0070] Step S205A: the first processing core 101 receives the reset signal sent by the second processing core 102 and enters a reset state.
[0071] It should be noted that after the first processing core 101 is reset, the first processing core 101 can interact normally with the second processing core 102 .
[0072] For example, the electronic device 100 is a smart watch, the first processing core 101 is an AP core, and the second processing core 102 is an MCU core. As shown in FIG4 , FIG4 is a control timing diagram of a dual-core reset of a smart watch provided by an embodiment of the present application. In the figure, the power button can be connected to the power management unit of the MCU core (i.e., the second power management unit 104), and the power management unit of the MCU core can be connected to the MCU core; the MCU core can also be connected to the power management unit of the AP core, and the power management unit of the AP core can be connected to the AP core. If the smart watch encounters an unrecoverable abnormality such as a complete machine freeze, the user can control the power management unit on the MCU core side to reset the MCU core by long pressing the power button for several seconds. After the MCU core restarts, since the AP core does not set the RST_FLAG_PIN to the second state (such as a high level state), the MCU core will send a reset signal to the reset pin of the AP core to reset and restore the AP core, thereby achieving the purpose of resetting both cores without completely powering off the electronic device 100. Furthermore, after both cores are reset, the AP core can perform a normal dual-core interaction process with the MCU core.
[0073] Step S204B: If the second processing core 102 determines that the first input pin is in the second state, the second processing core 102 controls the second input pin to switch from the third state to the fourth state via the second output pin.
[0074] Specifically, the second input pin can be another IO pin on the first processing core 101, and the second input pin is connected to the second output pin of the second processing core 102. When the reset of the second processing core 102 is completed, if it is determined that the first input pin is in the second state, such as the high level state (i.e., RST_FLAG_PIN = 1), it indicates that the reset was initiated by the first processing core 101. Furthermore, the second processing core 102 can control the second input pin of the first processing core 101 to switch from the third state (e.g., the low level state) to the fourth state (e.g., the high level state) through the second output pin, which can be represented by RST_RSP_PIN = 1, to reply to the first processing core 101 of the current processing state of the second processing core 102, that is, the second input pin being in the fourth state indicates that the reset of the second processing core 102 is complete.
[0075] Optionally, the second output pin may send a high level signal to the second input pin, so that the second input pin is in the fourth state.
[0076] It should be noted that the third state may include a low-level state, but the signal state of the third state can be determined according to the specific system settings, and the present application is not limited to the low-level state; the fourth state may be a high-level state, but the signal state of the fourth state can be determined according to the specific system settings, and the present application is not limited to the high-level state.
[0077] Step S205B: The first processing core 101 is further configured to determine whether the second input pin is in the fourth state, and if the second input pin is in the fourth state, control the first input pin to switch from the second state to the first state via the first output pin.
[0078] Specifically, the first processing core 101 can determine whether the second input pin is in the fourth state. If the second input pin is in the fourth state, the first output pin is used to control the first input pin to switch from the second state (such as a high level state) to the first state (such as a low level state), so that the electronic device 100 completes the single-core reset operation, and the first processing core 101 can access the second processing core 102 normally.
[0079] Optionally, the first output pin may send a low-level signal to the first input pin, so that the first input pin switches from the second state to the first state.
[0080] In some embodiments, the second processing core 102 is further configured to: after detecting that the first input pin switches from the second state to the first state, control the second input pin to switch from the fourth state to the third state through the second output pin.
[0081] Specifically, when the second processing core 102 detects that the first input pin switches from the second state (such as a high level state) to the first state (such as a low level state), it indicates that the first processing core 101 can normally access the second processing core 102. Furthermore, the second processing core 102 can control the second input pin to switch from the fourth state (such as a high level state) to the third state (such as a low level state) through the second output pin, so that the second processing core 102 can be fully restored to a normal working state, that is, the second processing core 102 can also normally access the first processing core 101, thereby realizing normal dual-core interaction between the first processing core 101 and the second processing core 102.
[0082] Optionally, the second output pin may send a low-level signal to the second input pin, so that the second input pin switches from the fourth state to the third state.
[0083] In some embodiments, after the second processing core 102 executes step S202, if the second processing core 102 determines that the first input pin is in the second state, it can end the reset operation and no longer execute steps S204B and S205B. Furthermore, the first processing core 101 and the second processing core 102 can interact normally.
[0084] In some embodiments, the first processing core 101 is further configured to: if the second input pin is in the third state within a preset time period, control the first input pin to switch from the second state to the first state via the first output pin.
[0085] Specifically, the preset time period can be a custom time period. When the first processing core 101 controls the second processing core 102 to enter the reset state, and the second input pin of the first processing core 101 is in the third state (such as a low level state) during the custom time period, it can indicate that the second processing core 102 has not responded to the information normally after the reset is completed. In order to avoid the first processing core 101 being in a waiting state for a long time, the first processing core 101 can actively control the first input pin through the first output pin to switch from the second state (such as a high level) to the first state (such as a low level state), so that the electronic device 100 can complete the single-core reset operation, and the first processing core 101 can access the second processing core 102 normally.
[0086] It should be noted that if after the first processing core 101 sends a reset signal to the second processing core 102, the second input pin of the first processing core 101 has been in the third state (such as a low level state) within a custom time period, it may also indicate that the second processing core 102 has not performed a reset operation, or the reset is not completed. To avoid the first processing core 101 being in a waiting state for a long time, the first processing core 101 can actively control the first input pin through the first output pin to switch from the second state (such as a high level) to the first state (such as a low level state), so that the first processing core 101 can normally access the second processing core 102. If the access times out, the first processing core 101 will send a reset signal to the second processing core 102 again to reset the second processing core 102 again.
[0087] For example, the electronic device 100 is a smartwatch, the first processing core 101 is an AP core, and the second processing core 102 is an MCU core. As shown in FIG5 , FIG5 is a control timing diagram of a single core reset of a smartwatch provided by an embodiment of the present application. In the figure, in a scenario where the AP core detects that the MCU core is abnormal and cannot be recovered, the AP core software can switch the RST_FLAG_PIN from a first state (e.g., a low level state) to a second state (e.g., a high level state) to indicate that this is the AP core actively resetting the MCU scenario, and then send a reset signal to the reset pin of the MCU core to reset and restore the MCU core. After the MCU core is restarted and restored, the MCU core identifies the restart type of this reset by identifying the state of the RST_FLAG_PIN. When RST_FLAG_PIN = 1, it indicates that this reset operation is a single-core reset operation initiated by the AP core. Then, after the MCU core reset is complete, the MCU core can switch the RST_RSP_PIN pin from a third state (e.g., a low level state) to a fourth state (e.g., a high level state) to inform the AP core that the MCU core reset is complete and the AP core can access the MCU core normally. The AP core can then control the RST_FLAG_PIN to switch from the second state (such as a high level state) to the first state (such as a low level state). When the MCU core detects that RST_FLAG_PIN = 0, it can switch the RST_RSP_PIN pin from the fourth state (such as a high level state) to the third state (such as a low level state), so that the AP core and the MCU core can perform normal dual-core interaction.
[0088] Please refer to Figure 6, which is a flowchart of a reset and recovery method for an electronic device provided by an embodiment of the present invention. The method is applied to a second processing core in an electronic device, which may be the electronic device 100 described above, wherein the electronic device may include a first processing core, a second processing core, and a power management unit, wherein a first output pin of the first processing core is connected to a first input pin of the second processing core, a first reset pin of the first processing core is connected to a first control pin of the second processing core, and a second reset pin of the second processing core is connected to a second control pin of the first processing core and a third control pin of the power management unit, respectively. The method includes:
[0089] Step S401: After the second reset pin of the second processing core receives a reset signal, it enters a reset state.
[0090] For details, please refer to the detailed description of step S202 in FIG. 3 .
[0091] Step S402: After the second processing core is reset, the pin status of the first input pin is determined.
[0092] For details, please refer to the detailed description of step S203 in FIG. 3 .
[0093] Step S403A: If the second processing core determines that the first input pin is in the first state, the second processing core sends a reset signal to the first reset pin through the first control pin.
[0094] For details, please refer to the detailed description of step S204A in FIG3 .
[0095] Step S403B: If the second processing core 102 determines that the first input pin is in the second state, the second processing core 102 controls the second input pin to switch from the third state to the fourth state via the second output pin.
[0096] For details, please refer to the detailed description of step S204B in FIG. 3 .
[0097] Step S403C: If the second processing core 102 determines that the first input pin is in the second state, the reset operation ends.
[0098] In some embodiments, after the second processing core executes step S402 , if the second processing core determines that the first input pin is in the second state, the reset operation may be terminated. Furthermore, the first processing core and the second processing core may interact normally.
[0099] In summary, in the present application, when the second processing core receives the reset signal and performs the reset operation, the state of the first input pin of the second processing core can be determined. After the second processing core is reset, the first input pin can have two states, namely, a high level state and a low level state. When the first input pin is in a low level state after the second processing core is reset, it means that the multi-core processor needs to perform a multi-core reset. After the reset of the second processing core is completed, the second processing core also needs to control the first processing core to enter the reset state, that is, the second processing core can send a reset signal to the first reset pin of the first processing core through the first control pin, so that the first processing core enters the reset state, thereby realizing multi-core reset when the multi-core processor is not completely powered off.
[0100] The present application provides a control processing unit, characterized in that a first input pin of the control processing unit is connected to a first output pin of an application processing unit, a first control pin of the control processing unit is connected to a first reset pin of the application processing unit, and a second reset pin of the control processing unit is respectively connected to a second control pin of the application processing unit and a third control pin of a power management unit. The control processing unit is configured to: enter a reset state when the second reset pin of the control processing unit receives a reset signal; determine whether the first input pin is in a first state, and if the first input pin is in the first state, send a reset signal to the first reset pin through the first control pin, so that the application processing unit enters a reset state.
[0101] In an embodiment of the present application, the control processing unit may be the second processing core 102 in FIG. 1 above, and the control processing unit may execute some or all of the steps executed by the second processing core 102 in FIG. 2 ; the application processing unit may be the first processing core 101 in FIG. 1 above, and the application processing unit may execute some or all of the steps executed by the first processing core 101 in FIG. 2 above.
[0102] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components 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 through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0105] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, the functional units in the embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0107] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product 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., specifically a processor in a computer device) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present application. Among them, the aforementioned storage medium may include: U disk, mobile hard disk, magnetic disk, optical disk, read-only memory (Read-Only Memory, abbreviated: ROM) or random access memory (Random Access Memory, abbreviated: RAM) and other media that can store program codes.
[0108] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An electronic device, characterized in that: The electronic device comprises a first processing core, a second processing core and a power management unit, wherein a first output pin of the first processing core is connected to a first input pin of the second processing core, a first reset pin of the first processing core is connected to a first control pin of the second processing core, a second reset pin of the second processing core is connected to a second control pin of the first processing core and a third control pin of the power management unit respectively, and the second processing core is used to: When the second reset pin of the second processing core receives a reset signal, the second processing core enters a reset state; It is determined whether the first input pin is in a first state. If the first input pin is in the first state, a reset signal is sent to the first reset pin through the first control pin, so that the first processing core enters a reset state.
2. The device according to claim 1, characterized in that The power management unit is configured to: in response to a user operation, send a reset signal to the second reset pin of the second processing core through the third control pin, wherein the user operation includes a user long pressing the power button; The second processing core is further configured to: receive a reset signal sent by the third control pin through the second reset pin.
3. The device according to claim 1, characterized in that The first processing core is used for: When it is detected that the response time of the second processing core exceeds a preset time, controlling the first input pin to switch from a first state to a second state through the first output pin; and sending a reset signal to the second reset pin through the second control pin; The second processing core is further configured to: receive a reset signal sent by the second control pin through the second reset pin.
4. The device according to any one of claims 1 to 3, characterized in that: The second input pin of the first processing core is connected to the second output pin of the second processing core, and the second processing core is further used for: If the first input pin is in the second state, controlling the second input pin to switch from the third state to the fourth state through the second output pin; The first processing core is further configured to: determine whether the second input pin is in a fourth state; if the second input pin is in the fourth state, control the first input pin to switch from the second state to the first state through the first output pin.
5. The device according to claim 4, characterized in that The first processing core is further configured to: If the second input pin is in the third state within a preset time period, the first input pin is controlled to switch from the second state to the first state through the first output pin.
6. The device according to claim 4, characterized in that The second processing core is further configured to: After detecting that the first input pin switches from the second state to the first state, the second input pin is controlled to switch from the fourth state to the third state through the second output pin.
7. A reset recovery method, characterized in that: Applied to an electronic device, the electronic device comprises a first processing core, a second processing core and a power management unit, a first output pin of the first processing core is connected to a first input pin of the second processing core, a first reset pin of the first processing core is connected to a first control pin of the second processing core, a second reset pin of the second processing core is connected to a second control pin of the first processing core and a third control pin of the power management unit respectively, the method comprises: When the second reset pin of the second processing core receives a reset signal, the second processing core enters a reset state; The second processing core determines whether the first input pin is in a first state. If the first input pin is in the first state, a reset signal is sent to the first reset pin through the first control pin, so that the first processing core enters a reset state.
8. The method according to claim 7, characterized in that The method further comprises: By the power management unit, in response to a user operation, sending a reset signal to the second reset pin of the second processing core through the third control pin, wherein the user operation includes an operation of long pressing a power button by the user; A reset signal sent by the third control pin is received by the second processing core based on the second reset pin.
9. The method according to claim 7, characterized in that The method further comprises: When the first processing core detects that the response time of the second processing core exceeds a preset time, the first output pin is used to control the first input pin to switch from a first state to a second state; and a reset signal is sent to the second reset pin through the second control pin; A reset signal sent by the second control pin is received by the second processing core based on the second reset pin.
10. The method according to any one of claims 7 to 9, characterized in that: The second input pin of the first processing core is connected to the second output pin of the second processing core, and the method further includes: If the first input pin is in the second state, the second processing core controls the second input pin to switch from the third state to the fourth state through the second output pin; The first processing core is used to determine whether the second input pin is in a fourth state; if the second input pin is in the fourth state, the first output pin is used to control the first input pin to switch from the second state to the first state.
11. The method according to claim 10, characterized in that The method further comprises: If the second input pin is in the third state within a preset time period, the first processing core controls the first input pin to switch from the second state to the first state through the first output pin.
12. The method according to claim 10, characterized in that The method further comprises: After detecting, through the second processing core, that the first input pin switches from the second state to the first state, the second output pin is used to control the second input pin to switch from the fourth state to the third state.
13. A reset recovery method, characterized in that: Applied to a second processing core, a first input pin of the second processing core is connected to a first output pin of the first processing core, a first control pin of the second processing core is connected to a first reset pin of the first processing core, and a second reset pin of the second processing core is respectively connected to a second control pin of the first processing core and a third control pin of a power management unit, the method comprising: When the second reset pin of the second processing core receives a reset signal, the second processing core enters a reset state; The second processing core determines whether the first input pin is in a first state. If the first input pin is in the first state, a reset signal is sent to the first reset pin through the first control pin, so that the first processing core enters a reset state.
14. The method according to claim 13, characterized in that The method further comprises: The reset signal sent by the third control pin is received based on the second reset pin, wherein the reset signal sent by the third control pin is a reset signal sent by the power management unit in response to a user operation, and the user operation includes an operation of the user long pressing the power button.
15. The method according to claim 13, characterized in that The method further comprises: A reset signal sent by the second control pin is received based on the second reset pin, wherein the reset signal sent by the second control pin is a reset signal sent when the first processing core detects that a response time of the second processing core exceeds a preset time.
16. The method according to any one of claims 13 to 15, characterized in that: The second input pin of the first processing core is connected to the second output pin of the second processing core, and the method further includes: If the first input pin is in the second state, the second input pin is controlled to switch from the third state to the fourth state through the second output pin, so that after the first processing core detects that the second input pin is in the fourth state, the first input pin is controlled to switch from the second state to the first state through the first output pin, wherein the second state is a high level state initiated by the first processing core to the first input pin.
17. The method according to claim 16, characterized in that The method further comprises: After detecting that the first input pin switches from the second state to the first state, the second input pin is controlled to switch from the fourth state to the third state through the second output pin.
18. A control processing unit, characterized in that: The first input pin of the control processing unit is connected to the first output pin of the application processing unit, the first control pin of the control processing unit is connected to the first reset pin of the application processing unit, the second reset pin of the control processing unit is connected to the second control pin of the application processing unit and the third control pin of the power management unit respectively, and the control processing unit is used to: When the second reset pin of the control processing unit receives a reset signal, the control processing unit enters a reset state; It is determined whether the first input pin is in a first state. If the first input pin is in the first state, a reset signal is sent to the first reset pin through the first control pin, so that the application processing unit enters a reset state.
Citation Information
Patent Citations
Electronic equipment and related reset recovery method
CN118585051A
Multichip system capable of realizing reset and control method of multichip reset
CN102237865A
Multiprocessor power-on reset circuit
CN105388982A
Configuration method and device of multi-core system
CN110096124A
Non-interfering reset circuit
CN111580442A
