Electronic equipment operation monitoring method and electronic equipment
Through the communication interface monitoring method between the control unit and the charging management unit, self-monitoring of the control unit and the charging management unit is realized, the problem of abnormal monitoring in the prior art is solved, the stability and reliability of the equipment are improved, and the production cost is reduced.
Patent Information
- Application Number
- CN202510244726.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-07-04
AI Technical Summary
In the prior art, abnormalities in the control unit and the charging management unit cannot be effectively monitored, resulting in the inability to operate normally, and external monitoring components increase production costs.
Through the communication interface between the control unit and the charging management unit, a start monitoring instruction is sent. The charging management unit outputs a reset signal when the monitoring completion instruction is not received within the preset time period, causing the control unit to reset and restart, and mutual monitoring is achieved through register value comparison.
Timely discover abnormalities in the control unit and charging management unit, avoid the equipment's unstable state for a long time, reduce the probability of equipment failure, and do not need to add additional monitoring components to reduce production costs.
Smart Images

Figure CN120254424A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technology for monitoring the operating state of electronic devices, and more particularly, to a method for monitoring the operation of an electronic device and an electronic device. Background Art
[0002] In existing electronic devices, especially battery-powered devices, the control unit and the charging management unit are two key components. The control unit is the arithmetic control unit of the electronic device, which is used to control the operation of the device and the realization of various functions. The charging management unit is responsible for managing the charging of the battery.
[0003] In practical applications, the control unit and the charging management unit may malfunction for various reasons, such as software deadlocks, hardware failures, etc., resulting in the electronic device being unable to work properly. In the prior art, external monitoring components are usually used to monitor whether the control unit fails, which will increase the production cost. In addition, the state of the charging management unit cannot be effectively monitored and controlled.
[0004] Therefore, a technical solution is needed to solve the above technical problems. Summary of the Invention
[0005] An object of the present invention is to provide a new technical solution for a method for monitoring the operation of an electronic device.
[0006] According to a first aspect of the present invention, there is provided a method for monitoring the operation of an electronic device, the electronic device including a control unit and a charging management unit, the control unit transmitting instructions to the charging management unit through a communication interface, and the reset pin of the control unit being connected to the reset pin of the charging management unit. Wherein, the method includes:
[0007] The control unit sends a start monitoring instruction to the charging management unit through the communication interface;
[0008] When the charging management unit does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a preset time period since receiving the start monitoring instruction, it controls its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal;
[0009] When the control unit receives the reset signal at its own reset pin, it performs a reset and restart.
[0010] Optionally, the method further includes:
[0011] The control unit obtains the register value in the charging management unit through the communication interface;
[0012] The control unit compares the obtained register value with its pre-stored register value to obtain a comparison result;
[0013] When the comparison result is inconsistent, the control unit sends the pre-stored register value to the charging management unit so that the charging management unit reconfigures the register value.
[0014] Optionally, the register value includes at least one of charging parameters and a preset duration.
[0015] Optionally, the method further includes:
[0016] After receiving the start monitoring instruction, the charging management unit starts timing to obtain a timing duration, and determines whether it receives the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to the preset duration.
[0017] Optionally, the method further includes:
[0018] When the charging management unit determines that it receives the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to the preset duration, it clears the timing duration.
[0019] Optionally, the task level corresponding to the current monitoring completion instruction sent by the control unit to the charging management unit is lower than the levels of other tasks executed by the control unit.
[0020] Optionally, the charging management unit is used to manage the charging process of the battery in the electronic device.
[0021] According to a second aspect of the present invention, an electronic device is provided, including a control unit and a charging management unit. The control unit transmits instructions to the charging management unit through a communication interface, and the reset pin of the control unit is connected to the reset pin of the charging management unit. Among them,
[0022] The control unit is configured to send a start monitoring instruction to the charging management unit through the communication interface;
[0023] The charging management unit is configured to control its own reset pin to output a reset signal within a preset duration after receiving the start monitoring instruction and not receiving the current monitoring completion instruction sent by the control unit through the communication interface, so that the reset pin of the control unit receives the reset signal;
[0024] The control unit is further configured to perform a reset restart when its own reset pin receives the reset signal.
[0025] Optionally, the control unit is further configured to obtain the register value in the charge management unit through the communication interface, compare the obtained register value with the pre-stored register value in itself to obtain a comparison result, and in the case that the comparison result is inconsistent, send the pre-stored register value to the charge management unit so that the charge management unit reconfigures the register value.
[0026] Optionally, the task level corresponding to the current monitoring completion instruction sent by the control unit to the charge management unit is lower than the levels of other tasks executed by the control unit.
[0027] In the method for monitoring the operation of an electronic device provided in this embodiment, the control unit sends a start monitoring instruction to the charge management unit through the communication interface. When the charge management unit does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a preset time period since receiving the start monitoring instruction, it controls its own reset pin to output a reset signal, so that the reset pin of the control unit receives the reset signal. When the control unit receives the reset signal at its own reset pin, it performs a reset and restart. While implementing the charge management function, the charge management unit also monitors the control unit. When it is determined that the control unit is abnormal, the charge management unit controls its own reset pin to output a reset signal, so that the reset pin of the control unit receives the reset signal, and then the control unit continues to perform a reset and restart. This can timely detect the abnormality of the control unit, avoid the control unit being in an unstable state for a long time, reduce the occurrence probability of the electronic device. At the same time, there is no need to additionally add monitoring components and no additional generation cost is required.
[0028] Through the following detailed description of the exemplary embodiments of this specification with reference to the accompanying drawings, the features and advantages of the embodiments of this specification will become clear. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings incorporated in the specification and constituting a part of the specification illustrate the embodiments of this specification, and together with the description are used to explain the principles of the embodiments of this specification.
[0030] Figure 1 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
[0031] Figure 2 is a schematic flowchart of a method for monitoring the operation of an electronic device according to an embodiment of the present invention.
[0032] Figure 3 is a schematic flowchart of a method for monitoring the operation of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0033] Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.
[0034] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way a limitation on the embodiments of the present specification, their applications, or uses.
[0035] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0036] In one embodiment of the present invention, a method for monitoring the operation of an electronic device is provided. According to Figure 1 as shown, the electronic device includes a control unit and a charging management unit. The control unit transmits instructions to the charging management unit through a communication interface. The reset pin RST of the control unit is connected to the reset pin RST of the charging management unit. According to Figure 1 as shown, the communication interface is an I2C interface, and the communication interface can also be other types of interfaces.
[0037] The control unit is the arithmetic control unit of the electronic device. The control unit can be an MCU (Microcontroller Unit).
[0038] The charging management unit is a charging management chip. The charging management unit is used to manage the charging process of the battery in the electronic device. The charging management unit controls the charging process of the battery into three stages, namely, the trickle charging stage, the constant current charging stage, and the constant voltage charging stage.
[0039] According to Figure 2 as shown, the method for monitoring the operation of the electronic device in this embodiment includes the following steps S210 to S230.
[0040] Step S210, the control unit sends a start monitoring instruction to the charging management unit through the communication interface.
[0041] This monitoring instruction is an instruction for using the charging management unit to monitor the control unit.
[0042] Step S220, when the charging management unit does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a preset time period since receiving the start monitoring instruction, the charging management unit controls its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal.
[0043] In some embodiments, the method further includes: the charging management unit starts timing after receiving the start monitoring instruction, obtains a timing duration, and determines whether it receives the current monitoring completion instruction sent by the control unit through the communication interface within a time period when the timing duration is less than or equal to the preset time period.
[0044] The preset duration is a pre-stored value and can be set according to requirements.
[0045] When the charging management unit determines that it has received the instruction for completion of this monitoring sent by the control unit through the communication interface within a time period where the timing duration is less than or equal to the preset duration, it clears the timing duration. After the charging management unit receives a new start monitoring instruction, it starts timing again to obtain the timing duration, and within a time period where the timing duration is less than or equal to the preset duration, it determines whether it has received the instruction for completion of this monitoring sent by the control unit through the communication interface, so as to achieve periodic monitoring.
[0046] When the charging management unit does not receive the instruction for completion of this monitoring sent by the control unit through the communication interface within a time period where the timing duration is less than or equal to the preset duration, it determines that the control unit is abnormal and controls its own reset pin to output a reset signal. Since the reset pin of the control unit is connected to the reset pin of the charging management unit, the reset pin of the control unit also receives the reset signal.
[0047] Step S230: When the control unit receives a reset signal at its own reset pin, it performs a reset and restart.
[0048] In the method for monitoring the operation of the electronic device provided in this embodiment, while the charging management unit implements the charging management function, it also monitors the control unit. When it determines that the control unit is abnormal, the charging management unit controls its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal, and further enables the control unit to continue with a reset and restart. This can timely detect the abnormality of the control unit, avoid the control unit being in an unstable state for a long time, reduce the occurrence probability of the electronic device. At the same time, there is no need to additionally add monitoring components, and there is no need to additionally increase the production cost.
[0049] In some embodiments, the method further includes the following steps S240 to S260.
[0050] Step S240: The control unit obtains the register value in the charging management unit through the communication interface.
[0051] The register value includes at least one of charging parameters and the preset duration. The charging parameters include the charging current.
[0052] The control unit sends an instruction for obtaining the register value to the charging management unit through the communication interface. After the charging management unit receives this obtaining instruction, it sends the register value stored in it to the control unit through the communication interface.
[0053] Step S250: The control unit compares the obtained register value with its own pre-stored register value to obtain a comparison result.
[0054] The pre-stored register value includes at least one of charging parameters and a preset duration. The pre-stored register value is a value set according to requirements. For example, the electronic device provides a register value configuration interface for the user to configure the register value according to requirements.
[0055] When the electronic device is powered on each time, the control unit sends the pre-stored register value to the charge management unit through the communication interface. The charge management unit stores the register value after obtaining the register value sent by the control unit. When a fault occurs in the charge management unit, for example, power failure or static electricity, the register value stored in the charge management unit will be lost.
[0056] Step S260: When the comparison result is inconsistent, the control unit sends the pre-stored register value to the charge management unit so that the charge management unit reconfigures the register value.
[0057] When the comparison result is inconsistent, the control unit determines that a fault has occurred in the charge management unit, and the control unit sends the pre-stored register value to the charge management unit so that the charge management unit reconfigures the register value.
[0058] The monitoring method provided in this embodiment realizes the monitoring of the charge management unit. When an abnormality occurs in the charge management unit, by sending the pre-stored register value to the charge management unit to enable the charge management unit to reconfigure the register value, the reset of the charge management unit is realized, which can effectively avoid battery charging failures caused by abnormalities in the charge management unit and ensure the normal operation of battery charging in the electronic device.
[0059] The operations performed in the above steps S240 to S260 are periodic, that is, the control unit periodically obtains the register value in the charge management unit through the communication interface, compares the obtained register value with its own pre-stored register value to obtain a comparison result, and when the comparison result is inconsistent, the control unit sends the pre-stored register value to the charge management unit so that the charge management unit reconfigures the register value. This can realize the real-time monitoring of the charge management unit.
[0060] In some embodiments, the task level corresponding to the current monitoring completion instruction sent by the control unit to the charge management unit is lower than the levels of other tasks executed by the control unit.
[0061] When the control unit is executing a low-level task and needs to execute a high-level task, the low-level task needs to be paused at this time, and the high-level task is executed preferentially. If the task level corresponding to the current monitoring completion instruction sent by the control unit to the charging management unit is set to high level, when the control unit encounters an abnormality during the execution of the low-level task, for example, stuttering, when the control unit needs to send the current monitoring completion instruction to the charging management unit, it can be executed preferentially, then the abnormality that occurs when the control unit executes the low-level task will not be detected. This can ensure that the abnormality of the control unit is detected in time and avoid some missed detection problems.
[0062] In addition, when the control unit encounters an abnormality during the execution of a high-level task, for example, stuttering, for the current monitoring completion instruction that the control unit needs to send to the charging management unit, at this time, due to the stuttering of the control unit, it is impossible to execute the task of sending the current monitoring completion instruction to the charging management unit after completing the high-level task, which results in that the charging management unit does not receive the current monitoring completion instruction sent by the control unit through the communication interface within the preset time period since receiving the start monitoring instruction. At this time, the charging management unit controls its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal. The control unit compares the obtained register value with its own pre-stored register value to obtain a comparison result.
[0063] Figure 3 It is a flowchart of an electronic device operation monitoring method according to an embodiment of the present invention. Combining Figure 3 with this, the electronic device operation monitoring method provided in this embodiment includes the following steps S301 to S308.
[0064] Step S301, the control unit sends a start monitoring instruction to the charging management unit through the communication interface.
[0065] Step S302, after receiving the start monitoring instruction, the charging management unit starts timing to obtain a timing duration, and determines whether it receives the current monitoring completion instruction sent by the control unit through the communication interface within the time period when the timing duration is less than or equal to the preset duration.
[0066] Step S303, when the charging management unit does not receive the current monitoring completion instruction sent by the control unit through the communication interface within the time period when the timing duration is less than or equal to the preset duration, it controls its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal.
[0067] Step S304, when the control unit receives the reset signal on its own reset pin, it performs a reset restart.
[0068] Step S305, the control unit sends an instruction to obtain the register value to the charging management unit through the communication interface.
[0069] Step S306: After receiving the acquisition instruction, the charging management unit sends the stored register value to the control unit through the communication interface.
[0070] Step S307: The control unit compares the obtained register value with the pre-stored register value in itself to obtain a comparison result.
[0071] Step S308: When the comparison result is inconsistent, the control unit sends the pre-stored register value to the charging management unit so that the charging management unit reconfigures the register value.
[0072] The method for monitoring the operation of the electronic device provided in this embodiment realizes the mutual monitoring between the control unit and the charging management unit, so that the abnormal state of the electronic device can be detected and processed in time, avoiding the electronic device being in an unstable state for a long time, thereby improving the stability and reliability of the device.
[0073] An embodiment of the present invention also provides an electronic device. According to Figure 1 As shown, the electronic device includes a control unit and a charging management unit. The control unit transmits instructions to the charging management unit through the communication interface. The reset pin RST of the control unit is connected to the reset pin RST of the charging management unit. According to Figure 1 As shown, the communication interface is an I2C interface, and the communication interface can also be other types of interfaces.
[0074] The control unit is the arithmetic control unit of the electronic device. The control unit can be an MCU (Microcontroller Unit, microcontroller).
[0075] The charging management unit is a charging management chip. The charging management unit is used to manage the charging process of the battery in the electronic device. The charging management unit controls the charging process of the battery into three stages, namely the trickle charging stage, the constant current charging stage, and the constant voltage charging stage.
[0076] In this embodiment, the control unit is used to send a start monitoring instruction to the charging management unit through the communication interface. The charging management unit is used to control its own reset pin to output a reset signal when it does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a preset time period since receiving the start monitoring instruction, so that the reset pin of the control unit receives the reset signal. The control unit is also used to perform a reset restart when its own reset pin receives the reset signal.
[0077] In some embodiments, the charging management unit is further configured to start timing after receiving a start monitoring instruction, obtain a timing duration, and determine whether it receives the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to a preset duration.
[0078] The charging management unit is further configured to clear the timing duration when it determines that it receives the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to a preset duration.
[0079] The charging management unit is further configured to determine that the control unit is abnormal and control its own reset pin to output a reset signal when it does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to a preset duration. Since the reset pin of the control unit is connected to the reset pin of the charging management unit, the reset pin of the control unit also receives the reset signal.
[0080] In some embodiments, the control unit is further configured to obtain the register value in the charging management unit through the communication interface, compare the obtained register value with its pre-stored register value to obtain a comparison result, and send the pre-stored register value to the charging management unit to reconfigure the register value when the comparison result is inconsistent.
[0081] The register value includes at least one of charging parameters and a preset duration. The charging parameters include a charging current.
[0082] Specifically, the control unit is configured to send an acquisition instruction for the register value to the charging management unit through the communication interface. The charging management unit is configured to send the register value it stores to the control unit through the communication interface after receiving the acquisition instruction.
[0083] When the electronic device is powered on each time, the control unit is configured to send the pre-stored register value to the charging management unit through the communication interface. The charging management unit is configured to store the register value after obtaining the register value sent by the control unit. It should be noted that when the charging management unit fails, for example, power failure or electrostatic discharge occurs, the register value stored in the charging management unit will be lost.
[0084] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
[0085] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0086] Embodiments of this specification may be systems, methods, and / or computer program products. A computer program product may include a computer-readable storage medium having thereon computer instructions for causing a processor to implement various aspects of the embodiments of this specification.
[0087] A computer-readable storage medium may be a tangible device that can retain and store computer instructions for use by a computer instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in a groove having computer instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.
[0088] The computer instructions described herein can be downloaded from the computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer instructions from the network and forwards the computer instructions for storage in the computer-readable storage medium in each computing / processing device.
[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present specification. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of computer instructions, which contain one or more executable computer instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions. As is well known to those skilled in the art, implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
[0090] The embodiments of the present specification have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, the practical application, or the improvement of the technology in the market, or to enable other ordinary skilled persons in the technical field to understand the embodiments disclosed herein.
Claims
1. A method for monitoring the operation of an electronic device, characterized in that, The electronic device includes a control unit and a charging management unit. The control unit transmits instructions to the charging management unit through a communication interface. The reset pin of the control unit is connected to the reset pin of the charging management unit. Wherein, the method includes: The control unit sends a start monitoring instruction to the charging management unit through the communication interface; When the charging management unit does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a preset duration since receiving the start monitoring instruction, it controls its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal; When the control unit receives the reset signal at its own reset pin, it performs a reset and restart.
2. The method according to claim 1, characterized in that, The method further includes: The control unit obtains the register value in the charging management unit through the communication interface; The control unit compares the obtained register value with its pre-stored register value to obtain a comparison result; When the comparison result is inconsistent, the control unit sends the pre-stored register value to the charging management unit so that the charging management unit reconfigures the register value.
3. The method according to claim 2, wherein The register value includes at least one of charging parameters and a preset duration.
4. The method according to claim 1, wherein The method further includes: After receiving the start monitoring instruction, the charging management unit starts timing to obtain a timing duration, and determines whether to receive the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to the preset duration.
5. The method according to claim 4, characterized in that The method further includes: When the charging management unit determines that it has received the current monitoring completion instruction sent by the control unit through the communication interface within a period when the timing duration is less than or equal to the preset duration, it clears the timing duration.
6. The method according to claim 1, wherein The task level corresponding to the current monitoring completion instruction sent by the control unit to the charging management unit is lower than the level of other tasks executed by the control unit.
7. The method according to any one of claims 1-6, characterized in that, The charging management unit manages the charging process of the battery in the electronic device.
8. An electronic device, characterized in that, Including a control unit and a charging management unit, the control unit transmits instructions to the charging management unit through a communication interface. The reset pin of the control unit is connected to the reset pin of the charging management unit. Wherein, The control unit is configured to send a start monitoring instruction to the charging management unit through the communication interface; The charging management unit is configured to, when it does not receive the current monitoring completion instruction sent by the control unit through the communication interface within a preset duration since receiving the start monitoring instruction, control its own reset pin to output a reset signal so that the reset pin of the control unit receives the reset signal; The control unit is further configured to perform a reset and restart when its own reset pin receives the reset signal.
9. The electronic device according to claim 8, wherein The control unit is further configured to obtain the register value in the charge management unit through the communication interface, compare the obtained register value with the pre-stored register value in itself to obtain a comparison result, and in the case where the comparison result is inconsistent, send the pre-stored register value to the charge management unit so that the charge management unit reconfigures the register value.
10. The electronic device according to claim 8, wherein The task level corresponding to the current monitoring completion instruction sent by the control unit to the charge management unit is lower than the levels of other tasks executed by the control unit.