OTP data processing method and device

By obtaining the exclusive OR operation of target value, preset value and OTP value in OTP data processing, the chip cost and data accuracy problems caused by multiple writes of OTP data are solved, and efficient OTP data reading is achieved.

CN120540668APending Publication Date: 2025-08-26TOLL MICROELECTRONIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510672669.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

In chip design or software development, multiple writes of OTP data lead to repeated judgments to increase code space and chip cost, and when the written value is the same as the initial value, it will be restored to the default value when reading data, affecting data accuracy.

Method used

By obtaining the target value of the OTP space to be written, determining its corresponding preset value and OTP value, performing XOR operation to obtain the modified value, and writing it to the image storage area of ​​the OTP space, directly performing the preset value, modification value and OTP value operations to determine the target value when reading data, avoiding repeated judgments and increasing code space.

Benefits of technology

It improves the accuracy of OTP data reading, avoids the increase in chip cost caused by repeated judgments during multiple writes, and prevents the problem of returning the target value to the default value during reading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120540668A_ABST
    Figure CN120540668A_ABST
Patent Text Reader

Abstract

The invention discloses an OTP (One Time Programmable) data processing method and device, relates to the field of data processing, and aims to improve data accuracy and avoid the problem of chip cost increase caused by repeated judgment when data in an OTP space is read. According to the specific scheme, the method comprises the steps of obtaining a first target value to be written into an OTP space; determining a preset value corresponding to the first target value, and determining a first OTP value of the target storage area according to the first target value; determining a modification value according to the first target value, the preset value and the first OTP value; modifying a second OTP value of an image storage area corresponding to the first OTP value into a modified value, wherein the target storage area and the image storage area are complete image areas; and when the data is read, determining a first target value according to the preset value, the modification value and the first OTP value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a one-time programmable (OTP) data processing method and device. Background Art

[0002] OTP data storage and reading are applicable in both chip design and software development. Compared with other methods of reading and writing data, this method is more efficient and saves resources.

[0003] In chip design or software development, it's often necessary to store user configuration parameters in an OTP (on-the-air programming page), but an OTP address can only be modified once. When implementing multiple writes, the traditional writing method is to directly write the target value to the corresponding mapped OTP space. When the device is powered back on and the contents of the OTP space need to be loaded into RAM or registers, it's necessary to first determine whether the OTP mapping area corresponding to the RAM or register is the initial value of the OTP. If it is not the initial value of the OTP mapping area, the value of the OTP mapping area is loaded into the RAM or register. If the configuration parameters last written by the user are the same as the initial value of the OTP mapping area, the default parameters are loaded into the RAM or register. The default parameters are often different from the initial values, which can cause data accuracy to deviate significantly from user expectations. Furthermore, with a large number of registers, repeated judgments increase code space, which affects chip area and increases chip cost. Summary of the Invention

[0004] The present invention provides an OTP data processing method and device, which can improve data accuracy when reading data in the OTP space and avoid the problem of increased chip cost caused by repeated judgment.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides an OTP data processing method, the method comprising: Get the first target value to be written into the OTP space; Determining a preset value corresponding to a first target value, and determining a first OTP value of a target storage area according to the first target value; Determining a modified value according to the first target value, the preset value, and the first OTP value; Modify the second OTP value of the image storage area corresponding to the first OTP value to the modified value, and the target storage area and the image storage area are complete image areas; When reading data, a first target value is determined according to the preset value, the modified value and the first OTP value.

[0006] In a possible implementation, determining the modified value according to the first target value, the preset value, and the first OTP value may specifically include: An XOR operation is performed on the first target value, the preset value, and the first OTP value to obtain a modified value.

[0007] In a possible implementation, determining the first target value according to the preset value, the modified value, and the first OTP value may specifically include: An XOR operation is performed on the preset value, the modified value, and the first OTP value to obtain a first target value.

[0008] In a possible implementation, determining the preset value corresponding to the first target value may specifically include: According to the register address of the first target value, a pre-stored mapping relationship is searched to determine the corresponding preset value.

[0009] In a possible implementation, the OTP space includes a first OTP storage area and a second OTP storage area. Determining the first OTP value of the target storage area according to the first target value may specifically include: Determine, according to the pre-stored mapping relationship, a first OTP address of the first OTP storage area corresponding to the register address, and determine a second OTP address of the second OTP storage area corresponding to the first OTP address; If the value of the first OTP address and the value of the second OTP address are both initial values, the value of the first OTP address or the value of the second OTP address is used as the first OTP value; If the value of the first OTP address is the initial value and the value of the second OTP address is not the initial value, the value of the second OTP address is used as the first OTP value; If the value of the first OTP address is not the initial value and the value of the second OTP address is the initial value, the value of the first OTP address is used as the first OTP value.

[0010] In a possible implementation, the OTP data processing method may further include: Get the second target value to be written into the OTP space; If the second target value is the same as the first target value, and the register address of the second target value is the same as the register address of the first target value, then writing data is stopped.

[0011] In a possible implementation, the OTP data processing method may further include: If the second target value is different from the first target value, and the register address of the second target value is the same as the register address of the first target value, the step of determining the preset value is restarted.

[0012] In a second aspect, the present invention provides an OTP data processing device, comprising: An acquiring unit is configured to acquire a first target value to be written into the OTP space; a determining unit configured to determine a preset value corresponding to the first target value, and determine a first OTP value of the target storage area according to the first target value; and determine a modified value according to the first target value, the preset value, and the first OTP value; a writing unit configured to modify a second OTP value of the image storage area corresponding to the first OTP value to a modified value, wherein the target storage area and the image storage area are complete image areas; The reading unit is configured to determine a first target value according to the preset value, the modified value and the first OTP value when executing data reading.

[0013] In a possible implementation, the determining unit is specifically configured to execute: An XOR operation is performed on the first target value, the preset value, and the first OTP value to obtain a modified value.

[0014] In a possible implementation, the reading unit is specifically configured to execute: An XOR operation is performed on the preset value, the modified value, and the first OTP value to obtain a first target value.

[0015] The OTP data processing method provided by the present invention determines a modified value based on the first target value, a preset value corresponding to the first target value, and the first OTP value of the target storage area when a first target value needs to be written into the OTP space, and writes the modified value into the image storage area in the OTP space. In this way, when reading data, the first target value can be obtained by calculating the preset value, the modified value, and the first OTP value, and loaded into the corresponding register or RAM. Compared with the technical solution in the prior art that directly writes the first target value into the OTP space and first determines whether the value of the OTP space is the initial value when reading data, the present invention does not require judgment when reading data from the OTP space, and directly calculates the preset value, the modified value, and the first OTP value. This not only avoids the problem of multiple judgments during multiple writes, which leads to an increase in code space and increased chip costs, but also avoids the problem of restoring the target value to the default value when reading data when the written value is the same as the initial value. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of an OTP data processing method provided by an embodiment of the present invention; Figure 2 A flowchart of another OTP data processing method provided by an embodiment of the present invention; Figure 3 This is a structural diagram of an OTP data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0018] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "multiple" means two or more. In addition, the use of "based on" or "according to" means openness and inclusiveness, because the process, steps, calculations or other actions "based on" or "according to" one or more of the conditions or values ​​may be based on additional conditions or values ​​beyond the stated in practice.

[0019] Figure 1 Flowchart of an OTP data processing method provided by an embodiment of the present invention. Figure 1 As shown, the OTP data processing method may include the following steps 101 to 106.

[0020] 101. Obtain a first target value to be written into the OTP space.

[0021] When a user needs to write data into the OTP space, the user can write a first target value into a preset location of the OTP data processing device, such as a preset register, so that the OTP data processing device can obtain the first target value to be written into the OTP space.

[0022] 102. Determine a preset value corresponding to the first target value.

[0023] After obtaining the first target value, the OTP data processing device may determine a preset value corresponding thereto.

[0024] 103. Determine a first OTP value of the target storage area according to the first target value.

[0025] The OTP space of the OTP data processing device may include two storage areas, namely a first OTP storage area and a second OTP storage area. The first OTP storage area and the second OTP storage area are complete image areas, that is, the addresses in the first OTP storage area correspond to the addresses in the second OTP storage area one to one.

[0026] After acquiring the first target value, the OTP data processing device may determine a target storage area from the two storage areas, and determine a first OTP value of the target storage area.

[0027] 104. Determine a modified value according to the first target value, the preset value, and the first OTP value.

[0028] 105. Modify the second OTP value of the image storage area corresponding to the first OTP value to a modified value.

[0029] The target storage area and the image storage area are complete image areas. One of the target storage area and the image storage area is a first OTP storage area, and the other is a second OTP storage area.

[0030] After determining the modified value, the OTP data processing device may first determine a second OTP value of the image storage area corresponding to the first OTP value of the target storage area, and modify the second OTP value to the modified value.

[0031] 106. When reading data, determine a first target value according to the preset value, the modified value, and the first OTP value.

[0032] When the OTP data processing device is powered on again and the user needs to load the data in the OTP space into the preset register, the OTP data processing device can operate on the preset value, modified value and first OTP value corresponding to the preset register to obtain a first target value, and load the first target value into the preset register.

[0033] The OTP data processing method provided by the present invention determines a modified value based on the first target value, a preset value corresponding to the first target value, and the first OTP value of the target storage area when a first target value needs to be written into the OTP space, and writes the modified value into the image storage area in the OTP space. In this way, when reading data, the first target value can be obtained by calculating the preset value, the modified value, and the first OTP value, and loaded into the corresponding register or RAM. Compared with the technical solution in the prior art that directly writes the first target value into the OTP space and first determines whether the value of the OTP space is the initial value when reading data, the present invention does not require judgment when reading data from the OTP space, and directly calculates the preset value, the modified value, and the first OTP value. This not only avoids the problem of multiple judgments during multiple writes, which leads to an increase in code space and increased chip costs, but also avoids the problem of restoring the target value to the default value when reading data when the written value is the same as the initial value.

[0034] Figure 2 Flowchart of another OTP data processing method provided by an embodiment of the present invention. Figure 2 As shown, the above step 104 may specifically include the following step 201.

[0035] 201. Perform an XOR operation on the first target value, the preset value, and the first OTP value to obtain a modified value.

[0036] Based on step 201 , the above step 106 may specifically include the following step 202 .

[0037] 202. Perform an XOR operation on the preset value, the modified value, and the first OTP value to obtain a first target value.

[0038] The embodiment of the present invention performs an XOR operation on the first target value, the preset value and the first OTP value, and writes the modified value obtained after the XOR operation into the OTP space. When reading data, the first target value desired by the user can be obtained by performing an XOR operation on the preset value, the modified value and the first OTP value. Compared with the technical solution in the prior art of directly writing the target value into the OTP space and performing a judgment before reading, the OTP reading and writing solution provided by the embodiment of the present invention can avoid the problem of restoring the target value to the default value when reading data through the XOR operation, and no judgment is required when reading data, which can solve the problems of increased code space and increased chip cost.

[0039] like Figure 2 As shown, the above step 102 may specifically include the following step 203.

[0040] 203. According to the register address of the first target value, search for a pre-stored mapping relationship and determine a corresponding preset value.

[0041] The pre-stored mapping relationship includes: a correspondence between a register address of a target value and a preset value. In the embodiment of the present invention, different register addresses correspond to different preset values.

[0042] Based on step 203, the above step 103 may specifically include the following steps 204-207.

[0043] 204. Determine a first OTP address of the first OTP storage area corresponding to the register address according to a pre-stored mapping relationship, and determine a second OTP address of the second OTP storage area corresponding to the first OTP address.

[0044] The pre-stored mapping relationship may further include: a correspondence between a register address of the target value and an address of the first OTP storage area.

[0045] The first OTP storage area and the second OTP storage area are complete image areas, and the OTP data processing device also stores a correspondence between the address of the first OTP storage area and the address of the second OTP storage area.

[0046] 205. If the value of the first OTP address and the value of the second OTP address are both initial values, use the value of the first OTP address or the value of the second OTP address as the first OTP value.

[0047] After acquiring the first OTP address and the second OTP address, the OTP data processing device may determine the first OTP value according to the value of the first OTP address and the value of the second OTP address.

[0048] If the value of the first OTP address and the value of the second OTP address are both initial values, indicating that the value of the first OTP address and the value of the second OTP address have not been modified, the OTP data processing device can use the value of the first OTP address (correspondingly, the first OTP storage area is the target storage area, and the second OTP storage area is the image storage area) or the value of the second OTP address (correspondingly, the second OTP storage area is the target storage area, and the first OTP storage area is the image storage area) as the first OTP value.

[0049] 206. If the value of the first OTP address is the initial value and the value of the second OTP address is not the initial value, the value of the second OTP address is used as the first OTP value.

[0050] If the value of the first OTP address is the initial value, and the value of the second OTP address is not the initial value, this indicates that the value of the first OTP address has not been modified, but the value of the second OTP address has been modified. Since the OTP value can only be modified once, the value of the first OTP address needs to be modified this time. The OTP data processing device can use the value of the second OTP address as the first OTP value. In this case, the second OTP storage area is the target storage area, the first OTP storage area is the image storage area, and the value of the first OTP address is the second OTP value.

[0051] 207. If the value of the first OTP address is not the initial value and the value of the second OTP address is the initial value, the value of the first OTP address is used as the first OTP value.

[0052] If the value of the first OTP address is not the initial value and the value of the second OTP address is the initial value, indicating that the value of the first OTP address has been modified but the value of the second OTP address has not been modified, the OTP data processing device may use the value of the first OTP address as the first OTP value. In this case, the first OTP storage area is the target storage area, the second OTP storage area is the image storage area, and the value of the second OTP address is the second OTP value.

[0053] In this way, by setting up two complete images of the first OTP storage area and the second OTP storage area in the OTP space, and setting a pre-stored mapping relationship, when the user needs to load the target value into the OTP space, the OTP data processing device can determine the corresponding preset value and the first OTP value according to the first target value, and prepare for the subsequent reading and writing operations of the OTP space data.

[0054] Optionally, in an embodiment of the present invention, the OTP data processing method provided by the embodiment of the present invention may also include: the OTP data processing device obtains a second target value to be written into the OTP space, and determines the relationship between the second target value and the first target value written last time, and then determines whether to load the second target value into the OTP space based on the judgment result.

[0055] Specifically, if the second target value is the same as the first target value, and the register address of the second target value is the same as the register address of the first target value, then data writing is stopped.

[0056] If the second target value is different from the first target value, and the register address of the second target value is the same as the register address of the first target value, the OTP data processing device can restart the above-mentioned steps of determining the preset value, that is, re-execute the above-mentioned steps 102-106, which will not be repeated here.

[0057] If the second target value is different from the first target value, and the register address of the second target value is different from the register address of the first target value, the OTP data processing device can re-execute the above steps 102 to 106, which will not be repeated here.

[0058] After obtaining the new target value, the OTP data processing device compares it with the target value written last time to determine whether to write it into the OTP space. This can avoid repeated writing of the same target value at the same address, thereby saving code space.

[0059] It is worth noting that in the embodiment of the present invention, the read and write operations of OTP data are explained by taking the OTP space including two OTP storage areas as an example, that is, the target value of the same register address can be written twice. It is understandable that the OTP space can include more than two OTP storage areas to support multiple writing of target values. According to the OTP data processing method provided in the embodiment of the present invention, the OTP space can include an even number of OTP storage areas, and every two are image areas. For example, the OTP space can include four OTP storage areas, namely, address area A, area B, area C, and area D. Among them, area A and area B are complete image areas, and area C and area D are complete image areas.

[0060] In a specific implementation, the order in which the OTP storage areas are written can be pre-set. For example, according to the solution provided in the embodiments of the present invention, writing to areas A and B is performed first. Furthermore, the order in which areas A and B are written can also be pre-set, such as modifying the initial value of area A first. After the initial values ​​of areas A and B are modified, the target values ​​of areas C and D can be written. For detailed descriptions, please refer to the writing and reading of target values ​​in the aforementioned embodiments.

[0061] As is well known, the initial values ​​of the storage areas in the OTP space are all 1s. Each bit can be left as "1" or written as "0", but cannot be written back from "0" to "1". The following describes the OTP data processing method according to an embodiment of the present invention with reference to specific examples.

[0062] For example, assume that the first target value to be written obtained by the OTP data storage device is b'0001 0011, the register address of the first target value is Ax01, and the OTP space includes two OTP storage areas, area A and area B, which are complete image areas. The pre-stored mapping relationship includes the correspondence between the address of the target value, the preset value, and the address of area A. Assuming that the pre-stored mapping relationship includes the correspondence between Ax01, b'0001 0010, and Bx01, then the preset value determined by the OTP data processing device based on the first target value is b'0001 0010.

[0063] Assume that the corresponding address of area B is Bx04, and the values ​​of Bx01 and Bx04 are both b'1111 1111, indicating that the values ​​of these two addresses are initial values ​​and have not been modified.

[0064] If the OTP data processing device is pre-configured to prioritize modifying the value in area A, the OTP data processing device may determine area B as the target storage area, and determine the value b'1111 1111 of Bx04 in area B as the first OTP value.

[0065] The OTP data processing device performs an XOR operation on the first target value b'0001 0011, the preset value b'0001 0010, and the first OTP value b'1111 1111, and obtains a modified value b'1111 1110.

[0066] That is, b'1111 1110 = b'0001 0011 ^ b'0001 0010 ^ b'1111 1111.

[0067] That is, 0xFE = 0x13 ^ 0x12 ^ 0xFF.

[0068] The OTP data processing device modifies the second OTP value b'1111 1110 of Bx01 in area A (image storage area) to b'1111 1110, that is, writes the last bit from 1 to 0.

[0069] When reading data, the OTP data processing device performs an XOR operation on the preset value b'0001 0010, the first OTP value b'1111 1111, and the modified value b'1111 1110 to obtain the first target value b'0001 0011.

[0070] That is, b'0001 0011 = b'0001 0010 ^ b'1111 1110 ^ b'1111 1111.

[0071] That is, 0x13 = 0x12 ^ 0xFE ^ 0xFF.

[0072] That is, the target value is changed from the original b'0001 0010 (obtained by XORing the preset value b'0001 0010, the value of area A b'11111111, and the value of area B b'1111 1111) to b'0001 0011.

[0073] Afterwards, assuming that the OTP data processing device obtains the second target value b'0010 0011 and the register address of the second target value is: Ax01, then when the OTP data processing device determines that the second target value is different from the first target value and the register address is the same, it re-determines the preset value corresponding to the second target value to be b'0001 0010.

[0074] Based on the register address of the second target value, the OTP data processing device determines that the value of address Bx01 in Area A is b'11111110, indicating that it has been modified. It also determines that the value of address Bx04 in Area B is b'1111 1111, indicating that it has not been modified. The OTP data processing device then determines Area A as the target storage area and the value of Bx01 in Area A, b'1111 1110, as the first OTP value.

[0075] The OTP data processing device performs an XOR operation on the second target value b'0010 0011, the preset value b'0001 0010, and the first OTP value b'1111 1110, and obtains a modified value b'1100 1111.

[0076] That is, b'1100 1111 = b'0010 0011 ^ b'0001 0010 ^ b'1111 1110.

[0077] That is, 0xCF = 0x23 ^ 0x12 ^ 0xFE.

[0078] The OTP data processing device modifies the second OTP value b'1111 1111 of Bx04 in area B (image storage area) to b'1100 1111, that is, writes the third and fourth bits to 0.

[0079] When reading data again, the OTP data processing device performs an XOR operation on the preset value b'0001 0010, the first OTP value b'11111110, and the modified value b'1100 1111 to obtain the second target value b'0010 0011.

[0080] That is, b'0010 0011 = b'0001 0010 ^ b'1111 1110 ^ b'1100 1111.

[0081] That is, 0x23 = 0x12 ^ 0xFE ^ 0xCF.

[0082] That is, the target value is changed from the previous b'0001 0011 to b'0010 0011.

[0083] The embodiment of the present invention also provides an OTP data processing device, which is applied to Figure 1 or Figure 2 OTP data processing method. Figure 3 A structural diagram of an OTP data processing device provided by an embodiment of the present invention, such as Figure 3 As shown, the OTP data processing device 30 may include: The acquiring unit 31 is configured to acquire a first target value to be written into the OTP space.

[0084] The determining unit 32 is configured to determine a preset value corresponding to the first target value, and determine a first OTP value of the target storage area according to the first target value; and determine a modified value according to the first target value, the preset value and the first OTP value.

[0085] The writing unit 33 is configured to modify the second OTP value of the image storage area corresponding to the first OTP value into a modified value, and the target storage area and the image storage area are complete image areas.

[0086] The reading unit 34 is configured to determine the first target value according to the preset value, the modified value and the first OTP value when executing data reading.

[0087] Optionally, the determining unit 32 is specifically configured to execute: An XOR operation is performed on the first target value, the preset value, and the first OTP value to obtain a modified value.

[0088] Optionally, the reading unit 34 is specifically configured to execute: An XOR operation is performed on the preset value, the modified value, and the first OTP value to obtain a first target value.

[0089] Optionally, the determining unit 32 is specifically configured to execute: According to the register address of the first target value, a pre-stored mapping relationship is searched to determine the corresponding preset value.

[0090] Optionally, the OTP space includes a first OTP storage area and a second OTP storage area, and the determining unit 32 is specifically configured to execute: Determine, according to the pre-stored mapping relationship, a first OTP address of the first OTP storage area corresponding to the register address, and determine a second OTP address of the second OTP storage area corresponding to the first OTP address; If the value of the first OTP address and the value of the second OTP address are both initial values, the value of the first OTP address or the value of the second OTP address is used as the first OTP value; If the value of the first OTP address is the initial value and the value of the second OTP address is not the initial value, the value of the second OTP address is used as the first OTP value; If the value of the first OTP address is not the initial value and the value of the second OTP address is the initial value, the value of the first OTP address is used as the first OTP value.

[0091] Optionally, the acquiring unit 31 is further configured to execute: acquiring a second target value to be written into the OTP space; The writing unit 33 is further configured to execute: if the second target value is the same as the first target value, and the register address of the second target value is the same as the register address of the first target value, stop writing data.

[0092] Optionally, the determining unit 32 is further configured to execute: if the second target value is different from the first target value, and the register address of the second target value is the same as the register address of the first target value, then restart the above step of determining the preset value.

[0093] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention shall be covered by the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. An OTP data processing method, characterized in that: include: Get the first target value to be written into the OTP space; determining a preset value corresponding to the first target value, and determining a first OTP value of the target storage area according to the first target value; determining a modified value according to the first target value, the preset value, and the first OTP value; Modify the second OTP value of the image storage area corresponding to the first OTP value to the modified value, and the target storage area and the image storage area are complete image areas; When reading data, the first target value is determined according to the preset value, the modified value and the first OTP value.

2. The OTP data processing method according to claim 1, wherein The determining the modified value according to the first target value, the preset value, and the first OTP value includes: An XOR operation is performed on the first target value, the preset value, and the first OTP value to obtain the modified value.

3. The OTP data processing method according to claim 1 or 2, characterized in that, The determining the first target value according to the preset value, the modified value, and the first OTP value includes: An XOR operation is performed on the preset value, the modified value, and the first OTP value to obtain the first target value.

4. The OTP data processing method according to claim 1 or 2, wherein: Determining a preset value corresponding to the first target value includes: According to the register address of the first target value, a pre-stored mapping relationship is searched to determine the corresponding preset value.

5. The OTP data processing method according to claim 4, wherein: The OTP space includes a first OTP storage area and a second OTP storage area, and determining the first OTP value of the target storage area according to the first target value includes: Determine, according to the pre-stored mapping relationship, a first OTP address of the first OTP storage area corresponding to the register address, and determine a second OTP address of the second OTP storage area corresponding to the first OTP address; If the value of the first OTP address and the value of the second OTP address are both initial values, the value of the first OTP address or the value of the second OTP address is used as the first OTP value; If the value of the first OTP address is the initial value and the value of the second OTP address is not the initial value, the value of the second OTP address is used as the first OTP value; If the value of the first OTP address is not the initial value and the value of the second OTP address is the initial value, the value of the first OTP address is used as the first OTP value.

6. The OTP data processing method according to claim 4, wherein: The method further comprises: Obtaining a second target value to be written into the OTP space; If the second target value is the same as the first target value, and the register address of the second target value is the same as the register address of the first target value, then writing data is stopped.

7. The OTP data processing method according to claim 6, wherein: The method further comprises: If the second target value is different from the first target value, and the register address of the second target value is the same as the register address of the first target value, the step of determining the preset value is restarted.

8. An OTP data processing device, characterized in that: include: An acquiring unit is configured to acquire a first target value to be written into the OTP space; a determining unit configured to determine a preset value corresponding to the first target value, and determine a first OTP value of the target storage area according to the first target value; determining a modified value according to the first target value, the preset value, and the first OTP value; a writing unit configured to modify a second OTP value of an image storage area corresponding to the first OTP value to the modified value, wherein the target storage area and the image storage area are complete image areas; The reading unit is configured to determine the first target value according to the preset value, the modified value and the first OTP value when executing data reading.

9. The OTP data processing device according to claim 8, characterized in that: The determining unit is specifically configured to execute: An XOR operation is performed on the first target value, the preset value, and the first OTP value to obtain the modified value.

10. The OTP data processing device according to claim 8 or 9, characterized in that: The reading unit is specifically configured to execute: An XOR operation is performed on the preset value, the modified value, and the first OTP value to obtain the first target value.