Write program management and control method, storage medium, program product and program writing device

By introducing a monitor into the program writing device to detect level signals and current data, the problem of insufficient electrical parameter management in the prior art is solved, the chip yield and writing efficiency are improved, and the accuracy and security of program writing are ensured.

CN121879787APending Publication Date: 2026-04-17CONTINENTAL AUTOMOTIVE CORPORATION (LIANYUNGANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CONTINENTAL AUTOMOTIVE CORPORATION (LIANYUNGANG) CO LTD
Filing Date
2026-01-05
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The lack of electrical parameter management and detection during the program writing process in existing technologies results in low chip yield and low writing efficiency.

Method used

A program writing device is used, including a program writer and a monitor. The monitor detects the level signal and current data to ensure that they are within the standard level range. If they are outside the range, the writing is stopped to avoid abnormal situations.

Benefits of technology

It improves chip yield and writing efficiency, prevents damage to chips and writing devices due to abnormal voltage or current, and ensures the accuracy of program writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121879787A_ABST
    Figure CN121879787A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of program writing, in particular to a written program control method, a storage medium, a program product and a program writing device. According to the written program management and control method, in the process that a program writer outputs an electric signal corresponding to program data to a chip, a monitor can obtain the electric signal, whether the electric signal output by the program writer to the chip is correct or not is judged based on a level value of the electric signal, and then whether the program writer stops outputting the electric signal to the chip or not is controlled; therefore, the accuracy of writing the program into the chip by the program writer is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of program writing technology, and in particular to a program writing control method, storage medium, program product, and program writing device. Background Technology

[0002] During the chip manufacturing process, preset binary code (such as firmware, operating system kernel or application, function settings, etc.) needs to be permanently or semi-permanently written into the chip's internal memory through program writing (also known as program burning) to set the chip's functions.

[0003] Currently, during the chip writing process, there is a lack of management and detection of electrical parameters (such as device power-on current, writing current, and writing voltage) during the program writing process. Therefore, it is not easy to detect abnormalities in the chip during the program writing process, which affects the chip yield and the efficiency of program writing to the chip. Summary of the Invention

[0004] This application provides a method for controlling program writing, a storage medium, a program product, and a program writing device. This ensures the accuracy of the program writing process and improves the yield rate of the chip.

[0005] In a first aspect, embodiments of this application provide a program writing control method applied to a program writing device, the program writing device including a program writer and a monitor, the method including: the program writer outputting a first level signal to a chip, the first level signal being used to write first data to the chip; the monitor detecting a first level value corresponding to the first level signal; the monitor comparing the first level value with a standard level range corresponding to the first data, and if the first level value exceeds the standard level range, controlling the program writer to stop writing data to the chip.

[0006] In some embodiments of this application, the monitor can detect the first level value of the first level signal output by the programmer to the chip. The monitor can then determine whether the first level value is within the standard level range corresponding to the first data to ensure the accuracy of the level signal currently output by the programmer to the chip, thereby guaranteeing the accuracy of the program writing device writing the program to the chip.

[0007] In one possible implementation of the first aspect described above, the program writer outputs an electrical signal to the chip based on the arrangement order of multiple program data, wherein the multiple program data includes first data and the electrical signal includes a first level signal. The monitor stores multiple program data, and the monitor compares the first level value with a standard level range corresponding to the first data, including: the monitor determining a first timing sequence of the first level signal in the electrical signal; the monitor determining the first data corresponding to the first level data from the multiple program data based on the first timing sequence; the monitor determining a standard level range corresponding to the first data, and comparing the first level value with the standard level range corresponding to the first data.

[0008] In one possible implementation of the first aspect described above, the monitor compares the first level value with a standard level range corresponding to the first data, including: when the programmer sends the first level data to the chip, the monitor obtains the first data from the programmer. The monitor determines the standard level range corresponding to the first data and compares the first level value with the standard level range corresponding to the first data.

[0009] In some embodiments of this application, when the programmer sends first-level data to the chip, it also sends first data corresponding to the first level to the monitor. This allows the monitor to determine the standard level range corresponding to the currently obtained first-level value, thereby determining whether the first-level value exceeds the standard level range. In this way, the monitor can determine whether the first-level value of the first-level data exceeds the standard level range as soon as the programmer finishes outputting the first-level data, thus improving the detection effect.

[0010] In one possible implementation of the first aspect described above, controlling the programmer to stop writing data to the chip if the first level value exceeds the standard level range includes: if the first level value exceeds the standard level range, the monitor determines that an anomaly has occurred in the programmer's writing process to the chip. If the number of anomalies in the programmer's writing process to the chip exceeds a first preset number, the programmer is controlled to stop writing data to the chip.

[0011] In some embodiments of this application, if the monitor detects an abnormal first voltage level, it will not immediately control the programmer to stop writing programs to the chip. The programmer can rewrite programs to the chip. The monitor will only control the programmer to stop writing programs to the chip when it detects that the number of abnormal program writing attempts by the programmer exceeds a first preset number. This avoids the impact of occasional electrical signal anomalies caused by external influences on program writing.

[0012] In one possible implementation of the first aspect described above, if the number of times the program writer encounters an error while writing the program to the chip is less than or equal to a first preset number, the program writer is controlled to rewrite the program to the chip.

[0013] In one possible implementation of the first aspect described above, the monitor acquires first current data of the programmer before the programmer outputs an electrical signal to the chip. Controlling the programmer to stop writing data to the chip further includes: if the first current data exceeds a first current range, the monitor determines that the first current data is abnormal; if the number of times the first current data is abnormal exceeds a second preset number, the monitor controls the programmer to stop writing data to the chip.

[0014] In some embodiments of this application, before the programmer connects to the chip and writes a program to the chip, the monitor can also acquire first current data and detect whether the first current data exceeds a first current range. This ensures that the connection between the chip and the programmer is normal and that the chip itself is not abnormal (e.g., short circuit or open circuit), thereby avoiding the problem of damage to the chip writing device due to abnormalities in the chip itself when the programmer writes a program to the chip.

[0015] In one possible implementation of the first aspect described above, during the process of the programmer outputting an electrical signal to the chip, the monitor acquires the second current data of the programmer. The programmer stopping writing programs to the chip further includes: if the second current data exceeds a second current range, the monitor determines that the second current data is abnormal; if the number of times the second current data is abnormal exceeds a third preset number, the programmer stops writing programs to the chip.

[0016] In some embodiments of this application, during the process of the programmer writing a program to the chip, the monitor can also acquire the second current data output by the programmer to the chip and determine whether the second current data exceeds the second current range. This determines whether the second current data is abnormal, ensuring that the current is normal when the programmer writes the program to the chip, further guaranteeing the accuracy of the programmer writing the program to the chip.

[0017] Secondly, this application provides a program writing apparatus, comprising: a monitor and a program writer as described in the first aspect (i.e., any possible implementation of the method provided in the first aspect); a memory for storing instructions; and at least one processor for executing the instructions to cause the device to implement the first aspect and any possible implementation of the method provided in the first aspect. The beneficial effects achievable by the second aspect can be referred to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.

[0018] Thirdly, this application provides a computer storage medium storing instructions that, when executed by a device, cause a computer to implement the methods provided in the first aspect and any possible implementation of the first aspect. The beneficial effects achievable in this third aspect can be referenced to the beneficial effects of the methods provided in any embodiment of the first aspect, and will not be repeated here.

[0019] Fourthly, this application provides a computer program product that stores instructions that, when executed on a device, cause the device to implement the methods provided in the first aspect and any possible implementation of the first aspect. The beneficial effects achievable in the fourth aspect can be found in the beneficial effects of the methods provided in any embodiment of the first aspect, and will not be repeated here. Attached Figure Description

[0020] Figure 1 A schematic diagram of a programmer writing a program to a chip is shown.

[0021] Figure 2 According to some embodiments of this application, a flowchart of an implementation method for program control is shown;

[0022] Figure 3A According to some embodiments of this application, a schematic diagram of a program writing device is shown;

[0023] Figure 3B According to some embodiments of this application, a schematic diagram of the timing of an electrical signal is shown;

[0024] Figure 4 According to some embodiments of this application, a flowchart of an implementation of a program writing device writing program data to a chip is shown;

[0025] Figure 5 According to some embodiments of this application, a program writing system is shown;

[0026] Figure 6 According to some embodiments of this application, a flowchart of an implementation of a program writing device writing a program to a CPS chip is shown;

[0027] Figure 7 According to some embodiments of this application, a schematic diagram of a program writing device is shown. Detailed Implementation

[0028] The illustrative embodiments of this application include, but are not limited to, a program writing control method, a storage medium, a program product, and a program writing device.

[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0030] As shown in the background art, during the process of writing programs to a chip, there is a lack of management and detection of electrical parameters during the program writing process. Therefore, it is not easy to detect abnormalities in the chip during the program writing process, which affects the yield of the chip and the efficiency of program writing to the chip.

[0031] The following describes the process of writing a program using a program writer.

[0032] For example, Figure 1 A schematic diagram of a programmer writing programs to a chip is shown.

[0033] Reference Figure 1 In some embodiments, when programming the chip 10, the program writer 20 can be connected to the chip 10 via the data interface 30. The program writer 20 mainly consists of a power supply system, an encoder, and a decoder. The encoder compiles the software instruction code into electrical pulses and sends them to the chip 10, enabling data reading and writing to the memory within the chip 10. The decoder decodes the interactive signals fed back from the chip and reads the signals via software.

[0034] It is understandable that the current program writer 20 only provides the encoder and decoder necessary for program writing, which can only meet the basic program writing needs. However, it lacks the monitoring and management functions for program writing electrical parameters (such as the device's power-on current, writing current, and writing voltage), and cannot actively detect potential problems in the program writing process, thus failing to ensure the reliability of program writing.

[0035] In some embodiments of this application, a program can be written to the chip using a program writing device. The program writing device may include a program writer and a monitor. The program writer writes program data to the chip by sending electrical signals of different levels.

[0036] To address the aforementioned issues, this application provides a program writing control method. A program writer outputs a first-level signal to the chip, which is used to write first data to the chip. A monitor detects the first-level value corresponding to the first-level signal. The monitor compares the first-level value with a standard level range corresponding to the first data. If the first-level value exceeds the standard level range, the monitor controls the program writer to stop writing data to the chip.

[0037] Using the above method, the monitor can detect the first level value of the first level signal output by the programmer to the chip. The monitor can then determine whether the first level value is within the standard level range corresponding to the first data to ensure the accuracy of the level signal currently output by the programmer to the chip, thereby guaranteeing the accuracy of the program writing device writing the program to the chip.

[0038] The following describes the write program control method in the embodiments of this application.

[0039] For example, Figure 2 According to some embodiments of this application, a flowchart of an implementation method for program control is shown.

[0040] like Figure 2 As shown, the process includes:

[0041] S201, the programmer outputs a first level signal to the chip, which is used to write the first data to the chip.

[0042] In some embodiments of this application, when writing a program to the chip, the chip's pins can be electrically connected to the corresponding interface on the programmer. Then, after the monitor determines that there is no abnormality in the current during chip connection, the programmer can input the electrical signal corresponding to the program data to be written to the chip.

[0043] For example, Figure 3A According to some embodiments of this application, a schematic diagram of a program writing device is shown.

[0044] Reference Figure 3A In some embodiments of this application, the program writing device includes a program writer, a monitor, a status indicator, a chip interface, and a power supply device.

[0045] The power supply unit is electrically connected to the programmer, monitor, status indicator, and chip interface, and provides power to the programmer, monitor, status indicator, and chip interface.

[0046] The programmer can be electrically connected to a monitor, allowing the monitor to acquire the electrical signals output by the programmer to the chip. The monitor is also electrically connected to a status indicator light, enabling it to issue an alarm (e.g., flashing red) when an anomaly is detected (e.g., abnormal electrical signal or current), or to provide a notification (e.g., emitting green light) after the programming process is complete. Furthermore, the monitor is electrically connected to the chip interface; that is, a monitor connects the programmer to the chip interface, allowing the monitor to acquire and analyze the electrical signals sent by the programmer to the chip interface to determine if any anomalies exist.

[0047] In some embodiments of this application, program data is stored in binary form, i.e., a sequence of 0s and 1s. The program writer can convert the binary data into electrical signals and output them to the chip through a chip interface; for example, a high level represents 1, and a low level represents 0. In some embodiments of this application, the first level signal input by the program writer to the chip can be the level signal corresponding to the first data in the program data. That is, the electrical signal output by the program writer to the chip includes the first level signal, thus allowing the program writer to output the first data in the program data to the chip.

[0048] In the embodiments of this application, the chip interface can integrate interfaces for connecting chips of different specifications to a programmer. For example, taking a chassis position sensor (CPS) as an example, CPS can be divided into three main categories based on the pin interface type: analog signal interface, pulse width modulation (PWM) signal interface, and PSI5 electronic signal interface. Taking the analog signal and PWM signal interfaces as examples, the analog signal and PWM signal interface includes three pins: an output pin (OUT), a ground pin (GND), and a power supply pin (VDD). The power supply pin and ground pin are used for power supply, and the output pin is used for signal output. The PSI5 electronic signal interface includes two pins: a ground pin (GND) and a power supply pin (VDD), which serve as both power supply pins and signal input / output pins. In the embodiments of this application, the chip interface can include a three-pin interface: an output pin interface, a ground pin interface, and a power supply pin interface. The ground pin interface and the power supply pin interface can be connected to the ground pin and power supply pin of the CPS. When connecting different types of CPS, the ground pin interface and the power supply pin interface can be multiplexed. In other words, when connecting a CPS of analog signal and pulse width modulation signal types, a three-pin interface can be used; when connecting a CPS of PSI5 electronic signal type, a ground pin interface and a power supply pin interface can be used. It is understood that the chip interface can also integrate or use more or fewer interfaces depending on the type of chip; the embodiments of this application do not limit the chip interface.

[0049] In some embodiments of this application, before the programmer outputs an electrical signal to the chip, the chip is in a reset state, its internal circuitry is not fully activated, and its load characteristics are similar to pure resistance, with a small and stable current. Therefore, in some embodiments of this application, before the programmer outputs an electrical signal to the chip, the monitor can also acquire the current data (hereinafter referred to as the first current data) when the chip is connected to the programmer. At this time, the monitor can determine whether the first current data is abnormal to determine whether the connection between the chip and the programmer is normal or whether the chip is normal. It is understood that when the chip is electrically connected to the programmer but before the program is written, the first current data provided by the programmer to the chip is small. The monitor can determine whether the chip is correctly connected and whether the chip is abnormal based on whether the first current is within a certain range. For example, if the first current data exceeds the first current range, the monitor can determine that the first current data is abnormal.

[0050] For example, if the first current data is less than the first current range, it may indicate an open circuit inside the chip or a misconnection between the chip and the programmer. The monitor can control the status indicator to flash red to alert the operator of the abnormal connection between the chip and the programmer. The operator can then reconnect the chip to the programmer, and the monitor will re-check whether the first current data exceeds the first current range to reconfirm whether the first current data is abnormal.

[0051] Alternatively, if the first current data exceeds the first current range, it indicates a short circuit inside the chip or a misconnection between the chip and the programmer. The monitor can then control the status indicator light to flash red to alert the operator of the abnormal connection between the chip and the programmer. The operator can then reconnect the chip to the programmer, and the monitor will re-check whether the first current data exceeds the first current range to reconfirm whether the first current data is abnormal.

[0052] In other words, in the embodiments of this application, after the monitor detects an abnormality in the first current data, it will not immediately stop programming the chip. Instead, it will record the number of abnormalities in the first current data. If the number of abnormalities in the first current data is greater than or equal to the second preset number, the controller will control the programmer to stop writing program data to the chip, report an error, and save the log of program writing failure.

[0053] In some embodiments of this application, the first current range can be 10 microamps to 40 microamps, and the second preset number of times can be 2 to 5 times, for example, 2 times, 3 times, 4 times, or 5 times. It is understood that the first current range and the second preset number of times can be set according to the chip model or the model of the programmer. The embodiments of this application do not limit the first current range and the second preset number of times.

[0054] S202, the monitor detects the first level value corresponding to the first level signal.

[0055] In some embodiments of this application, the monitor can detect the first level signal output by the programmer to the chip. After acquiring the first level signal, the monitor can determine the first level value corresponding to the first level signal. It can be understood that since the programmer converts the binary data corresponding to the program data into an electrical signal and outputs it to the chip through the chip interface, the first level value can be either high or low.

[0056] S203, the monitor compares the first level value with the standard level range corresponding to the first data. If the first level value exceeds the standard level range, the controller stops writing data to the chip.

[0057] In some embodiments of this application, during the process of the programmer writing a program to the chip, an electrical signal abnormality may occur, causing the voltage level corresponding to the first data to be written to differ from the voltage level actually written to the chip by the programmer. Therefore, after the monitor determines the first voltage level, it can compare the first voltage level with the standard voltage level range corresponding to the first data. If the first voltage level exceeds the standard voltage level range, it indicates that the programmer is malfunctioning in writing the program to the chip, and the controller can control the programmer to stop writing program data to the chip.

[0058] In some embodiments of this application, the programmer outputs electrical signals to the chip based on the arrangement order of multiple program data. The multiple program data includes first data, and the electrical signals include a first level signal. For example, the multiple program data could be 10110110. Taking the program data "0" at the 8th position as the first data, when the programmer writes the first data "0", the input level to the chip should be low. In the embodiments of this application, the standard level range corresponding to a high level can be 4.7V to 5.3V, and the standard level range corresponding to a low level is 0V to 0.3V. That is, the first level value must be between 0V and 0.3V to confirm that the first level signal output by the programmer to the chip is correct.

[0059] In embodiments of this application, the monitor can store multiple program data, for example, storing "10110110". The monitor can then determine a first timing sequence of the first level signal within the electrical signal. Based on this first timing sequence, the monitor can then determine the first data corresponding to the first level data from the stored multiple program data.

[0060] For example, refer to Figure 3B , Figure 3B According to some embodiments of this application, a schematic diagram of the timing of an electrical signal is shown.

[0061] exist Figure 3B In this circuit, the clock period of each electrical signal level is T. If the first level signal detected by the monitor has a first timing sequence of 7T to 8T, then the monitor can determine the first timing sequence as 8 (where timing sequence 1 corresponds to the period from 0 to T, timing sequence 2 corresponds to the period from T to 2T, timing sequence 3 corresponds to the period from 2T to 3T, and so on). Then, the controller determines the data "0" at the 8th position from the stored program data "10110110" as the first data.

[0062] The monitor can then determine the standard level range corresponding to the first data and compare the first level value with the standard level range corresponding to the first data. For example, continuing to refer to... Figure 3A After determining that the first data is "0", the monitor can determine that "0" corresponds to a low level, and the standard level range for a low level is 0V to 0.3V. The monitor can compare the first level value of 0V with the standard level range. It can be understood that if the first level value is within the standard level range, then the first level signal output by the programmer to the chip can be determined to be correct. It can also be understood that in some embodiments, when the monitor determines that the first data is 1, the corresponding standard level range is 4.7V to 5.3V.

[0063] In some embodiments, the monitor can also acquire electrical signals over a period of time, and determine whether there are any levels exceeding the standard level range during that period based on the level values ​​of the electrical signals and the corresponding program data, thereby determining whether the electrical signals output by the program writer to the chip are abnormal.

[0064] In other embodiments, when the programmer sends first-level data to the chip, the monitor obtains the first data from the programmer. Then, the monitor determines the standard level range corresponding to the first data and compares the first level value with the standard level range corresponding to the first data. That is, the monitor does not need to pre-store multiple program data sets; when the programmer outputs a first-level signal to the chip, it can send the first data to the monitor. Based on the first data, the monitor can determine the standard level range corresponding to the first level value of the currently detected first-level signal and determine whether the first level value exceeds the standard level range. In this way, the monitor can determine in real time whether the programmer is outputting an error when outputting electrical signals to the chip, so that the monitor can control the programmer in a timely manner.

[0065] It is understood that, for different chips and different programmers, the standard level ranges for high and low levels may differ from those in the above embodiments, and the above embodiments do not limit the standard level range.

[0066] In some embodiments of this application, if the first voltage level exceeds the standard voltage level range, the monitor determines that an error has occurred during the program writing process from the program writer to the chip. In this case, the monitor can control the status indicator light to issue an alarm. If the number of errors during the program writing process is less than or equal to a first preset number, the monitor can control the program writer to rewrite the program to the chip. If the monitor detects that the number of errors during the program writing process is greater than the first preset number, the monitor can stop writing the program to the chip and output a log indicating a writing failure.

[0067] In some embodiments of this application, while the programmer is outputting electrical signals to the chip, the monitor can also acquire second current data from the programmer. Furthermore, the monitor can detect whether the second current data exceeds a second current range. In these embodiments, when the programmer outputs data to the chip, the second current data is only used to provide energy and not to transmit data; therefore, there is only one second current range, and the monitor only needs to determine whether the second current data exceeds the second current range. When the second current data exceeds the second current range, the monitor determines that the current of the programmer writing multiple program data to the chip is abnormal. The monitor can control the status indicator light to issue an alarm, and if the number of abnormal second current data occurrences is less than or equal to a third preset number, the monitor controls the programmer to output electrical signals to the chip again. If the number of abnormal second current data occurrences is greater than the third preset number, the monitor can control the programmer to stop writing programs to the chip and save a log of the writing failure.

[0068] Understandably, through the above solution, the monitor can detect whether the first current data is abnormal when the programmer connects to the chip, and whether the output electrical signal and the second current data are abnormal when the programmer outputs an electrical signal to the chip. This can more comprehensively and accurately ensure the accuracy of the program data written by the programmer to the chip, thus guaranteeing the chip's yield. Furthermore, it can also prevent damage to the programming device or chip due to abnormal voltage or current.

[0069] The following describes the process of writing program data to the chip using a program writing device.

[0070] For example, Figure 4 According to some embodiments of this application, a flowchart illustrating the implementation of a program writing device writing program data to a chip is shown.

[0071] In the embodiments of this application, the execution subject of each of the following processes can be a program writing device. Furthermore, taking CPS as an example, the process of the program writing device writing a program to CPS is described.

[0072] Reference Figure 4The process includes:

[0073] S401, program writing device initialization.

[0074] In some embodiments of this application, the program writing device needs to be initialized before connecting to the CPS to clear residual data from the previous program writing and ensure the accuracy of the current program writing.

[0075] S402, the program writer connects to the CPS.

[0076] S403, the monitor acquires the first current data when the program writer is powered on.

[0077] In some embodiments of this application, after the program writer is connected to the CPS, the monitor can obtain the first current data when the program writer is powered on. The process of the monitor obtaining the first current data can refer to the process in S201 above.

[0078] S404, the monitor determines whether the first current data exceeds the first current range.

[0079] In the embodiments of this application, after the monitor acquires the first current data, it can determine whether the first current data exceeds the first current range. The determination process can refer to the process in S201 described above.

[0080] If the judgment result is yes, then S406 is executed, the program writing device disconnects from the CPS, and an alarm is issued.

[0081] If the judgment result is negative, then S405 is executed, and the program writer outputs an electrical signal to the CPS.

[0082] S405, the programmer outputs an electrical signal to the CPS.

[0083] In some embodiments of this application, after the monitor determines that the first current data is not abnormal, the program writer outputs an electrical signal to the CPS. The process of the program writer outputting an electrical signal to the CPS can refer to the process of S201 above.

[0084] S406, the program writing device disconnects from the CPS and issues an alarm.

[0085] In the embodiments of this application, after the monitor determines that the first current data is abnormal, the program writing device can disconnect from the CPS and issue an alarm. At this time, the monitor can record that the number of abnormalities in the first current data increases by one, and the process of the program writing device issuing an alarm can refer to the process in S201.

[0086] S407, the monitor determines whether the number of abnormal current data points exceeds the second preset number.

[0087] In embodiments of this application, the monitor may also determine whether the number of abnormal occurrences of the first current data exceeds a second preset number.

[0088] If the judgment result is yes, then execute S418, the program write failed, and the failure log is saved.

[0089] If the judgment result is negative, then S402 is executed, and the program writer connects to the CPS.

[0090] S408, the monitor acquires the electrical signals from the program writer.

[0091] In some embodiments of this application, when the program writer outputs an electrical signal to the CPS, the monitor can acquire the electrical signal output by the program writer to the CPS. The process by which the monitor acquires the electrical signal output by the program writer to the CPS can refer to the process of S201 described above.

[0092] S409, the monitor determines whether the electrical signal is abnormal.

[0093] In some embodiments of this application, after the monitor obtains the electrical signal, it can determine whether the electrical signal is abnormal. The process by which the monitor determines whether the electrical signal is abnormal can refer to the process in S203 above.

[0094] If the judgment result is yes, then S410 is executed, and the program is written to the device to issue an alarm prompt.

[0095] If the judgment result is negative, then S412 is executed, and the monitor obtains the second current data of the program writer.

[0096] S410, the program writing device issues an alarm.

[0097] In some embodiments of this application, after the monitor determines that the electrical signal is abnormal, the program writing device can issue an alarm prompt. The alarm prompting process can refer to the process of S203 above. In addition, the monitor can also record that the number of abnormal electrical signals increases by one.

[0098] S411, the monitor determines whether the number of abnormal electrical signals exceeds the first preset number.

[0099] In some embodiments of this application, the monitor can also determine whether the number of abnormal electrical signals exceeds a first preset number. The process by which the monitor determines whether the number of abnormal electrical signals exceeds the first preset number can refer to the process in S203 above.

[0100] If the judgment result is yes, then execute S418, the program write failed, and the failure log is saved.

[0101] If the judgment result is negative, then S401 is executed, and the program is written to the device initialization.

[0102] S412, the monitor obtains the second current data of the program writer.

[0103] In some embodiments of this application, during the process of the programmer outputting an electrical signal to the CPS, the monitor can also acquire the second current data of the programmer. The process of the monitor acquiring the second current data can refer to the process of S203 described above.

[0104] S413, the monitor determines whether the second current data exceeds the second current range.

[0105] In some embodiments of this application, after the monitor obtains the second current data, it can also determine whether the second current data exceeds the second current range.

[0106] If the judgment result is yes, then S415 is executed, and the program is written to the device to issue an alarm prompt.

[0107] If the result is negative, then S414 is executed, and the monitor determines whether the program writing has finished.

[0108] S414, the monitor determines whether the program writing has finished.

[0109] In some embodiments of this application, if the second current data is normal, the monitor can determine whether the current program writing has ended.

[0110] If the judgment result is yes, then S417 is executed, and the program writing device completes the program writing.

[0111] If the judgment result is negative, then S405 is executed, and the program writer outputs an electrical signal to the CPS.

[0112] S415, the program writing device issues an alarm.

[0113] For example, in some embodiments of this application, if the monitor detects an abnormality in the second current data, the program writing device can issue an alarm prompt. The alarm prompting process can refer to the process of S203 described above, and the monitor can record the number of abnormalities in the second current data by one.

[0114] S416, the monitor determines whether the number of abnormal current data exceeds the third preset number.

[0115] In the embodiments of this application, after the monitor determines that the second current data is abnormal, it can determine whether the number of abnormal times of the second current data exceeds a third preset number.

[0116] If the judgment result is yes, then execute S418, the program write failed, and the failure log is saved.

[0117] If the judgment result is negative, then S405 is executed, and the program writer outputs an electrical signal to the CPS.

[0118] S417, the program writing device completes program writing.

[0119] S418, program write failed, save the failure log.

[0120] It is understandable that through the above process, the program writing device can write program data to the CPS more accurately, and can stop writing program data to the CPS when the first current data or the second current data is abnormal, so as to avoid damage to the program writing device or the CPS due to abnormal current.

[0121] The software system of the program writing device in the embodiments of this application is described below.

[0122] For example, Figure 5 According to some embodiments of this application, a program writing system is shown.

[0123] Reference Figure 5 The program writing system includes a program setting module, a monitoring, checking and writing module, and a template and saving module.

[0124] In the embodiments of this application, taking the writing of data to a CPS as an example, the program setting module can set the magnetic field angle and linearity, electrical functions, and production information for the CPS. The setting process can refer to the CPS datasheet. The magnetic field angle and linearity settings vary depending on the sample, and each CPS has a unique setting. The electrical function settings and production information settings are defined by the vehicle model corresponding to the CPS and can be uniformly set using templates.

[0125] The monitoring, checking, and writing module can perform program register checks, electrical parameter monitoring and checks, and program writing.

[0126] The program register check unit can update the register information corresponding to the program settings in real time. Before writing the program, it checks the register contents to prevent discrepancies between the set values ​​and the register contents due to misoperation or magnetic field interference. This avoids erroneous program write values ​​affecting CPS linearity settings and ultimately causing CPS malfunction. Electrical parameter monitoring and checking can be referenced as described above. Figure 2 as well as Figure 4 The process is shown below.

[0127] The template and save module can save program setting templates. During the initial program writing process, operators need to set the electrical functions and production information of the CPS and save the settings. When the program writing is performed again, the template can be called to quickly execute the settings. This saves resetting time and avoids errors. In this way, different sensor program writing data templates can be set for different signal types, and the data can be saved after the program writing is completed.

[0128] The following describes the process of the program writing device writing a program to the CPS in the embodiments of this application.

[0129] For example, Figure 6 According to some embodiments of this application, a flowchart illustrating the implementation of a program writing device writing a program to a CPS is shown.

[0130] It is understandable that the execution entity for each of the following processes is the program writing device.

[0131] like Figure 6 As shown, the process includes:

[0132] S601, connected to CPS, program writing device enabled.

[0133] In some embodiments of this application, the program writing device is connected to the CPS and enters an enabled state.

[0134] S602, reads the magnetic field angle of CPS.

[0135] In some embodiments of this application, after the program writes the device connection number CPS, it can read the magnetic field angle of the CPS to determine the initial magnetic field angle of the CPS, and then set the magnetic field angle of the CPS to set the working state of the CPS.

[0136] S603, determine whether the magnetic field angle of CPS has been read.

[0137] In some embodiments of this application, the program writing device can determine whether the magnetic field angle of the CPS has been read.

[0138] If the judgment result is yes, then execute S604 to calculate the sensor linearity setting.

[0139] If the judgment result is negative, then S601 is executed, the CPS is connected, and the program writing device is enabled.

[0140] It is understood that if the program writing device fails to complete the magnetic field angle of the CPS, the CPS may not be properly connected to the program writing device. Therefore, S601 can be re-executed to reconnect the CPS. It is understood that in some embodiments, if the magnetic field angle of the CPS cannot be read after multiple reconnections, the CPS may be damaged, and the program writing to the CPS can be terminated.

[0141] S604, calculates the linear setting of the sensor.

[0142] In some embodiments of this application, after determining the magnetic field angle of the CPS, the program writing device can calculate the linear setting of the CPS sensor. The linear setting of the sensor can be determined by the above... Figure 5 The program setting module in the embodiment is executed. The linear setting is used to determine the linearity of the CPS sensor's output data.

[0143] S605, determine whether a template exists for the sensor linear setting.

[0144] In some embodiments of this application, the program writing device can determine whether a template exists in the sensor linear setting.

[0145] If the judgment result is yes, then execute S606 and call the template.

[0146] If the judgment result is negative, then execute S607 to configure the sensor's functions.

[0147] S606, call template.

[0148] In some embodiments of this application, if the program writing device stores the linear setting template of the current CPS sensor, the program writing device can directly call the template, then generate the sensor's program data, and then execute S611 to update the register information.

[0149] S607 is used to configure the sensor's functions.

[0150] In some embodiments of this application, if the program writing device does not store the template of the current CPS sensor, the operator needs to set the function of the sensor through the program writing device to generate the program data of the CPS sensor.

[0151] S608 is used to set the sensor's production information.

[0152] In some embodiments of this application, it is also necessary to write data such as the production information of the CPS sensor into the CPS sensor. Therefore, it is also necessary for staff to set the sensor's production information based on the program writing device.

[0153] S609, determine whether to save the template.

[0154] In some embodiments of this application, after setting the current CPS sensor's functions and production information, the staff can also determine whether to save the template.

[0155] If the judgment result is yes, for example, if the staff triggers the instruction to save the template, then execute S610 to save the template.

[0156] If the result is negative, for example, if no worker is detected to trigger the instruction to save the template, then execute S611 to update the register information.

[0157] S610, save template.

[0158] S611, update register information.

[0159] In the embodiments of this application, after the program writing device has determined the CPS settings, it can store the CPS program data in the register to update the register message.

[0160] S612 determines whether the sensor linear design is consistent with the register information.

[0161] In some embodiments of this application, to ensure the accuracy of the program writing device writing program data to the CPS, the program writing device can also determine whether the linear design of the sensor is consistent with the register information.

[0162] If the judgment result is yes, then execute S613 to start writing the program.

[0163] If the judgment result is negative, then execute S602 to read the magnetic field angle of CPS.

[0164] Understandably, if the judgment result is negative, it indicates that the linear design of the sensor is inconsistent with the stored register information. In this case, it is necessary to re-acquire the magnetic field angle of the CPS and re-set the linearity of the CPS to redetermine the register information in the program writing device. This is to ensure the accuracy of the program data stored in the register information.

[0165] S613, begin writing the program.

[0166] In some embodiments of this application, if the program writing device determines that the linear design of the sensor is consistent with the register information, it can begin writing program data to the CPS.

[0167] S614, determine if the electrical parameters are abnormal.

[0168] In the embodiments of this application, the program writing device can also determine whether the electrical parameters are abnormal, and the determination process can refer to the above. Figure 2 Or the above Figure 4The process in the middle.

[0169] If the result is negative, then execute S615 to determine whether the program was successfully written.

[0170] If the judgment result is yes, then execute S617, the program write failed, and the failure log is saved.

[0171] S615 determines whether the program has been successfully written.

[0172] In some embodiments of this application, the program writing device can also determine whether the program data has been successfully written. For example, after successfully writing the program data, the CPS can send a message to the program writing device that the program has been successfully written.

[0173] If the judgment result is yes, then execute S616 to save the burning data and complete the program writing.

[0174] If the judgment result is negative, then execute S617, the program write failed, and the failure log is saved.

[0175] S616, saves the programming data, and completes the program writing.

[0176] Understandably, if the program writing device determines that the program has been successfully written to the CPS, the program writing device can save the burning data and complete the program writing.

[0177] S617, program write failed, save the failure log.

[0178] It is understood that in some embodiments of this application, if the program writing device detects an abnormal electrical parameter or determines that the program data has not been successfully written to the CPS, the current program writing can be considered a failure. The program writing device can save a failure log.

[0179] Through the above scheme, the program writing device can linearly set the CPS sensor by calling a template, thereby improving the efficiency and ensuring the accuracy of linear setting. Furthermore, the program writing device can also detect electrical parameter data (such as electrical signals, a first current signal, and a second current signal) during program writing to the CPS, thus ensuring the accuracy of the program writing.

[0180] The program writing device in the embodiments of this application is described below.

[0181] For example, Figure 7 According to some embodiments of this application, a schematic diagram of a program writing device is shown.

[0182] like Figure 7As shown, the program writing device 1000 includes one or more processors 101, system memory 102, non-volatile memory (NVM) 103, communication interface 104, input / output device 105, and system control logic unit 106 for coupling the processor 101, system memory 102, non-volatile memory 103, communication interface 104, and input / output (I / O) device 105. Wherein:

[0183] Processor 101 may include one or more processing units, such as a central processing unit (CPU), graphics processing unit (GPU), digital signal processor (DSP), micro-programmed control unit (MCU), artificial intelligence (AI) processor, or field programmable gate array (FPGA), etc. The processing module or processing circuit may include one or more single-core or multi-core processors.

[0184] System memory 102 is volatile memory, such as random-access memory (RAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc. System memory is used for temporary storage of data and / or instructions; for example, in some embodiments, system memory 102 may be used to store the aforementioned program data, etc.

[0185] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), compact disc (CD), digital versatile disc (DVD), solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card. In other embodiments, the non-volatile memory 103 may be used to store instructions executed by the program writing device in the program writing control method provided in the foregoing embodiments.

[0186] Specifically, system memory 102 and non-volatile memory 103 may each include a temporary copy and a permanent copy of instruction 107. Instruction 107 may include, when executed by at least one of processors 101, causing program writing device 1000 to implement the steps performed by the program writing device in the program writing control method provided in the embodiments of this application.

[0187] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the program writing device 1000, thereby enabling communication with any other suitable device via one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the program writing device 1000, for example, the communication interface 104 may be integrated into the processor 101. In some embodiments, the program writing device 1000 may communicate with other devices through the communication interface 104.

[0188] The input / output (I / O) device 105 may include input devices and output devices, and users can interact with the program writing device 1000 through the input / output (I / O) device 105.

[0189] The system control logic unit 106 may include any suitable interface controller to provide any suitable interface to other modules of the program writing device 1000. For example, in some embodiments, the system control logic unit 106 may include one or more memory controllers to provide an interface to the system memory 102 and the non-volatile memory 103.

[0190] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic unit 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated on the same chip with the logic of one or more controllers for the system control logic unit 106 to form a system-on-chip (SoC).

[0191] Understandable. Figure 7 The illustrated program writing device 1000 is merely an example. In other embodiments, the program writing device 1000 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0192] This application also provides a program product that, when executed on a device, enables the device to implement the steps of the server or terminal device in the communication methods provided in the foregoing embodiments.

[0193] This application also provides a storage medium storing one or more programs. When these programs are executed by a device, they enable the device to perform the steps of the server or terminal device in the communication methods provided in the foregoing embodiments.

[0194] Various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or combinations of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0195] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application-specific integrated circuit, or a microprocessor.

[0196] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0197] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried on or stored thereon by one or more transient or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media can include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, CD-ROMs, compact disc-read-only memory (CD-ROMs), magneto-optical disks, read-only memory (ROM), random-access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.

[0198] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.

[0199] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.

[0200] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0201] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.

Claims

1. A method for controlling write programs, characterized in that, Applied to a program writing device, the program writing device including a program writer and a monitor, the method includes: The program writer outputs a first level signal to the chip, and the first level signal is used to write first data to the chip; The monitor detects the first level value corresponding to the first level signal; The monitor compares the first level value with the standard level range corresponding to the first data. If the first level value exceeds the standard level range, it controls the program writer to stop writing data to the chip.

2. The method according to claim 1, characterized in that, The program writer outputs an electrical signal to the chip based on the arrangement order of multiple program data, wherein the multiple program data includes first data and the electrical signal includes a first level signal; The monitor stores the multiple program data; The monitor compares the first level value with the standard level range corresponding to the first data, including: The monitor determines the first timing sequence of the first level signal in the electrical signal; The monitor determines the first data corresponding to the first level data from the plurality of program data based on the first timing sequence. The monitor determines the standard level range corresponding to the first data and compares the first level value with the standard level range corresponding to the first data.

3. The method according to claim 1, characterized in that, The monitor compares the first level value with the standard level range corresponding to the first data, including: When the programmer sends the first level data to the chip, the monitor obtains the first data from the programmer; The monitor determines the standard level range corresponding to the first data and compares the first level value with the standard level range corresponding to the first data.

4. The method according to claim 1, characterized in that, The step of controlling the programmer to stop writing data to the chip if the first level value exceeds the standard level range includes: If the first level value exceeds the standard level range, the monitor determines that an anomaly has occurred in the program writer's writing of the program to the chip; If the number of times the program writer encounters an error while writing a program to the chip exceeds a first preset number, the program writer will be controlled to stop writing a program to the chip.

5. The method according to claim 4, characterized in that, If the number of times the program writer encounters an error while writing the program to the chip is less than or equal to a first preset number, the program writer is controlled to rewrite the program to the chip.

6. The method according to claim 2, characterized in that, Before the programmer outputs an electrical signal to the chip, the monitor acquires the first current data of the programmer. The method of controlling the program writer to stop writing data to the chip further includes: If the first current data exceeds the first current range, the monitor determines that the first current data is abnormal; If the number of times the first current data is abnormal exceeds the second preset number, the program writer is controlled to stop writing data to the chip.

7. The method according to claim 2, characterized in that, During the process of the programmer outputting an electrical signal to the chip, the monitor acquires the second current data of the programmer. The program writer stops writing programs to the chip, and also includes: If the second current data exceeds the second current range, the monitor determines that the second current data is abnormal; If the number of times the second current data is abnormal exceeds a third preset number, the program writer will stop writing the program to the chip.

8. A program writing device, characterized in that, Includes the monitor and the program writer in the method of any one of claims 1 to 7; And, memory, used to store instructions; At least one processor is configured to execute the instructions such that the program writing device implements the method of any one of claims 1 to 7.

9. A computer storage medium, characterized in that, The storage medium stores instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.

10. A computer program product, characterized in that, When the computer program product is run on the device, it causes the device to perform the method of any one of claims 1 to 7.