CN-121996163-A - Data writing method and nonvolatile memory
Abstract
The application discloses a data writing method and a nonvolatile memory. The data writing method comprises the steps of receiving a writing instruction sent by a display driving chip, wherein the writing instruction carries data to be written and writing addresses, the writing addresses indicate target writing areas, the plurality of data storage areas comprise the target writing areas, the data to be written comprise DBI data corresponding to at least one compensation moment, the writing protection state corresponding to the target writing areas is obtained from writing protection information, the writing protection information is used for indicating the writing protection state of each data storage area, and the data to be written is written into the target writing areas when the writing protection state of the target writing areas is in an open state.
Inventors
- YANG WENQIANG
Assignees
- 维沃移动通信有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260120
Claims (15)
- 1. A data writing method applied to a nonvolatile memory including a plurality of data storage areas, the method comprising: Receiving a writing instruction sent by a display driving chip, wherein the writing instruction carries data to be written and a writing address, the writing address indicates a target writing area, the plurality of data storage areas comprise the target writing area, and the data to be written comprises DBI data corresponding to at least one compensation moment; Acquiring a write protection state corresponding to the target write-in area from write protection information, wherein the write protection information is used for indicating the write protection state of each data storage area; And writing the data to be written into the target writing area under the condition that the writing protection state of the target writing area is an open state.
- 2. The method of claim 1, wherein prior to receiving the write command sent by the display driver chip, the method further comprises: Receiving a first state updating instruction sent by the display driving chip, wherein the first state updating instruction is used for indicating that the write protection state of the target writing area is updated from a second mark to a first mark, the first mark is used for indicating the open state, and the second mark is used for indicating the protection state; and updating the write protection state of the target writing area according to the first state updating instruction.
- 3. The method of claim 2, wherein after the updating of the write protection state of the target write area according to the first state update instruction, the method further comprises: And sending first notification information to the display driving chip, wherein the first notification information is used for indicating that the write protection state of the target writing area is updated to the first mark.
- 4. The method according to claim 1, wherein, in a case where a write protection state of the target writing area is an open state, after writing the data to be written to the target writing area, the method further comprises: And sending second notification information to the display driving chip under the condition that the writing of the data to be written fails, wherein the second notification information is used for indicating that the writing of the data to be written fails in the target writing area, or, And under the condition that the data to be written is successfully written, sending third notification information to the display driving chip, wherein the third notification information is used for indicating that the data to be written is successfully written in the target writing area.
- 5. The method according to claim 1 or 4, wherein, in a case where a write protection state of the target writing area is an open state, after writing the data to be written to the target writing area, the method further comprises: Receiving a second state updating instruction sent by the display driving chip, wherein the second state updating instruction is used for indicating that the write protection state of the target writing area is updated from a first mark to a second mark, the first mark is used for indicating the open state, and the second mark is used for indicating the protection state; And updating the write protection state of the target writing area according to the second state updating instruction.
- 6. The method of claim 5, wherein after the updating the write-protected state of the target write area according to the second state update instruction, the method further comprises: and sending fourth known information to the display driving chip, wherein the fourth known information is used for indicating that the write protection state of the target writing area is updated to the second mark.
- 7. The method according to any of claims 1-6, wherein in case each of said data storage areas comprises a plurality of storage sectors, said at least one compensation instant comprises a current compensation instant and all historical compensation instants preceding said current compensation instant, and in case each of said data storage areas comprises one storage sector, said at least one compensation instant comprises said current compensation instant.
- 8. A data writing method, applied to a display driving chip, comprising: Transmitting a first state update instruction to a nonvolatile memory, wherein the first state update instruction is used for indicating that the write protection state of a target writing area is updated from a second mark to a first mark, the first mark is used for indicating an open state, and the second mark is used for indicating a protection state; Receiving first notification information sent by the nonvolatile memory based on the first state update instruction, wherein the first notification information is used for indicating that the write protection state of the target writing area is updated to the first mark; And sending a writing instruction to the nonvolatile memory, wherein the writing instruction carries data to be written and a writing address, the writing address indicates the target writing area, and the data to be written comprises DBI data corresponding to at least one compensation moment.
- 9. The method of claim 8, wherein after the sending of the write instruction to the non-volatile memory, the method further comprises: Receiving target notification information sent by the nonvolatile memory, wherein the target notification information is second notification information or third notification information, the second notification information is used for indicating that writing of the data to be written in the target writing area fails, and the third notification information is used for indicating that writing of the data to be written in the target writing area succeeds.
- 10. The method of claim 9, wherein after said receiving the target notification information sent by the non-volatile memory, the method further comprises: And sending a second state updating instruction to the nonvolatile memory, wherein the second state updating instruction is used for indicating that the write protection state of the target writing area is updated from the first mark to the second mark.
- 11. The method of claim 10, wherein after said sending a second status update instruction to said non-volatile memory, said method further comprises: and receiving fourth known information sent by the nonvolatile memory, wherein the fourth known information is used for indicating that the write protection state of the target writing area is updated to the second mark.
- 12. A nonvolatile memory, comprising: The storage module comprises a write protection information storage area and a plurality of data storage areas, wherein the write protection information storage area stores write protection information, the write protection information is used for indicating the write protection state of each data storage area, the plurality of data storage areas comprise at least one data backup area, and each data storage area comprises at least one storage sector; And the control module is used for carrying out write protection on each data storage area based on the write protection information.
- 13. The non-volatile memory of claim 12, wherein the control module comprises: The state updating unit is used for receiving a state updating instruction sent by the display driving chip and updating the write-protection state of a target writing area according to the state updating instruction, wherein the state updating instruction comprises a first updating instruction for indicating that the write-protection state of the target writing area is updated from a second mark to a first mark or a second updating instruction for indicating that the write-protection state of the target writing area is updated from the first mark to the second mark, the first updating instruction is generated by the display driving chip based on a data writing request, the second updating instruction is generated by the display driving chip for determining that data writing is finished, the first mark is used for indicating an open state, the second mark is used for indicating a protection state, and the plurality of data storage areas comprise the target writing area.
- 14. The non-volatile memory of claim 13, wherein the control module further comprises: A write protection state acquisition unit, configured to receive a write instruction sent by the display driver chip, and acquire a write protection state corresponding to the target write area from the write protection information, where the write instruction carries data to be written and a write address, the write address indicates the target write area, and the data to be written includes DBI data corresponding to at least one compensation time; and the execution unit is used for writing the data to be written into the target writing area under the condition that the writing protection state of the target writing area is an open state.
- 15. The non-volatile memory of claim 14, wherein each of the data storage areas comprises at least one memory block, each of the memory blocks comprises a plurality of memory sectors, the at least one compensation time comprises a current compensation time and all historical compensation times preceding the current compensation time, or each of the data storage areas comprises one memory sector, the at least one compensation time comprises the current compensation time.
Description
Data writing method and nonvolatile memory Technical Field The application belongs to the technical field of computers, and particularly relates to a data writing method and a nonvolatile memory. Background Currently, mobile display devices generally use an Organic Light-Emitting Diode (OLED) display technology, but are affected by the life of an Organic Light-Emitting material, and after a user uses the device for a certain period of time, a burn-in problem may occur. In the related art, in order to solve the burn-in problem, the service time of each pixel is generally accumulated by using a DDIC in the terminal through Deburn in (DBI) algorithm, the aging condition of the pixel on the screen is counted, the compensation data (DBI data) is calculated based on the counted aging condition, and the calculated compensation data is written into the Flash memory, however, in each writing process, each address in the Flash is in a writable state, if the compensation data is written into the wrong address, abnormal display will be caused. Disclosure of Invention The embodiment of the application aims to provide a data writing method and a nonvolatile memory, which can avoid addresses of DBI data writing errors. In a first aspect, an embodiment of the present application provides a data writing method, applied to a nonvolatile memory, where the nonvolatile memory includes a plurality of data storage areas, and the method includes receiving a writing instruction sent by a display driver chip, where the writing instruction carries data to be written and a writing address, where the writing address indicates a target writing area, the plurality of data storage areas include the target writing area, the data to be written includes DBI data corresponding to at least one compensation time, acquiring a write protection state corresponding to the target writing area from write protection information, where the write protection information is used to indicate a write protection state of each data storage area, and writing the data to be written into the target writing area when the write protection state of the target writing area is an open state. In a second aspect, an embodiment of the application provides a data writing method, which is applied to a display driving chip, and comprises the steps of sending a first state updating instruction to a nonvolatile memory, wherein the first state updating instruction is used for indicating that a write protection state of a target writing area is updated from a second mark to a first mark, the first mark is used for indicating an open state, the second mark is used for indicating a protection state, receiving first notification information sent by the nonvolatile memory based on the first state updating instruction, wherein the first notification information is used for indicating that the write protection state of the target writing area is updated to the first mark, and sending a writing instruction to the nonvolatile memory, wherein the writing instruction carries data to be written and a writing address, the writing address indicates the target writing area, and the data to be written comprises DBI data corresponding to at least one compensation moment. In a third aspect, an embodiment of the present application provides a nonvolatile memory, including a storage module, where the storage module includes a write protection information storage area and a plurality of data storage areas, where the write protection information storage area stores write protection information, where the write protection information is used to indicate a write protection state of each of the data storage areas, where the plurality of data storage areas includes at least one data backup area, and where each of the data storage areas includes at least one storage sector, and where the control module is used to write protect each of the data storage areas based on the write protection information. In a fourth aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, the program or instructions implementing the steps of the method as described in the first aspect or the steps of the method as described in the second aspect when executed by the processor. In a fifth aspect, embodiments of the present application provide a chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute programs or instructions, implement the steps of the method according to the first aspect, or implement the steps of the method according to the second aspect. In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to perform the steps of the method as described in the first aspect,