A smart burning method, system and storage medium for automatically detecting abnormalities
By automatically detecting abnormalities and adjusting the burn frequency, the problem of chip burn failure in IDE is solved, the success rate and efficiency of burning are improved, and the time cost of developers is reduced.
Patent Information
- Application Number
- CN202410326141.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-03-21
AI Technical Summary
When chip recording is performed in IDE, problems such as unstable voltage, poor communication contact or excessive data transmission speed lead to failure of burning, seriously affecting development efficiency.
By automatically detecting abnormalities, setting the communication working frequency during the burning process according to the communication voltage, and adjusting the frequency in real time according to the burning results or re-executing the burning operation to ensure that the burning is successful.
It improves the success rate and efficiency of burning operations and reduces the time cost of developers during burning.
Smart Images

Figure CN118132314B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically, to an intelligent burning method, system and storage medium for automatically detecting abnormalities. Background Art
[0002] IDE is the abbreviation of Integrated Development Environment, which is usually translated into Chinese as Integrated Development Environment. It is a software application that provides a comprehensive toolset for program developers to write, debug, test and run computer programs. IDE communicates with the chip through wired connections such as burners and emulators to perform code burning, simulation debugging and other tasks. However, when there are phenomena such as unstable power supply voltage of the chip or communication equipment, poor communication contact, and too fast data transmission speed, burning failure often occurs. When burning fails, developers usually need to spend time looking for the cause and solution based on the error code displayed by the IDE, which seriously affects development efficiency. Summary of the invention
[0003] In view of the above problems, the purpose of the present invention is to provide an intelligent burning method, system and storage medium for automatically detecting abnormalities, setting the communication working frequency during the burning process according to the communication voltage to ensure the success rate of the burning operation; then, according to the completion status of the burning, adjusting the communication working frequency during the burning process in real time or implementing a preset problem-solving method to improve the efficiency of the burning operation; by automatically detecting abnormalities and modifying burning parameters and operations, the success rate and efficiency of the burning operation are improved, thereby reducing the time cost of developers using IDE.
[0004] The first aspect of the present invention provides an intelligent programming method for automatically detecting abnormalities, the method comprising:
[0005] Obtaining first feedback instruction information;
[0006] According to the first feedback instruction information, determining whether the chip is in a burning connection state;
[0007] If yes, obtaining first voltage information;
[0008] According to the first voltage information, setting first debugging frequency information;
[0009] After performing a burning operation according to the first debugging frequency information, obtaining first burning information;
[0010] Determining whether the first burning information is a preset burning completion code;
[0011] If yes, then adjust the first debugging frequency information upward according to the burning record;
[0012] If not, the first debugging frequency is adjusted downward or a re-burning operation is performed according to the first burning information.
[0013] In this solution, the first debugging frequency information is set according to the first voltage information, specifically:
[0014] Acquire first level information of the first voltage information;
[0015] Determining whether the first level information is within a preset level threshold range;
[0016] If yes, obtaining first amplitude information of the first level information;
[0017] determining second level information according to the first level information and the first amplitude information;
[0018] Determining whether the second level information is within a preset level threshold range;
[0019] If so, the first debugging frequency information is set according to the second level information.
[0020] In this solution, the step of downwardly adjusting the first debugging frequency or performing a re-burning operation according to the first burning information is specifically as follows:
[0021] Determining whether the first burning information is a first error code;
[0022] If yes, adjust the first debugging frequency down by one level and then re-execute the burning operation;
[0023] Determining whether the first burning information is a second error code;
[0024] If yes, a reset command is sent, and the programming operation is executed again after a preset delay time.
[0025] In this solution, setting the first debugging frequency information according to the second level information is specifically:
[0026] The first debugging frequency information is obtained by searching a preset frequency correspondence table.
[0027] In this solution, the first debugging frequency information is adjusted upward according to the burning record, specifically:
[0028] Obtaining, according to the burning record, information about the first number of times that the first burning information is a preset burning completion code under the current first debugging frequency information;
[0029] Determine whether the first number of times information exceeds a preset first number of times threshold;
[0030] If so, the first debugging frequency is adjusted upward by one level.
[0031] This plan also includes:
[0032] The first debugging frequency information is set with a frequency upper limit value and a frequency lower limit value;
[0033] When the first debugging frequency information is adjusted upward, it shall not exceed the preset frequency upper limit value;
[0034] When the first debugging frequency information is adjusted downward, it must not be lower than a preset frequency lower limit.
[0035] A second aspect of the present invention provides an intelligent burning system for automatically detecting abnormalities, including an intelligent burning method program for automatically detecting abnormalities, wherein the intelligent burning method program for automatically detecting abnormalities implements the following steps when executed by the processor:
[0036] Obtaining first feedback instruction information;
[0037] According to the first feedback instruction information, determining whether the chip is in a burning connection state;
[0038] If yes, obtaining first voltage information;
[0039] According to the first voltage information, setting first debugging frequency information;
[0040] After performing a burning operation according to the first debugging frequency information, obtaining first burning information;
[0041] Determining whether the first burning information is a preset burning completion code;
[0042] If yes, then adjust the first debugging frequency information upward according to the burning record;
[0043] If not, the first debugging frequency is adjusted downward or a re-burning operation is performed according to the first burning information.
[0044] In this solution, the first debugging frequency information is set according to the first voltage information, specifically:
[0045] Acquire first level information of the first voltage information;
[0046] Determining whether the first level information is within a preset level threshold range;
[0047] If yes, obtaining first amplitude information of the first level information;
[0048] determining second level information according to the first level information and the first amplitude information;
[0049] Determining whether the second level information is within a preset level threshold range;
[0050] If so, the first debugging frequency information is set according to the second level information.
[0051] In this solution, the step of downwardly adjusting the first debugging frequency or performing a re-burning operation according to the first burning information is specifically as follows:
[0052] Determining whether the first burning information is a first error code;
[0053] If yes, adjust the first debugging frequency down by one level and then re-execute the burning operation;
[0054] Determining whether the first burning information is a second error code;
[0055] If yes, a reset command is sent, and the programming operation is executed again after a preset delay time.
[0056] The third aspect of the present invention provides a computer-readable storage medium, which includes a program for an intelligent burning method for automatically detecting anomalies. When the program for the intelligent burning method for automatically detecting anomalies is executed by a processor, the steps of the intelligent burning method for automatically detecting anomalies as described in any one of the above items are implemented.
[0057] The present invention provides an intelligent burning method, system and storage medium for automatically detecting abnormalities. First, the connection state of the chip is obtained according to a preset communication instruction. When in a burning connection state, first debugging frequency information is set according to first voltage information; then, the first burning information after the burning operation is performed is obtained, and the first debugging frequency information is adjusted or a re-burning operation is performed according to the first burning information; the efficiency of the burning operation is improved by upwardly adjusting the first debugging frequency information, and the success rate of the burning operation is improved by downwardly adjusting the first debugging frequency information; therefore, the present invention reduces the time cost of developers using IDE in the burning process by automatically detecting abnormalities and modifying burning parameters and operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and should not be regarded as limiting the scope.
[0059] Figure 1 A flow chart of an intelligent programming method for automatically detecting abnormalities according to the present invention is shown;
[0060] Figure 2A flow chart of adjusting the first debugging frequency information provided by an embodiment of the present invention is shown;
[0061] Figure 3 The process flow chart of programming failure provided by the present invention is shown;
[0062] Figure 4 A block diagram of an intelligent programming system for automatically detecting abnormalities according to the present invention is shown. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] Unless otherwise defined, all terms (including technical and scientific terms) used in the embodiments of the present invention have the same meanings as commonly understood by those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having meanings consistent with their meanings in the context of the relevant technology, and should not be interpreted in an idealized or extremely formal sense, unless the embodiments of the present invention are clearly defined in this way.
[0065] The words "first", "second" and similar words used in the embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "one", "an" or "the" and similar words do not indicate a quantity limitation, but indicate the existence of at least one. Similarly, words such as "include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The steps before or after the method of the embodiment of the present invention are not necessarily carried out in order. On the contrary, various steps can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or a step or several steps can be removed from these processes.
[0066] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0067] Figure 1 The flowchart of an intelligent burning method for automatically detecting abnormalities of the present invention is shown.
[0068] like Figure 1 As shown, the present invention discloses an intelligent burning method for automatically detecting abnormalities, the method comprising:
[0069] S102, obtaining first feedback instruction information;
[0070] S104, judging whether the chip is in a burning connection state according to the first feedback instruction information;
[0071] S106, if yes, obtain first voltage information;
[0072] S108, setting first debugging frequency information according to the first voltage information;
[0073] S110, after performing a burning operation according to the first debugging frequency information, obtaining first burning information;
[0074] S112, determining whether the first burning information is a preset burning completion code;
[0075] S114, if yes, adjusting the first debugging frequency information upward according to the burning record;
[0076] S116: If not, adjusting the first debugging frequency downward or performing a re-burning operation according to the first burning information.
[0077] It should be noted that the first feedback instruction information is the feedback instruction received by the burner from the chip when the burner communicates with the chip through handshake communication; the first voltage information is the voltage value on the communication connection wire when the burner communicates with the chip; the first debugging frequency information is the communication working frequency during the burning process; the first burning information is the burning result after the chip executes burning in a coded form. After the IDE is connected to the communication device such as the burner and the emulator, it will send a handshake instruction through the communication device; when the communication device is connected to the chip, the chip returns the first feedback instruction information to the IDE through the communication device according to the handshake instruction. By analyzing the first feedback instruction information, it can be determined whether the chip is in the burning connection state; when the chip is in the burning connection state, it means that the IDE has established a complete communication circuit requirement with the chip through the communication device and the chip is in a burnable state, then the voltage value on the communication connection wire when the communication device connected to the IDE communicates with the chip is analyzed, that is, the first voltage information is analyzed. In practical applications, when the communication voltage value is low, if the data transmission speed is too fast, there is a problem of data transmission packet loss; usually, the speed is reduced to ensure the integrity of data transmission. According to its debugging experience and communication equipment, the IDE manufacturer sets a data transmission speed that meets the burning success rate requirements for the first voltage information, that is, the communication working frequency during the burning process; that is, a preset value is set for the first debugging frequency information according to the first voltage information. After the IDE performs the burning operation with the first debugging frequency information, it obtains the corresponding result code according to the burning result, that is, the first burning information; the IDE encodes different burning results and the identified burning anomalies, and then displays the burning results to the developers using the IDE in the form of encoding. When the first burning information shows that the burning is successful, the first debugging frequency information is adjusted upward according to the burning record; if the burning record shows that the number of successful burning operations reaches the preset requirement, it means that the communication is stable and the burning efficiency can be improved by increasing the data transmission speed, then the first debugging frequency information is adjusted upward. When the first burning information shows that the burning fails, the abnormal problem is judged according to the error code of the first burning information, and the problem is tried to be solved by reducing the data transmission speed or re-burning to improve the success rate of burning.
[0078] Figure 2 A flow chart of adjusting the first debugging frequency information provided by an embodiment of the present invention is shown.
[0079] According to an embodiment of the present invention, Figure 2 As shown, the first debugging frequency information is set according to the first voltage information, specifically:
[0080] S202, obtaining first level information of the first voltage information;
[0081] S204, determining whether the first level information is within a preset level threshold range;
[0082] S206, if yes, obtaining first amplitude information of the first level information;
[0083] S208, determining second level information according to the first level information and the first amplitude information;
[0084] S210, determining whether the second level information is within a preset level threshold range;
[0085] S212: If yes, setting the first debugging frequency information according to the second level information.
[0086] It should be noted that the first level information is the voltage average value of the high level part in the first voltage information; the first amplitude information is the voltage amplitude value of the upward and downward vibration based on the voltage average value when the first voltage information is at a high level; the second level information is the lowest voltage value when the first voltage information is at a high level. Burning communication is based on digital communication; during the communication process, the communication wire switches between high and low levels according to the transmitted data. Due to power supply errors, interference signals, etc., the communication voltage value fluctuates during the communication process, so the high level state on the communication wire is based on a certain voltage value and fluctuates up and down with a certain amplitude; wherein, the reference voltage described in the present invention is represented by an average voltage; for example, in a 3.3V circuit system, the high level on the communication wire can be a level based on 3.2V and an amplitude of ±0.1V; that is, the high level range on the communication wire is 3.1V to 3.3V. First, obtain the average voltage of the high level on the communication wire, that is, the first level information, to determine whether the first level information is within the preset voltage range; in the 3.3V circuit system of actual application, when the level voltage is between 2.7V and 3.3V, it is usually identified as a high level, presenting a digital logic 1 state; when it is between 0V and 0.7V, it is identified as a low level, presenting a digital logic 0 state; therefore, when the first level information is within the preset voltage range, the circuit system can determine that the current voltage value is in a high level state. Then, by real-time acquisition of the first voltage information, the vibration amplitude of the first level information can be analyzed and obtained, and then the minimum voltage value when the first voltage information is at a high level is obtained according to the vibration amplitude, that is, the second level information. Finally, with the first level information as a reference and the second level information as a basis, the preset frequency correspondence table is searched to obtain the first debugging frequency information.
[0087] Figure 3 The flowchart of processing the burning failure provided by the present invention is shown.
[0088] According to an embodiment of the present invention, Figure 3As shown, the first debugging frequency is adjusted downward or a re-burning operation is performed according to the first burning information, specifically:
[0089] S302, determining whether the first burning information is a first error code;
[0090] S304, if yes, then adjust the first debugging frequency down by one level and re-execute the burning operation;
[0091] S306, determining whether the first burning information is a second error code;
[0092] S308: If yes, send a reset instruction, and re-execute the burning operation after a preset delay time.
[0093] It should be noted that when the burning result is a failure, an abnormal analysis and processing is performed according to the burning result code, that is, the first burning information. The first error code is the burning result code when the data transmission is abnormal, including but not limited to data packet loss, length bit abnormality, check bit abnormality, etc. When the first burning information is the first error code, it means that the cause of the burning abnormality may be that the set data transmission speed is too fast, that is, the first debugging frequency is too high; therefore, the first debugging frequency is automatically adjusted down by one level, and the burning operation is re-executed to reduce the time spent by developers using IDE to find problems and manually adjust the frequency, thereby improving the work efficiency of developers. The second error code is the burning result code when the burning is interrupted, including but not limited to the chip being disconnected from the communication device, the memory being disconnected, etc. In actual applications, when a burning interruption problem occurs, the measure of manually resetting the chip and then burning is usually adopted. In the present invention, if the first burning information is the second error code, a reset instruction is sent to enable the communication device control chip to perform a reset operation; a preset delay time, such as 100ms or 200ms, is waited for the chip reset to be completed, and then the burning operation is automatically performed to reduce the time spent by developers using IDE on manual reset and burning.
[0094] According to an embodiment of the present invention, setting the first debugging frequency information according to the second level information is specifically:
[0095] The first debugging frequency information is obtained by searching a preset frequency correspondence table.
[0096] It should be noted that, as an implementation, a frequency correspondence table is set in the memory; in the table lookup process, the first level information is used to first search for the adapted frequency range, and then the second level information is used to select the specific communication operating frequency to set the first debugging frequency information. As an implementation, the frequency correspondence table is represented in the processor in the form of an algorithm function, the first level information and the second level information are used as input parameters of the algorithm function, and the first debugging frequency information is set with the frequency value output by the algorithm function.
[0097] According to an embodiment of the present invention, adjusting the first debugging frequency information according to the burning record is specifically:
[0098] Obtaining, according to the burning record, information about the first number of times that the first burning information is a preset burning completion code under the current first debugging frequency information;
[0099] Determine whether the first number of times information exceeds a preset first number of times threshold;
[0100] If so, the first debugging frequency is adjusted upward by one level.
[0101] It should be noted that the first number of times information is the number of consecutive successful burning when the first debugging frequency information in the burning record is the set value. When the burning is completed with the first debugging frequency information as the data transmission rate, the data transmission rate adjustment operation is entered. Look up the burning record, and obtain the consecutive number of successful burning with the first debugging frequency information in the current round of burning connection state, which is recorded as the first number of times information; wherein, the burning round is marked by restarting the IDE or reconnecting the burning communication device, and the round is switched, that is, when the IDE is restarted or the communication device is reconnected, it is regarded as a new burning round. When the first number of times information exceeds the preset first number threshold, it means that the burning with the current first debugging frequency information is stable, and you can try to adjust the first debugging frequency upward by one level to improve the efficiency of burning.
[0102] According to an embodiment of the present invention, it also includes:
[0103] The first debugging frequency information is set with a frequency upper limit value and a frequency lower limit value;
[0104] When the first debugging frequency information is adjusted upward, it shall not exceed the preset frequency upper limit value;
[0105] When the first debugging frequency information is adjusted downward, it must not be lower than a preset frequency lower limit.
[0106] It should be noted that IDE sets different communication frequency upper limits and communication frequency lower limits for different chip models due to different chip performance. In addition, the values of the optional communication frequencies are usually not continuous, but are frequency values of a preset number of levels set by the IDE according to the chip. For example, IDE sets 10 levels of frequency for a chip, namely 200KHz, 500KHz, 1MHz, 2MHz, 5MHz, 10MHz, 20MHz, 25MHz, 33MHz, and 50MHz; the settable frequency of the first debugging frequency information can only be selected according to the frequency values of the preset levels. When the first debugging frequency information is adjusted upward, it shall not exceed the set frequency upper limit value; when the first debugging frequency information is adjusted downward, it shall not be lower than the set frequency upper limit value.
[0107] It is worth mentioning that it also includes:
[0108] When the first debugging frequency information is a preset frequency lower limit value;
[0109] After the burning is performed, obtaining second number information in which the first burning information is not a preset burning completion code;
[0110] Determine whether the second number of times information exceeds a preset second number of times threshold;
[0111] If yes, the first abnormal information is displayed.
[0112] It should be noted that when the burning communication operating frequency is the lower limit of the frequency that the chip can set, and the burning operation is unsuccessful, and the burning result encoding is the first error code or the second error code, the number of unsuccessful burning is recorded as the second number information. When the second number information exceeds the preset second number threshold, it means that the chip is abnormal and cannot be burned normally. The IDE prompts the IDE user through the display window that the connected chip may be damaged, reducing the increase in time cost caused by repeated trial and error.
[0113] It is worth mentioning that it also includes:
[0114] When the first burning information is the third error code;
[0115] Searching a preset error code analysis table according to the first burning information to obtain analysis information;
[0116] Determine an exception resolution method based on the analysis information;
[0117] The parsing information and the exception resolution method are displayed.
[0118] It should be noted that the third error code is an error identified by the IDE when the burning fails and needs to be manually modified by the developer, for example, exceeding the chip storage space, storage address usage error, etc. When the third error occurs, the IDE directly displays the burning abnormality cause corresponding to the error code through a display window, and provides a solution to the abnormality, so that the developer using the IDE can locate the problem according to the abnormality cause and modify and debug the file with reference to the solution, thereby improving the efficiency of the developer's debugging and error correction.
[0119] It is worth mentioning that it also includes:
[0120] When the first burning information is the third error code;
[0121] Determine whether it is a configuration parameter correction operation based on the exception resolution method;
[0122] If so, a preset recommended parameter and a comparison table of the configuration parameters before and after correction are provided, and a one-key modification button is provided.
[0123] It should be noted that when the third error occurs, it is determined whether the solution is to modify the configuration parameters, for example, the starting address of the storage space is configured incorrectly. If so, the IDE provides a one-click configuration option through a window; the currently used configuration parameters and the recommended configuration parameters are displayed in the window, and a confirmation modification button is provided to the developer using the IDE; if the button is pressed, the IDE adjusts the configuration parameters. Through the above operations, developers do not need to check and adjust the configuration parameters one by one, which improves the efficiency of leak detection and gap filling.
[0124] Figure 4 A block diagram of an intelligent programming system for automatically detecting abnormalities according to the present invention is shown.
[0125] like Figure 4 As shown, the present invention discloses an intelligent burning system 4 for automatically detecting abnormalities, including a memory 41 and a processor 42, wherein the memory includes an intelligent burning method program for automatically detecting abnormalities, and when the intelligent burning method program for automatically detecting abnormalities is executed by the processor, the following steps are implemented:
[0126] Obtaining first feedback instruction information;
[0127] According to the first feedback instruction information, determining whether the chip is in a burning connection state;
[0128] If yes, obtaining first voltage information;
[0129] According to the first voltage information, setting first debugging frequency information;
[0130] After performing a burning operation according to the first debugging frequency information, obtaining first burning information;
[0131] Determining whether the first burning information is a preset burning completion code;
[0132] If yes, then adjust the first debugging frequency information upward according to the burning record;
[0133] If not, the first debugging frequency is adjusted downward or a re-burning operation is performed according to the first burning information.
[0134] It should be noted that after the IDE is connected to a communication device such as a burner or an emulator, a handshake instruction will be sent through the communication device; when the communication device is connected to a chip, the chip returns the first feedback instruction information to the IDE through the communication device according to the handshake instruction. By analyzing the first feedback instruction information, it can be determined whether the chip is in a burning connection state; when the chip is in a burning connection state, it means that the IDE has established a complete communication circuit requirement with the chip through the communication device and the chip is in a burnable state, then the voltage value on the communication connection wire when the communication device connected to the IDE communicates with the chip is analyzed, that is, the first voltage information is analyzed. In practical applications, when the communication voltage value is low, if the data transmission speed is too fast, there is a problem of data transmission packet loss; the speed is usually reduced to ensure the integrity of the data transmission. Based on its own debugging experience and communication equipment, the IDE manufacturer sets a data transmission speed that meets the burning success rate requirements for the first voltage information, that is, the communication working frequency during the burning process; that is, a preset value is set for the first debugging frequency information according to the first voltage information. After the IDE performs the burning operation with the first debugging frequency information, the corresponding result code, that is, the first burning information, is obtained according to the burning result; the IDE encodes different burning results and the burning anomalies identified, and then displays the burning result to the developer using the IDE in the form of code. When the first burning information shows that the burning is successful, the first debugging frequency information is adjusted upward according to the burning record; if the burning record shows that the number of successful burning operations reaches the preset requirement, it means that the communication is stable and the burning efficiency can be improved by increasing the data transmission speed, then the first debugging frequency information is adjusted upward. When the first burning information shows that the burning fails, the abnormal problem is judged according to the error code of the first burning information, and the problem is tried to be solved by reducing the data transmission speed or re-burning to improve the success rate of burning.
[0135] According to an embodiment of the present invention, setting the first debugging frequency information according to the first voltage information is specifically:
[0136] Acquire first level information of the first voltage information;
[0137] Determining whether the first level information is within a preset level threshold range;
[0138] If yes, obtaining first amplitude information of the first level information;
[0139] determining second level information according to the first level information and the first amplitude information;
[0140] Determining whether the second level information is within a preset level threshold range;
[0141] If so, the first debugging frequency information is set according to the second level information.
[0142] It should be noted that the burning communication is based on digital communication; during the communication process, the communication wire switches between high level and low level according to the transmitted data. Due to power supply errors, interference signals, etc., the communication voltage value fluctuates during the communication process, so the high level state on the communication wire is based on a certain voltage value and fluctuates up and down with a certain amplitude; wherein the reference voltage described in the present invention is represented by an average voltage; for example, in a 3.3V circuit system, the high level on the communication wire can be a level based on 3.2V and an amplitude of ±0.1V; that is, the high level range on the communication wire is 3.1V to 3.3V. First, obtain the average voltage of the high level on the communication wire, that is, the first level information, to determine whether the first level information is within the preset voltage range; in the 3.3V circuit system of actual application, when the level voltage is between 2.7V and 3.3V, it is usually identified as a high level, presenting a digital logic 1 state; when it is between 0V and 0.7V, it is identified as a low level, presenting a digital logic 0 state; therefore, when the first level information is within the preset voltage range, the circuit system can determine that the current voltage value is in a high level state. Then, by real-time acquisition of the first voltage information, the vibration amplitude of the first level information can be analyzed and obtained, and then the minimum voltage value when the first voltage information is at a high level is obtained according to the vibration amplitude, that is, the second level information. Finally, with the first level information as a reference and the second level information as a basis, the preset frequency correspondence table is searched to obtain the first debugging frequency information.
[0143] According to an embodiment of the present invention, the step of downwardly adjusting the first debugging frequency or performing a re-burning operation according to the first burning information is specifically as follows:
[0144] Determining whether the first burning information is a first error code;
[0145] If yes, adjust the first debugging frequency down by one level and then re-execute the burning operation;
[0146] Determining whether the first burning information is a second error code;
[0147] If yes, a reset command is sent, and the programming operation is executed again after a preset delay time.
[0148] It should be noted that when the burning result is a failure, an abnormal analysis and processing is performed according to the burning result code, that is, the first burning information. The first error code is the burning result code when the data transmission is abnormal, including but not limited to data packet loss, length bit abnormality, check bit abnormality, etc. When the first burning information is the first error code, it means that the cause of the burning abnormality may be that the set data transmission speed is too fast, that is, the first debugging frequency is too high; therefore, the first debugging frequency is automatically adjusted down by one level, and the burning operation is re-executed to reduce the time spent by developers using IDE to find problems and manually adjust the frequency, thereby improving the work efficiency of developers. The second error code is the burning result code when the burning is interrupted, including but not limited to the chip being disconnected from the communication device, the memory being disconnected, etc. In actual applications, when a burning interruption problem occurs, the measure of manually resetting the chip and then burning is usually adopted. In the present invention, if the first burning information is the second error code, a reset instruction is sent to enable the communication device control chip to perform a reset operation; a preset delay time, such as 100ms or 200ms, is waited for the chip reset to be completed, and then the burning operation is automatically performed to reduce the time spent by developers using IDE on manual reset and burning.
[0149] According to an embodiment of the present invention, setting the first debugging frequency information according to the second level information is specifically:
[0150] The first debugging frequency information is obtained by searching a preset frequency correspondence table.
[0151] It should be noted that, as an implementation, a frequency correspondence table is set in the memory; in the table lookup process, the first level information is used to first search for the adapted frequency range, and then the second level information is used to select the specific communication operating frequency to set the first debugging frequency information. As an implementation, the frequency correspondence table is represented in the processor in the form of an algorithm function, the first level information and the second level information are used as input parameters of the algorithm function, and the first debugging frequency information is set with the frequency value output by the algorithm function.
[0152] According to an embodiment of the present invention, adjusting the first debugging frequency information according to the burning record is specifically:
[0153] Obtaining, according to the burning record, information about the first number of times that the first burning information is a preset burning completion code under the current first debugging frequency information;
[0154] Determine whether the first number of times information exceeds a preset first number of times threshold;
[0155] If so, the first debugging frequency is adjusted upward by one level.
[0156] It should be noted that when the burning is completed with the first debugging frequency information as the data transmission rate, the data transmission rate adjustment operation is entered. The burning record is searched to obtain the consecutive number of successful burning with the first debugging frequency information in the current burning connection state, which is recorded as the first number information; wherein, the burning round is marked by restarting the IDE or reconnecting the burning communication device, and the round is switched, that is, when the IDE is restarted or the communication device is reconnected, it is regarded as a new burning round. When the first number information exceeds the preset first number threshold, it means that the burning with the current first debugging frequency information is highly stable, and you can try to adjust the first debugging frequency upward by one level to improve the efficiency of burning.
[0157] According to an embodiment of the present invention, it also includes:
[0158] The first debugging frequency information is set with a frequency upper limit value and a frequency lower limit value;
[0159] When the first debugging frequency information is adjusted upward, it shall not exceed the preset frequency upper limit value;
[0160] When the first debugging frequency information is adjusted downward, it must not be lower than a preset frequency lower limit.
[0161] It should be noted that IDE sets different communication frequency upper limits and communication frequency lower limits for different chip models due to different chip performance. In addition, the values of the optional communication frequencies are usually not continuous, but are frequency values of a preset number of levels set by the IDE according to the chip. For example, IDE sets 10 levels of frequency for a chip, namely 200KHz, 500KHz, 1MHz, 2MHz, 5MHz, 10MHz, 20MHz, 25MHz, 33MHz, and 50MHz; the settable frequency of the first debugging frequency information can only be selected according to the frequency values of the preset levels. When the first debugging frequency information is adjusted upward, it shall not exceed the set frequency upper limit value; when the first debugging frequency information is adjusted downward, it shall not be lower than the set frequency upper limit value.
[0162] It is worth mentioning that it also includes:
[0163] When the first debugging frequency information is a preset frequency lower limit value;
[0164] After the burning is performed, obtaining second number information in which the first burning information is not a preset burning completion code;
[0165] Determine whether the second number of times information exceeds a preset second number of times threshold;
[0166] If yes, the first abnormal information is displayed.
[0167] It should be noted that when the burning communication operating frequency is the lower limit of the frequency that the chip can set, and the burning operation is unsuccessful, and the burning result encoding is the first error code or the second error code, the number of unsuccessful burning is recorded as the second number information. When the second number information exceeds the preset second number threshold, it means that the chip is abnormal and cannot be burned normally. The IDE prompts the IDE user through the display window that the connected chip may be damaged, reducing the increase in time cost caused by repeated trial and error.
[0168] It is worth mentioning that it also includes:
[0169] When the first burning information is the third error code;
[0170] Searching a preset error code analysis table according to the first burning information to obtain analysis information;
[0171] Determine an exception resolution method based on the analysis information;
[0172] The parsing information and the exception resolution method are displayed.
[0173] It should be noted that the third error code is an error identified by the IDE when the burning fails and needs to be manually modified by the developer, for example, exceeding the chip storage space, storage address usage error, etc. When the third error occurs, the IDE directly displays the burning abnormality cause corresponding to the error code through a display window, and provides a solution to the abnormality, so that the developer using the IDE can locate the problem according to the abnormality cause and modify and debug the file with reference to the solution, thereby improving the efficiency of the developer's debugging and error correction.
[0174] It is worth mentioning that it also includes:
[0175] When the first burning information is the third error code;
[0176] Determine whether it is a configuration parameter correction operation based on the exception resolution method;
[0177] If so, a preset recommended parameter and a comparison table of the configuration parameters before and after correction are provided, and a one-key modification button is provided.
[0178] It should be noted that when the third error occurs, it is determined whether the solution is to modify the configuration parameters, for example, the starting address of the storage space is configured incorrectly. If so, the IDE provides a one-click configuration option through a window; the currently used configuration parameters and the recommended configuration parameters are displayed in the window, and a confirmation modification button is provided to the developer using the IDE; if the button is pressed, the IDE adjusts the configuration parameters. Through the above operations, developers do not need to check and adjust the configuration parameters one by one, which improves the efficiency of leak detection and gap filling.
[0179] The third aspect of the present invention provides a computer-readable storage medium, which includes a program for an intelligent burning method for automatically detecting anomalies. When the program for the intelligent burning method for automatically detecting anomalies is executed by a processor, the steps of the intelligent burning method for automatically detecting anomalies as described in any one of the above items are implemented.
[0180] The present invention provides an intelligent burning method, system and storage medium for automatically detecting abnormalities. First, the connection state of the chip is obtained according to a preset communication instruction. When in a burning connection state, first debugging frequency information is set according to first voltage information; then, the first burning information after the burning operation is performed is obtained, and the first debugging frequency information is adjusted or a re-burning operation is performed according to the first burning information; the efficiency of the burning operation is improved by upwardly adjusting the first debugging frequency information, and the success rate of the burning operation is improved by downwardly adjusting the first debugging frequency information; therefore, the present invention reduces the time cost of developers using IDE in the burning process by automatically detecting abnormalities and modifying burning parameters and operations.
[0181] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0182] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent programming method for automatically detecting abnormalities, characterized in that: The method comprises: Obtaining first feedback instruction information; According to the first feedback instruction information, determining whether the chip is in a burning connection state; If yes, obtaining first voltage information; According to the first voltage information, setting first debugging frequency information; After performing a burning operation according to the first debugging frequency information, obtaining first burning information; Determining whether the first burning information is a preset burning completion code; If yes, then adjust the first debugging frequency information upward according to the burning record; If not, adjusting the first debugging frequency downward or performing a re-burning operation according to the first burning information; The first feedback instruction information is a feedback instruction from the chip received by the programmer when the programmer performs handshake communication with the chip; The first voltage information is the voltage value on the communication connection wire when the programmer communicates with the chip; The first debugging frequency information is the communication working frequency during the burning process; The first programming information is a programming result after the chip is programmed in a coded form; The first debugging frequency information is set according to the first voltage information, specifically: Acquire first level information of the first voltage information; Determining whether the first level information is within a preset level threshold range; If yes, obtaining first amplitude information of the first level information; determining second level information according to the first level information and the first amplitude information; Determining whether the second level information is within a preset level threshold range; If yes, setting the first debugging frequency information according to the second level information; The first level information is the voltage average value of the high level part in the first voltage information; The first amplitude information is a voltage amplitude value of upward and downward vibrations based on a voltage average value when the first voltage information is at a high level; The second level information is the lowest voltage value when the first voltage information is at a high level; Also includes: When the first debugging frequency information is a preset frequency lower limit value; After the burning is performed, obtaining second number information in which the first burning information is not a preset burning completion code; Determine whether the second number of times information exceeds a preset second number of times threshold; If yes, the first abnormal information is displayed; Also includes: When the first burning information is the third error code; Searching a preset error code analysis table according to the first burning information to obtain analysis information; Determine an exception resolution method based on the analysis information; The parsing information and the exception resolution method are displayed.
2. According to claim 1, a smart programming method for automatically detecting abnormalities is characterized in that: The step of downwardly adjusting the first debugging frequency or performing a re-burning operation according to the first burning information is specifically: Determining whether the first burning information is a first error code; If yes, adjust the first debugging frequency down by one level and then re-execute the burning operation; Determining whether the first burning information is a second error code; If yes, a reset command is sent, and the programming operation is executed again after a preset delay time.
3. According to the intelligent programming method for automatically detecting abnormalities according to claim 1, it is characterized in that: The step of setting the first debugging frequency information according to the second level information is specifically: The first debugging frequency information is obtained by searching a preset frequency correspondence table.
4. The intelligent programming method for automatically detecting abnormalities according to claim 1, characterized in that: The step of adjusting the first debugging frequency information upward according to the burning record is specifically as follows: Obtaining, according to the burning record, information about the first number of times that the first burning information is a preset burning completion code under the current first debugging frequency information; Determine whether the first number of times information exceeds a preset first number of times threshold; If yes, the first debugging frequency is adjusted upward by one level; The first number information is the number of consecutive successful burning when the first debugging frequency information in the burning record is a set value.
5. The intelligent programming method for automatically detecting abnormalities according to claim 2 or 4, characterized in that: Also includes: The first debugging frequency information is set with a frequency upper limit value and a frequency lower limit value; When the first debugging frequency information is adjusted upward, it shall not exceed the preset frequency upper limit value; When the first debugging frequency information is adjusted downward, it must not be lower than a preset frequency lower limit.
6. An intelligent programming system for automatically detecting abnormalities, characterized in that: The system includes a memory and a processor, wherein the memory includes an intelligent burning method program for automatically detecting abnormalities, and when the intelligent burning method program for automatically detecting abnormalities is executed by the processor, the following steps are implemented: Obtaining first feedback instruction information; According to the first feedback instruction information, determining whether the chip is in a burning connection state; If yes, obtaining first voltage information; According to the first voltage information, setting first debugging frequency information; After performing a burning operation according to the first debugging frequency information, obtaining first burning information; Determining whether the first burning information is a preset burning completion code; If yes, then adjust the first debugging frequency information upward according to the burning record; If not, adjusting the first debugging frequency downward or performing a re-burning operation according to the first burning information; The first feedback instruction information is a feedback instruction from the chip received by the programmer when the programmer performs handshake communication with the chip; The first voltage information is the voltage value on the communication connection wire when the programmer communicates with the chip; The first debugging frequency information is the communication working frequency during the burning process; The first programming information is a programming result after the chip is programmed in a coded form; The first debugging frequency information is set according to the first voltage information, specifically: Acquire first level information of the first voltage information; Determining whether the first level information is within a preset level threshold range; If yes, obtaining first amplitude information of the first level information; determining second level information according to the first level information and the first amplitude information; Determining whether the second level information is within a preset level threshold range; If yes, setting the first debugging frequency information according to the second level information; The first level information is the voltage average value of the high level part in the first voltage information; The first amplitude information is a voltage amplitude value of upward and downward vibrations based on a voltage average value when the first voltage information is at a high level; The second level information is the lowest voltage value when the first voltage information is at a high level; Also includes: When the first debugging frequency information is a preset frequency lower limit value; After the burning is performed, obtaining second number information in which the first burning information is not a preset burning completion code; Determine whether the second number of times information exceeds a preset second number of times threshold; If yes, the first abnormal information is displayed; Also includes: When the first burning information is the third error code; Searching a preset error code analysis table according to the first burning information to obtain analysis information; Determine an exception resolution method based on the analysis information; The parsing information and the exception resolution method are displayed.
7. The intelligent programming system for automatically detecting abnormalities according to claim 6, characterized in that: The step of downwardly adjusting the first debugging frequency or performing a re-burning operation according to the first burning information is specifically: Determining whether the first burning information is a first error code; If yes, adjust the first debugging frequency down by one level and then re-execute the burning operation; Determining whether the first burning information is a second error code; If yes, a reset command is sent, and the programming operation is executed again after a preset delay time.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium includes a program of an intelligent burning method for automatically detecting anomalies. When the program of the intelligent burning method for automatically detecting anomalies is executed by a processor, the steps of the intelligent burning method for automatically detecting anomalies as described in any one of claims 1 to 5 are implemented.
