Mcu detection method, device, apparatus and storage medium
By performing anomaly detection on the MCU when the compressor of a variable frequency home appliance stops running, and by using CRC16 checksum and read/write consistency check, the safety hazards caused by MCU anomalies in variable frequency home appliances are resolved, and the reliability and safety of the products are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO HAIER AIR CONDITIONER GENERAL CORP LTD
- Filing Date
- 2022-03-31
- Publication Date
- 2026-06-16
AI Technical Summary
In the existing technology, variable frequency home appliances pose safety hazards when the MCU is abnormal. Especially after a period of use, the abnormality caused by damage or aging of the MCU's functional modules cannot be detected in time, which may lead to short circuits or other unpredictable consequences.
By monitoring the compressor's operating status, the MCU is checked for anomalies when the compressor stops running. The ROM is checked using CRC16 verification, and the RAM and CPU are checked for read/write consistency. If an anomaly is detected, the inverter home appliance is prevented from starting, and a warning is issued by flashing LEDs or displaying a fault code.
It improves the safety of variable frequency home appliances, avoids safety hazards during abnormal detection, enhances product reliability, and does not increase hardware costs, utilizing compressor downtime for frequent testing.
Smart Images

Figure CN114741230B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of home appliance technology, specifically relating to an MCU detection method, device, equipment, and storage medium. Background Technology
[0002] Inverter appliances are now widely used, and they contain a microcontroller unit (MCU) responsible for all control logic. If the MCU malfunctions, it will affect its original control logic. In this situation, starting the inverter appliance may cause abnormal operation, potentially leading to serious consequences such as short circuits and fires, or other unpredictable problems.
[0003] In related technologies, to avoid the aforementioned problems, a self-test is performed by the MCU after the inverter appliance is powered on. However, this detection technology still poses certain safety hazards when detecting abnormalities in inverter appliances. Summary of the Invention
[0004] In order to solve the above-mentioned problems in the prior art, that is, to avoid safety hazards when performing abnormal detection of frequency conversion home appliances, this application provides an MCU detection method, device, equipment and storage medium.
[0005] In a first aspect, this application provides an MCU detection method for detecting anomalies in the microcontroller unit (MCU) of a variable frequency home appliance. The MCU detection method includes: monitoring the operating state of a compressor, which includes a running state and a stopped state; detecting anomalies in the MCU in response to the compressor's operating state changing from a running state to a stopped state; and prohibiting the start of the variable frequency home appliance in response to the detection result indicating that the MCU is abnormal.
[0006] In the preferred embodiment of the above MCU detection method, the MCU includes at least random access memory (RAM), read-only memory (ROM), and central processing unit (CPU). Anomaly detection of the MCU includes: anomaly detection of the ROM based on a set CRC16 check method; read-write consistency check of the RAM; and read-write consistency check of the CPU.
[0007] In the preferred embodiment of the above MCU detection method, the ROM is subjected to anomaly detection based on the set CRC16 check mode, including: determining the sequence code of the data to be tested from the program storage area; determining the CRC check code corresponding to the sequence code of the data to be tested based on the set CRC check mode; comparing the CRC check code with the pre-stored CRC check code; determining that the ROM has an anomaly in response to the CRC check code being inconsistent with the pre-stored CRC check code; and determining that the ROM does not have an anomaly in response to the CRC check code being consistent with the pre-stored CRC check code.
[0008] In the preferred embodiment of the above MCU detection method, the read-write consistency check of RAM includes: determining the RAM region to be detected; writing a first detection value into the RAM region, the first detection value including 0x5A5A5A5A and / or 0xA5A5A5A5; comparing the data read from the RAM region with the first detection value; determining that the RAM is abnormal in response to the read data being inconsistent with the first detection value; and determining that the RAM is not abnormal in response to the read data being consistent with the first detection value.
[0009] In the preferred embodiment of the above MCU detection method, the CPU includes at least one register. A read-write consistency check is performed on the CPU, including: determining the register to be tested in at least one register; writing a second detection value into the register to be tested, the second detection value including 0x5A5A5A5A and / or 0xA5A5A5A5; comparing the data read from the register to be tested with the second detection value; determining that the CPU has an anomaly in response to the read data being inconsistent with the second detection value; and determining that the CPU does not have an anomaly in response to the read data being consistent with the second detection value.
[0010] In the preferred embodiment of the above MCU detection method, it further includes: issuing a warning message in response to an abnormality in the MCU, wherein the warning message is used for abnormality warning.
[0011] In the preferred embodiment of the above MCU detection method, issuing a warning message in response to an MCU abnormality includes: calling a flashing LED program to issue a warning in response to an MCU abnormality.
[0012] Secondly, this application provides an MCU detection device for detecting anomalies in the microcontroller unit (MCU) of a variable frequency home appliance. The MCU detection device includes: a monitoring module for monitoring the operating status of a compressor, including a running state and a stopped state; a detection module for detecting anomalies in the MCU in response to the compressor's operating status changing from a running state to a stopped state; and a processing module for prohibiting the start of the variable frequency home appliance in response to the detection result indicating that the MCU is abnormal.
[0013] Thirdly, this application provides a terminal device, including: a processor, a memory, and an interactive interface; the memory is used to store programs and data, and the processor calls the program stored in the memory to implement the MCU detection method of the first aspect.
[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the MCU detection method of the first aspect.
[0015] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the MCU detection method of the first aspect.
[0016] The MCU detection method, apparatus, device, and storage medium provided in this application monitor the operating status of the compressor, including a running state and a stopped state. In response to the compressor's operating status changing from running to stopped, the MCU undergoes anomaly detection. In response to the detection result indicating an MCU anomaly, the starting of the inverter home appliance is prohibited. In other words, this application monitors the compressor's operating status and begins anomaly detection of the MCU when the compressor stops running. This prevents the starting of the inverter home appliance when the MCU detection result is abnormal, thus avoiding safety hazards that may arise during anomaly detection of inverter home appliances and improving the safety of using inverter home appliances. Attached Figure Description
[0017] Preferred embodiments of the MCU detection method, apparatus, device, and storage medium of this application will now be described with reference to the accompanying drawings. The drawings are as follows:
[0018] Figure 1 This is a schematic diagram illustrating an application scenario of the MCU detection method provided in this application embodiment;
[0019] Figure 2 This is a flowchart illustrating the MCU detection method provided in an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the MCU detection device provided in the embodiments of this application;
[0021] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0022] First, those skilled in the art should understand that these embodiments are merely for explaining the technical principles of this application and are not intended to limit the scope of protection of this application. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.
[0023] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms "a" and "the" as used in the embodiments of this application are also intended to include the plural forms unless the context clearly indicates otherwise.
[0024] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can be represented as: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0025] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0026] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes that element.
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] The following is a brief explanation of the terms used in this application.
[0029] MCU: Also known as a Single-Chip Microcomputer or microcontroller, it is a chip-level computer that integrates a central processing unit (CPU) with a reduced frequency and specifications, along with peripheral interfaces such as memory, timer, Universal Serial Bus (USB), analog-to-digital converter (ADC), Universal Asynchronous Receiver / Transmitter (UART), Programmable Logic Controller (PLC), Direct Memory Access (DMA), and even liquid crystal display (LCD) driver circuitry, all on a single chip. This allows for different combinations of control for various applications.
[0030] A compressor is a driven fluid machine that raises low-pressure gas to high-pressure gas; it is the heart of a refrigeration system. It draws in low-temperature, low-pressure refrigerant gas through the suction pipe, compresses it using a piston driven by an electric motor, and then discharges high-temperature, high-pressure refrigerant gas through the discharge pipe, providing power for the refrigeration cycle.
[0031] The anomaly detection solutions for variable frequency home appliances mentioned in the background technology have at least the following technical problems:
[0032] After a period of use, if certain functional modules of the MCU (Microcontroller Unit) in a variable frequency appliance experience external damage or aging failure, it can affect the MCU's original control logic. Starting the appliance under these conditions could lead to malfunctions, potentially causing short circuits, fires, or other unpredictable consequences. To avoid these problems, existing technologies typically involve pre-shipment testing of the MCU, such as wafer testing and packaging testing, to ensure all modules are functioning correctly. Alternatively, pre-shipment testing of the entire appliance's functionality and reliability can ensure the MCU modules are working properly. Alternatively, testing can be performed upon initial power-on to ensure the main MCU modules are functioning correctly. However, after a period of use, these testing methods may not guarantee the MCU's proper functioning. Therefore, existing technologies for detecting malfunctions in variable frequency appliances still pose certain safety risks.
[0033] To address the aforementioned issues, this application proposes an MCU detection method. By monitoring the operating status of the compressor, anomaly detection of the MCU is initiated when the compressor stops running. This method prevents the start of inverter home appliances when the MCU detection result is abnormal, thus avoiding potential safety hazards during anomaly detection of inverter home appliances and improving the safety of using inverter home appliances.
[0034] In one possible implementation, the MCU detection method provided in this embodiment can be applied in an application scenario. Figure 1 This is an application scenario diagram of the MCU detection method provided in the embodiments of this application, such as... Figure 1 As shown, variable frequency home appliances, taking variable frequency air conditioners as an example, include a microcontroller unit (MCU) and a compressor. Variable frequency air conditioners monitor the working status of the compressor in real time.
[0035] When the compressor is in operation, it draws in low-temperature, low-pressure gaseous refrigerant and compresses it into high-temperature, high-pressure gaseous refrigerant. This high-temperature, high-pressure gaseous refrigerant flows through the condenser, where it dissipates heat and liquefies into medium-temperature, high-pressure liquid refrigerant. After passing through a throttling expansion device, this medium-temperature, high-pressure liquid refrigerant becomes low-temperature, low-pressure liquid refrigerant. This low-temperature, low-pressure liquid refrigerant flows through the evaporator, where it evaporates back into low-temperature, low-pressure gaseous refrigerant. The compressor then compresses this gaseous refrigerant, and the cycle repeats to achieve indoor cooling.
[0036] To protect the compressor of the inverter air conditioner, the compressor needs to wait a certain period of time after each shutdown before it can be restarted. This results in a task idle period for the MCU each time the compressor reaches its designated temperature and stops, or when the user controls the compressor to stop. This idle period occurs much more frequently than the frequency of user power-off and power-on operations on the inverter air conditioner. Therefore, cyclically checking the critical modules of the MCU during this period can significantly improve product reliability. Thus, when the compressor is detected to be in a stopped state, an anomaly check is performed on the MCU. If an anomaly is detected in the MCU, starting the inverter air conditioner is prohibited; if no anomaly is detected, the inverter air conditioner can operate normally.
[0037] When performing anomaly detection on an MCU, anomaly detection can be performed on key modules within the MCU, such as the Random Access Memory (RAM), Read-Only Memory (ROM), and Central Processing Unit (CPU). An anomaly in any of these modules indicates an MCU malfunction; conversely, if all modules are functioning correctly, the MCU is not malfunctioning. Therefore, the MCU detection method provided in this application can improve the safety of using inverter home appliances.
[0038] Based on the above scenarios, the technical solution of the MCU detection method provided in this application will be described in detail below through several specific embodiments.
[0039] Figure 2 A flowchart of the MCU detection method provided in the embodiments of this application is shown below. Figure 2 As shown, the MCU detection method includes the following steps:
[0040] S201: Monitors the operating status of the compressor.
[0041] In this step, the working status includes running status and stopped status.
[0042] In this solution, to protect the compressor of the inverter appliance, the compressor needs to wait a certain period of time after each shutdown before restarting. Therefore, if the usage time of the inverter appliance is greater than or equal to a preset time, the compressor's operating status can be monitored in real time after the air conditioner is turned on. The preset time allows users to purchase and use the inverter appliance for a period of time.
[0043] In the above scheme, the variable frequency home appliances can be variable frequency air conditioners, fixed frequency air conditioners, commercial air conditioners, residential air conditioners, parking air conditioners, etc., and the MCU of the variable frequency home appliances can be any programmable MCU used by the variable frequency home appliances.
[0044] S202: In response to the compressor's operating state changing from running state to stopping state, perform anomaly detection on the MCU.
[0045] In this step, when the compressor's operating state changes from running to stopped, the MCU will have a task idle period during the time the compressor stops running. The frequency of this idle period is much higher than the frequency of the user's operation of turning the power off and on again for the inverter air conditioner. Therefore, if the key modules of the MCU are tested cyclically during this period, it will not affect the operation of the MCU and can greatly improve the reliability of the product.
[0046] S203: In response to the detection result indicating an abnormality in the MCU, the start of the inverter home appliance is prohibited.
[0047] In this step, if the MCU anomaly detection result indicates an MCU malfunction, the operation of the inverter home appliance needs to be stopped to prevent safety hazards and allow for maintenance and troubleshooting. Because MCU anomaly detection is performed frequently, it significantly improves product reliability and prevents potential safety risks.
[0048] The MCU detection method provided in this application monitors the operating status of the compressor, including running and stopped states. In response to the compressor's operating status changing from running to stopped, the MCU undergoes anomaly detection. If the detection result indicates an MCU anomaly, the starting of the inverter home appliance is prohibited. In other words, this application monitors the compressor's operating status and begins MCU anomaly detection when the compressor stops running. This prevents the inverter home appliance from starting when the MCU detection result is abnormal, thus avoiding potential safety hazards during anomaly detection of inverter home appliances and improving the safety of using inverter home appliances.
[0049] In one possible implementation, the MCU includes at least random access memory (RAM), read-only memory (ROM), and a central processing unit (CPU). Anomaly detection of the MCU includes: anomaly detection of the ROM based on a set CRC16 check method; read-write consistency check of the RAM; and read-write consistency check of the CPU.
[0050] In this scheme, the various modules RAM, ROM and CPU included in the MCU can be detected for anomalies in a preset order, such as ROM, RAM and CPU, or RAM, ROM and CPU, or CPU, ROM and RAM, or other orders.
[0051] In the above scheme, when an abnormality is detected in a certain module, it can be considered that the MCU has an abnormality. At this time, an abnormality alarm can be issued immediately, and the detection of the next module will not be performed. After the abnormal module is repaired, if the inverter home appliance is powered on or turned on again, the abnormality detection of each module of the MCU can continue during the time when the compressor stops running, until all modules of the MCU are normal and the inverter home appliance can run the normal main control program.
[0052] In the above scheme, in addition to the three modules mentioned above, the MCU may also contain other modules. When the MCU contains other modules, the other modules and the three modules mentioned above can be detected for anomalies in another preset order.
[0053] In one possible implementation, ROM anomaly detection is performed based on a set CRC16 checksum method, including: determining the sequence code of the data to be tested from the program storage area; determining the CRC checksum corresponding to the sequence code of the data to be tested based on the set CRC checksum method; comparing the CRC checksum with a pre-stored CRC checksum; determining that the ROM has an anomaly in response to the CRC checksum being inconsistent with the pre-stored CRC checksum; and determining that the ROM does not have an anomaly in response to the CRC checksum being consistent with the pre-stored CRC checksum.
[0054] In this scheme, Cyclic Redundancy Check (CRC) can be used to detect anomalies in the ROM. The CRC check method can be CRC16 / ARC, and the formula can be x16 + x15 + x2 + 1. When using CRC16 to detect anomalies in the ROM, the sequence code of the data to be tested can be determined from the program memory area of the ROM when the inverter appliance leaves the factory. Then, the CRC checksum corresponding to the sequence code of the data to be tested is calculated using the formula x16 + x15 + x2 + 1, and this checksum is stored in the non-program memory area of the ROM. After using the inverter appliance for a period of time, the CRC checksum corresponding to the sequence code of the data to be tested in the program memory area is calculated again using CRC16. The calculated CRC checksum is compared with the CRC checksum stored in the non-program memory area. If the two CRC checksums are inconsistent, it indicates that the ROM has an anomaly. If the two CRC checksums are consistent, it indicates that the ROM has no anomaly, and the next module can be tested.
[0055] In the above scheme, if the ROM is abnormal, it means that the MCU is abnormal, and an abnormality warning can be issued directly. At this time, the inverter home appliance will not start the main control program.
[0056] In one possible implementation, performing a read-write consistency check on RAM includes: determining a RAM region to be checked; writing a first detection value into the RAM region, the first detection value including 0x5A5A5A5A and / or 0xA5A5A5A5; comparing data read from the RAM region with the first detection value; determining that the RAM is abnormal in response to the read data being inconsistent with the first detection value; and determining that the RAM is not abnormal in response to the read data being consistent with the first detection value.
[0057] In this solution, if the MCU is checked for anomalies in the order of ROM, RAM, and CPU, then after detecting no anomalies in the ROM, the RAM can be checked next. At this point, the write and read data in the tested area of the RAM are compared to determine if the RAM is faulty. If the write and read data are different, the RAM is faulty, and the inverter appliance will not start its main control program. If the write and read data are the same, the RAM is not faulty, and the next module can be checked. Therefore, the RAM fault can be accurately determined, and a warning message can be output promptly when an anomaly occurs. This avoids the problem of inverter appliances malfunctioning after a period of use due to MCU anomalies, thus improving product reliability.
[0058] In the above scheme, 0x5A5A5A5A can be written into the RAM to be tested area first. When the data read from the RAM to be tested area is also 0x5A5A5A5A, then 0xA5A5A5A5 is written into the RAM to be tested area. When the data read from the RAM to be tested area is also 0xA5A5A5A5, it can be determined that there is no abnormality in the RAM.
[0059] In one possible implementation, the CPU includes at least one register, and a read-write consistency check is performed on the CPU, comprising: determining a register to be checked in at least one register; writing a second detection value into the register to be checked, the second detection value including 0x5A5A5A5A and / or 0xA5A5A5A5; comparing data read from the register to be checked with the second detection value; determining that the CPU is abnormal in response to the read data being inconsistent with the second detection value; and determining that the CPU is not abnormal in response to the read data being consistent with the second detection value.
[0060] In this scheme, a register to be tested can be identified in at least one register of the CPU. During CPU anomaly detection, for each register to be tested, the write data and read data in the register are compared to determine if the CPU is malfunctioning. If the write data and read data are different, it indicates a CPU malfunction, and the inverter appliance will not start its main control program. If the write data and read data are the same, it indicates no CPU malfunction, and the testing can continue to the next module. Therefore, it is possible to accurately determine whether the CPU is malfunctioning, and thus output early warning information in a timely manner when an anomaly occurs. This avoids the problem of inverter appliances malfunctioning after a period of use due to MCU failure, improving product reliability.
[0061] In the above scheme, 0x5A5A5A5A can be written to the register to be tested first. When the data read from the register to be tested is also 0x5A5A5A5A, then 0xA5A5A5A5 is written to the register to be tested. When the data read from the register to be tested is also 0xA5A5A5A5, it can be determined that the CPU is not abnormal.
[0062] In the above scheme, taking a 32-bit MCU as an example, the general-purpose registers R0-R15 can be used as the registers to be tested, and then the selected registers to be tested are tested one by one in sequence. During the testing of all selected registers to be tested, if the written data and read data of any register to be tested are different, it indicates that the central processing unit has a fault.
[0063] In one possible implementation, it further includes: issuing a warning message in response to an anomaly in the MCU, the warning message being used for anomaly warning.
[0064] In this scheme, the various modules of the MCU can be detected for anomalies in a preset order. Therefore, when an anomaly is detected in a certain module, an early warning message can be issued immediately, and the detection of the next module will not be performed (if there is a next module). After the abnormal module is repaired, if the inverter home appliance is powered on or turned on again, the anomaly detection of the various modules of the MCU can continue until all modules are free of anomalies, and the inverter home appliance can run the normal main control program.
[0065] In one possible implementation, issuing a warning message in response to an anomaly in the MCU includes: calling a flashing LED program to provide a warning in response to an anomaly in the MCU.
[0066] In this solution, the inverter appliance can issue a warning message via flashing LEDs. Different flashing patterns correspond to different anomalies in the MCU. After the inverter appliance outputs a warning message, it stops running the normal main control program.
[0067] In the above solution, when the variable frequency home appliance issues a warning message, it can also display a fault code on the display screen. Different fault codes correspond to different abnormalities in the MCU.
[0068] The MCU detection method provided in this application can still detect MCU module anomalies after a period of use in inverter home appliances, and can immediately stop the high-voltage operation of the inverter home appliance when an anomaly is detected, thus improving product safety. Furthermore, the technical solution provided in this application does not require additional hardware circuitry; it can be implemented solely through software processing, without increasing hardware costs. Simultaneously, the technical solution provided in this application can utilize the frequent compressor shutdown protection periods for MCU module detection. Compared to detecting the MCU module when the inverter home appliance is powered on, this does not increase the time from power-on to operation, thus significantly increasing the number of MCU module detections without affecting the normal operation of the inverter home appliance.
[0069] In general, the MCU detection method provided in this application is a technical solution that can improve the accuracy of detecting MCU anomalies, avoid safety hazards when detecting anomalies in variable frequency home appliances, and ensure the normal operation of the MCU in variable frequency home appliances after they have been used for a period of time.
[0070] Figure 3 This is a schematic diagram of the MCU detection device provided in the embodiments of this application, as shown below. Figure 3 As shown, the MCU detection device 300 may include various functional modules for implementing the aforementioned air conditioner fault detection method, and any functional module may be implemented by software / or hardware.
[0071] For example, the device may include a monitoring module 301, a detection module 302, and a processing module 303.
[0072] The monitoring module 301 is used to monitor the working status of the compressor, which includes running status and stopped status.
[0073] The detection module 302 is used to perform anomaly detection on the MCU in response to the compressor's working state changing from running state to stopping state;
[0074] The processing module 303 is used to prevent the start of frequency conversion home appliances in response to the detection result that the MCU is abnormal.
[0075] Optionally, the MCU includes at least random access memory (RAM), read-only memory (ROM), and central processing unit (CPU). The detection module 302 is specifically used for: performing anomaly detection on the ROM based on the set CRC16 check method; performing read-write consistency check on the RAM; and performing read-write consistency check on the CPU.
[0076] Optionally, when the detection module 302 performs anomaly detection on the ROM based on the set CRC16 check method, it is further specifically used for: determining the sequence code of the data to be tested from the program storage area; determining the CRC check code corresponding to the sequence code of the data to be tested based on the set CRC check method; comparing the CRC check code with the pre-stored CRC check code; determining that the ROM has an anomaly in response to the CRC check code being inconsistent with the pre-stored CRC check code; and determining that the ROM does not have an anomaly in response to the CRC check code being consistent with the pre-stored CRC check code.
[0077] Optionally, when performing a read-write consistency check on the RAM, the detection module 302 is further configured to: determine the RAM region to be detected; write a first detection value into the RAM region, the first detection value including 0x5A5A5A5A and / or 0xA5A5A5A5; compare the data read from the RAM region with the first detection value; determine that the RAM is abnormal in response to the read data being inconsistent with the first detection value; and determine that the RAM is not abnormal in response to the read data being consistent with the first detection value.
[0078] Optionally, the CPU includes at least one register. When performing a read-write consistency check on the CPU, the detection module 302 is further configured to: determine the register to be tested in at least one register; write a second detection value into the register to be tested, the second detection value including 0x5A5A5A5A and / or 0xA5A5A5A5; compare the data read from the register to be tested with the second detection value; determine that the CPU has an anomaly in response to the read data being inconsistent with the second detection value; and determine that the CPU does not have an anomaly in response to the read data being consistent with the second detection value.
[0079] Optionally, the MCU detection device 300 further includes an early warning module (not shown), which is used to issue an early warning message in response to an abnormality in the MCU, and the early warning message is used for abnormality warning.
[0080] Optionally, the warning module is also specifically used to: in response to an abnormality in the MCU, call the flashing LED program to provide a warning.
[0081] The MCU detection device is used to execute the technical solution provided in the aforementioned MCU detection method embodiment. Its implementation principle and technical effect are similar to those in the aforementioned method embodiment, and will not be repeated here.
[0082] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application, such as... Figure 4 As shown, the terminal device 400 includes:
[0083] Processor 411, memory 412, and interaction interface 413;
[0084] The memory 412 is used to store programs and data. The processor 411 calls the program stored in the memory 412 to execute the aforementioned MCU detection method.
[0085] In the aforementioned terminal device, the memory 412, processor 411, and interaction interface 413 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines, such as bus connections. The memory 412 stores computer execution instructions that implement the aforementioned MCU detection method, including at least one software functional module that can be stored in the memory in the form of software or firmware. The processor 411 executes various functional applications and data processing by running the software program and module stored in the memory 412.
[0086] The memory 412 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory stores programs, which are then executed by the processor upon receiving execution instructions. Furthermore, the software programs and modules within the memory may include an operating system, which may include various software components and / or drivers for managing system tasks (e.g., memory management, storage device control, power management), and can communicate with various hardware or software components to provide an operating environment for other software components.
[0087] Processor 411 can be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.
[0088] This application also provides a chip, including: a processor and a memory; the memory stores a computer program, and when the processor executes the computer program stored in the memory, it implements the steps of the MCU detection method in the above-described method embodiments.
[0089] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solution provided in the aforementioned MCU detection method embodiments.
[0090] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solution provided in the aforementioned MCU detection method embodiment.
[0091] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting MCUs, characterized in that, Anomaly detection is performed on the microcontroller unit (MCU) of variable frequency home appliances, and the MCU detection method includes: Monitor the operating status of the compressor, which includes running status and stopped status; In response to the compressor's operating state changing from running to stopped, the MCU performs anomaly detection; In response to the detection result indicating an abnormality in the MCU, the operation of the inverter home appliance is prohibited. The MCU includes at least random access memory (RAM), read-only memory (ROM), and a central processing unit (CPU). The anomaly detection of the MCU includes: Anomaly detection in ROM is performed based on the configured CRC16 check method; Perform read-write consistency checks on RAM; Perform read-write consistency checks on the CPU.
2. The MCU detection method according to claim 1, characterized in that, The anomaly detection of the ROM based on the set CRC16 check method includes: Determine the sequence code of the data to be tested from the program storage area; Based on the set CRC check method, determine the CRC check code corresponding to the sequence code of the data to be tested; The CRC checksum is compared with the pre-stored CRC checksum; If the CRC checksum is inconsistent with the pre-stored CRC checksum, it is determined that the ROM is abnormal. If the CRC checksum matches the pre-stored CRC checksum, it is determined that the ROM is not abnormal.
3. The MCU detection method according to claim 1, characterized in that, The read-write consistency check of RAM includes: Identify the RAM region to be detected; Write a first detection value into the RAM area, wherein the first detection value includes 0x5A5A5A5A and / or 0xA5A5A5A5; The data read from the RAM area is compared with the first detection value; In response to the discrepancy between the read data and the first detection value, it is determined that the RAM is abnormal; If the read data matches the first detection value, it is determined that there is no abnormality in the RAM.
4. The MCU detection method according to claim 1, characterized in that, The CPU includes at least one register, and the read-write consistency check of the CPU includes: Determine the register to be detected among the at least one register; Write the second detection value into the register to be detected, wherein the second detection value includes 0x5A5A5A5A and / or 0xA5A5A5A5; The data read from the register to be detected is compared with the second detection value; If the read data is inconsistent with the second detection value, it is determined that the CPU is abnormal; If the read data matches the second detection value, it is determined that the CPU is not abnormal.
5. The MCU detection method according to any one of claims 1 to 4, characterized in that, Also includes: In response to an anomaly in the MCU, a warning message is issued, which is used for anomaly warning.
6. The MCU detection method according to claim 5, characterized in that, The response to an anomaly in the MCU, issuing a warning message, includes: In response to an MCU anomaly, a flashing LED program is invoked to provide an early warning.
7. An MCU detection device, characterized in that, An anomaly detection device for microcontroller units (MCUs) in variable frequency home appliances includes: The monitoring module is used to monitor the operating status of the compressor, which includes running status and stopped status; The detection module is used to perform anomaly detection on the MCU in response to the compressor's working state changing from running state to stopping state; The processing module is used to prevent the inverter home appliance from starting in response to the detection result indicating that the MCU is abnormal; The MCU includes at least a random access memory (RAM), a read-only memory (ROM), and a central processing unit (CPU). The detection module is specifically used for: performing anomaly detection on the ROM based on a set CRC16 check method; performing read-write consistency checks on the RAM; and performing read-write consistency checks on the CPU.
8. A terminal device, characterized in that, include: Processor, memory, interface; The memory is used to store programs and data, and the processor calls the program stored in the memory to execute the MCU detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the MCU detection method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the MCU detection method according to any one of claims 1 to 6.