CN115708073A - Control method of memory chip, related device and storage medium - Google Patents

Control method of memory chip, related device and storage medium Download PDF

Info

Publication number
CN115708073A
CN115708073A CN202110961544.4A CN202110961544A CN115708073A CN 115708073 A CN115708073 A CN 115708073A CN 202110961544 A CN202110961544 A CN 202110961544A CN 115708073 A CN115708073 A CN 115708073A
Authority
CN
China
Prior art keywords
target
flash memory
memory type
storage area
command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110961544.4A
Other languages
Chinese (zh)
Inventor
黎锦城
韩晓晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Longsys Electronics Co Ltd
Original Assignee
Shenzhen Longsys Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Longsys Electronics Co Ltd filed Critical Shenzhen Longsys Electronics Co Ltd
Priority to CN202110961544.4A priority Critical patent/CN115708073A/en
Publication of CN115708073A publication Critical patent/CN115708073A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

The application discloses a control method of a memory chip, a related device and a storage medium, wherein the method comprises the following steps: determining a communication protocol applied by a target storage chip; determining a target character corresponding to a target memory chip in a received target command related to a communication protocol; and executing preset operation corresponding to the target character on the target memory chip. By this method, the operability of the target memory chip can be extended.

Description

Control method of memory chip, related device and storage medium
Technical Field
The present application relates to the field of semiconductor technologies, and in particular, to a method for controlling a memory chip, a related device, and a storage medium.
Background
For a memory chip, the memory chip may be operated in a related manner based on a related command of a communication protocol applied by the memory chip. For example, for a UFS3.1 (Universal Flash Storage 3.1) memory chip, operations such as reading and writing on the memory chip can be implemented based on the UFS3.1 protocol.
In addition, the memory chip also supports related operations except for the communication protocol applied by the memory chip, but the related operations do not belong to the specification content of the communication protocol, which results in that the related operations cannot be performed through the communication protocol applied by the memory chip.
Therefore, how to improve the communication protocol applied to the memory chip to perform more operations on the memory chip is of great significance.
Disclosure of Invention
The application provides a control method of a memory chip, a related device and a storage medium.
A first aspect of the present application provides a method for controlling a memory chip, where the method includes: determining a communication protocol applied by a target storage chip; determining a target character corresponding to a target memory chip in a received target command related to a communication protocol; and executing preset operation corresponding to the target character on the target memory chip.
Therefore, after a target command related to a communication protocol applied by a target memory chip is received, by determining a target character corresponding to the target memory chip in the target command and executing a preset operation corresponding to the target character on the target memory chip, the related operation can be performed on the basis of the communication protocol by combining the target character corresponding to the target memory chip, and the operability of the target memory chip is expanded.
A second aspect of the present application provides an electronic device comprising a processor and a memory coupled to each other, wherein the processor is configured to execute a computer program stored in the memory to perform the method for controlling the memory chip described in the first aspect.
A third aspect of the present application provides a computer-readable storage medium on which program instructions are stored, the program instructions, when executed by a processor, implementing the control method of the memory chip described in the first aspect above.
According to the scheme, after the target command related to the communication protocol applied by the target memory chip is received, the target character corresponding to the target memory chip in the target command is determined, and the preset operation corresponding to the target character is executed on the target memory chip, so that the related operation can be performed by combining the target character corresponding to the target memory chip on the basis of the communication protocol, and the operability of the target memory chip is expanded.
Drawings
FIG. 1 is a first flowchart illustrating a first embodiment of a method for controlling a memory chip according to the present invention;
FIG. 2 is a second flowchart of the first embodiment of the control method of the memory chip of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a second embodiment of a control method for a memory chip according to the present application;
FIG. 4 is a flow chart illustrating a third embodiment of a control method for a memory chip according to the present application;
FIG. 5 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 6 is a block diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.
In the present application, an electronic apparatus provided with a memory chip, such as an embedded system composed of hardware and software, a personal computer, a mobile phone, or the like, executes a control method of the memory chip.
Referring to fig. 1, fig. 1 is a first flowchart illustrating a control method of a memory chip according to a first embodiment of the present application. Specifically, the method may include the steps of:
step S11: a communication protocol of a target memory chip application is determined.
The target memory chip is, for example, a memory chip manufactured based on a NAND flash memory (hereinafter, a NAND memory chip) or a Dynamic Random Access Memory (DRAM) chip.
The communication protocol applied by the target memory chip may be a communication protocol matched to the target memory chip. For example, for a NAND Memory chip, the communication protocol applied thereto may be UFS3.1 protocol, UFS2.1 protocol, emmc5.0 (Embedded Multi Media Card 5.0), emmc5.1, SD (Secure Digital Memory Card) Card protocol, and the like. For DRAM chips, communication protocols such as DDR3, DDR4, and the like are applied. The method for determining the communication protocol applied by the target memory chip may be a general method in the art, for example, the method is obtained from the related configuration information, and is not described herein again.
Step S12: and determining a target character corresponding to the target memory chip in the received target command related to the communication protocol.
The target command may be sent by another device to the execution main body of the control method of the memory chip of the application, for example, the target command may be sent by another computer to the execution main body through the Android Debug Bridge (adb). In other embodiments, the target command may be generated by the execution agent itself.
After receiving the target command related to the communication protocol, the related operation on the target memory chip may be implemented based on the communication protocol applied by the target memory chip in combination with the target command. For example, for a memory chip applying the UFS communication protocol, a Read buffer cmd or a Write buffer cmd may be used to implement Write and Read operations on a target memory chip.
In the present application, the target character corresponding to the target memory chip is a character outside the communication protocol applied by the target memory chip, for example, a character defined by a manufacturer of the target memory chip, or another defined character. The target character may define an associated operation on the target memory chip. Therefore, based on the target character, the operation of the target memory chip can also be realized. In this application, the target character is part of a target command, which will contain the target character. Because the target character is set as a part of the target command, the operation of the target memory chip by using the target character can be realized based on the interactive mode of the communication protocol applied by the target memory chip.
In one embodiment, the target character may be replaced with the original character in the target command, such that the target character becomes part of the target command. In another embodiment, the target character may be added to the target command so that the target character becomes part of the target command. For example, for the UFS communication protocol, a target character may be used to replace a character in a certain field of the target command, such as a MODE field; or a specific field is newly added, and the target character is taken as the character of the specific field.
Step S13: and executing preset operation corresponding to the target character on the target memory chip.
Because based on the target character, the operation of the target memory chip can also be realized. Therefore, after the target character corresponding to the target memory chip in the target command is determined, the preset operation corresponding to the target character can be executed according to the target character. For example, the target character may be a read remaining space, and the performing of the preset operation corresponding to the target character may be returning to a currently remaining storage space of the target memory chip. For another example, if the target character may be factory reset, the execution of the preset operation corresponding to the target character may be deletion of all user data.
Therefore, after a target command related to a communication protocol applied by a target memory chip is received, by determining a target character corresponding to the target memory chip in the target command and executing a preset operation corresponding to the target character on the target memory chip, the target character corresponding to the target memory chip can be combined based on an interactive mode of the communication protocol to perform related operation on the target memory chip, and the operability of the target memory chip is expanded.
In one embodiment, the target command further includes authentication information. Because the target command contains target characters except for a communication protocol and the target characters correspond to related operations on the target memory chip, in order to reduce the situation that the related operations are triggered by mistake, verification information can be added into the target command so as to perform handshake authentication by using the verification information. And under the condition that the verification information in the target command is preset verification information, confirming that the handshake authentication is successful, and executing preset operation corresponding to the target character on the target memory chip. If the verification information in the target command is not the preset verification information, confirming that the handshake authentication fails, and at this time, not executing the preset operation corresponding to the target character on the target memory chip. By judging whether the verification information is preset or not, handshake authentication can be performed by using the preset verification information, and related operations are executed only when the handshake authentication is successful, so that misoperation on a target memory chip can be reduced.
In one embodiment, the verification information may include master control information of the target memory chip, firmware information of the target memory chip, vendor information of the target memory chip, and target characters, which are sequentially arranged. In another embodiment, the verification information may also include other information, such as a preset verification code, etc. It is understood that the verification information can be set according to the requirement, and is not limited herein.
Referring to fig. 2, fig. 2 is a second flowchart illustrating a control method of a memory chip according to a first embodiment of the present application. Specifically, the "performing the preset operation corresponding to the target command based on the target command" mentioned in the above step may specifically include step S131 and step S132.
In the present embodiment, the target command includes a first target command and a second target command. The target character in the first target command is a flash memory type switching character, and the target character in the second target command is a data migration character.
In the present embodiment, the target memory chip is a NAND memory chip. The NAND flash memory can be divided into at least four types according to the storage principle, which are SLC (Single-Level Cell) flash memory, MLC (Multi-Level Cell) flash memory, TLC (Triple-Level Cell) flash memory, and QLC (Quad-Level Cell) flash memory. Based on the four storage principles, the flash memory type can be switched by changing the charge stored in the storage unit of the NAND flash memory, for example, the flash memory type of the QLC flash memory is switched to the SLC flash memory, the flash memory type of the TLC flash memory is switched to the SLC flash memory, or the flash memory type of the SLC flash memory is switched to the TLC flash memory after the flash memory type of the TLC flash memory is switched to the SLC flash memory.
Step S131: and switching the current flash memory type of the storage area of the target storage chip to a preset flash memory type based on the first target command.
The storage area of the target memory chip is an area for storing data in the target memory chip, for example, a flash memory in the target memory chip. The preset flash memory type may be SLC flash memory. In other embodiments, the predetermined flash memory type may be MLC flash. It is understood that the preset flash memory type can be set as required as long as the target memory chip can support the flash memory type.
Because the target character in the first target command is a flash memory type switching character, the current flash memory type of the storage area of the target memory chip can be switched to the preset flash memory type. In one embodiment, the current flash memory type of the storage region of the target memory chip is a TLC flash memory, the preset flash memory type is an SLC flash memory, and the TLC flash memory can be switched to the SLC flash memory by setting 1 memory cell in the flash memory of the target memory chip to store 1bit of data.
Step S132: and storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type based on the second target command.
After the current flash memory type of the storage area of the target storage chip is switched to the preset flash memory type, the target data stored in the storage area corresponding to the current flash memory type may be stored in the storage area corresponding to the preset flash memory type based on the second target command, specifically based on the data migration character in the second target command. The target data may be, for example, user-defined data or all user data, and the target data is not limited in the present application.
In one embodiment, after a partial memory region of a target memory chip is switched to SLC flash, target data stored in the TLC flash type flash may be transferred to the SLC flash type flash. Therefore, the target data stored in the TLC flash memory type flash memory is transferred to the SLC flash memory type flash memory, so that the target data is not easy to lose under the condition of high temperature by utilizing the high-temperature resistant characteristic of the SLC flash memory type, the function of protecting the data is achieved, and the possibility of generating false bad blocks in the target memory chip can be reduced.
Therefore, the target data is migrated to the storage area corresponding to the preset flash memory type by switching the current flash memory type of the storage area of the target storage chip to the preset flash memory type and storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type.
Referring to fig. 3, fig. 3 is a flowchart illustrating a control method of a memory chip according to a second embodiment of the present application. In this embodiment, the target commands further include a third target command, and the target characters in the third target command are the target capacity characters. Specifically, before the step of "switching the current flash memory type of the storage area of the target memory chip to the preset flash memory type based on the first target command" is executed, the following steps may be further executed:
step S21: and determining the target capacity needing to be released in the target storage chip based on the third target command, so that the storage area corresponding to the preset flash memory type can store the target data after the flash memory type of the storage area on the target storage chip is switched to the preset flash memory type.
It can be understood that, when the storage area on the target memory chip is switched to the preset flash memory type, the storage capacity of the target memory chip will also change accordingly. Therefore, the target capacity to be released in the target memory chip can be determined based on the third target command in combination with the size of the target data. The specific way of releasing the target capacity may be manual deletion by a user, or data deletion by an execution main body of the control method of the memory chip of the application. After the target capacity is released, the residual capacity of the target memory chip is increased, and at this time, the flash memory type of the memory area with the residual capacity is switched to the preset flash memory type, so that the memory area corresponding to the preset flash memory type can store the target data.
Specifically, it may be calculated whether the target data can be stored in the storage area corresponding to the remaining capacity of the target memory chip after the preset flash memory type is switched, and if the target data can be stored, the target capacity is 0. If the storage capacity of the flash memory area of the preset flash memory type is not enough to store the target data after the storage area corresponding to the residual capacity of the target storage chip is switched to the preset flash memory type, determining how much storage capacity of the preset flash memory type is needed, and then converting the storage capacity into the target capacity needing to be released. For example, if a storage area of SLC type with a size of 1G is also required, and the current flash memory type is TLC, it is possible to determine a released storage area of TLC type with a target capacity of 3G.
Step S22: and judging whether the capacity of the storage area corresponding to the residual capacity of the target storage chip can store the target data after the flash memory type is switched to the preset flash memory type.
After the target capacity is released, due to a calculation error or a size change of the target data, the flash memory type of the storage area corresponding to the remaining capacity of the target memory chip may not be able to store the target data after the flash memory type is switched to the preset flash memory type. Therefore, whether the current residual capacity is sufficient can be further determined by judging whether the capacity of the storage area corresponding to the residual capacity of the target storage chip after the flash memory type is switched to the preset flash memory type can store the target data.
If the capacity of the storage area corresponding to the remaining capacity of the target memory chip can store the target data after the flash memory type of the storage area corresponding to the remaining capacity of the target memory chip is switched to the preset flash memory type, step S23 is executed, and if the capacity of the storage area corresponding to the remaining capacity of the target memory chip after the flash memory type is switched to the preset flash memory type cannot store the target data, step S21 may be executed again to inform the user of the target capacity that needs to be released currently.
Step S23: and switching the current flash memory type of the storage area of the target storage chip to a preset flash memory type based on the first target command.
For a detailed description of this step, please refer to step S131 above.
Therefore, by determining the target capacity to be released, after the flash memory type of the storage area on the target memory chip is switched to the preset flash memory type, the storage area corresponding to the preset flash memory type can store the target data, and the target data can be migrated to the storage area corresponding to the preset flash memory type.
In one embodiment, the target command further includes a fourth target command, and a target character of the fourth target command is a factory reset character. In this embodiment, before the step of "switching the current flash memory type of the storage area of the target memory chip to the preset flash memory type based on the first target command" is executed, "based on the received fourth target command, a factory reset operation may be executed on the target memory chip. The factory restoration is to delete all the data of the user and only reserve the data of the target memory chip when the target memory chip is shipped. At this time, the data carried by the target memory chip when the target memory chip leaves the factory is the target data. After the factory setting restoration operation is performed on the target memory chip, the steps of "switching the current flash memory type of the memory area of the target memory chip to the preset flash memory type based on the first target command" and the subsequent steps thereof may be continuously performed. Therefore, by executing the factory reset operation on the target memory chip, the memory area corresponding to the preset flash memory type can store the target data after the flash memory type of the memory area on the target memory chip is switched to the preset flash memory type.
Referring to fig. 4, fig. 4 is a schematic flow chart illustrating a control method of a memory chip according to a third embodiment of the present application. In the present embodiment, after the above-mentioned step "storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type", the steps S31 and S32 may be further continued.
Step S31: a mapping relationship between a logical address of the target data and a first physical address of a storage area of a current flash memory type where the target data is stored is determined.
It is understood that the target data in the target memory chip is assigned with a logical address, and the target data stored in the storage area of the current flash memory type of the target memory chip is assigned with a physical address, which is the first physical address, and the logical address and the first physical address have a mapping relationship.
In the application, because the target data is migrated in the target memory chip, the mapping relationship between the logical address and the first physical address of the target data can be determined in advance, so that the mapping relationship can be modified subsequently.
Step S32: and replacing the first physical address in the mapping relation with a second physical address of a storage area corresponding to a preset flash memory type for storing target data so as to establish a new mapping relation.
Because the target data is migrated inside the target memory chip, so that the physical address of the target data is changed, the first physical address in the mapping relationship mentioned in step S31 may be replaced with the second physical address of the memory area corresponding to the preset flash memory type for storing the target data, so as to establish a new mapping relationship. By establishing a new mapping relation, the operation of updating the system is not needed when the target storage chip is read, so that the operation is simplified.
In one embodiment, the target commands further include a fifth target command and a sixth target command, the target characters in the fifth target command are data migration and pause characters, and the target characters in the sixth target command are data migration cancellation characters. Specifically, after the above-mentioned step "storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type based on the second target command", the following steps S41 and S42 may be further performed.
Step S41: and based on the fifth target command, suspending the execution of the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type.
It can be understood that, a user may need to suspend the process of data migration for his or her own reason or for another reason, so that the execution main body of the control method of the memory chip of the present application may suspend, based on the fifth target command, execution of storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type.
Step S42: and stopping executing the target data stored in the storage area corresponding to the current flash memory type to be stored in the storage area corresponding to the preset flash memory type based on the sixth target command.
It can be understood that the user may need to stop the data migration process for his or her own reason or for another reason, and therefore the execution main body of the control method of the memory chip of the present application may stop executing the target data stored in the storage area corresponding to the current flash memory type to be stored in the storage area corresponding to the preset flash memory type based on the sixth target command.
After that, the user can also be prompted whether the storage area which is switched to the preset flash memory type needs to be switched to the current flash memory type again.
Therefore, by using the fifth target command and the sixth target command, it is possible to suspend or stop the execution of the step of storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type.
In one embodiment, the target commands further include a seventh target command, the target characters in the seventh target command being status query characters. Specifically, the step of "performing the preset operation corresponding to the target command based on the target command" may specifically be "determining the current state of the target memory chip based on the seventh target command".
In one implementation scenario, if the target data stored in the storage area corresponding to the current flash memory type is currently stored in the storage area corresponding to the preset flash memory type, it may be correspondingly determined that the current state is in data migration.
In an implementation scenario, if the execution is currently suspended and the target data stored in the storage area corresponding to the current flash memory type is stored in the storage area corresponding to the preset flash memory type, it may be correspondingly determined that the current state is in the suspended data migration.
In an implementation scenario, if the execution of storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type has been stopped, it may be correspondingly determined that the current state is that the data migration has been cancelled.
Thus, by utilizing the seventh target command, the process of data migration may be queried.
Referring to fig. 5, fig. 5 is a schematic diagram of a frame of an embodiment of an electronic device according to the present application. The electronic device 50 comprises a memory 51 and a processor 52 coupled to each other, and the processor 52 is configured to execute program instructions stored in the memory 51 to implement the steps of any of the above-described embodiments of the control method of the memory chip. In one particular implementation scenario, electronic device 50 may include, but is not limited to: a microcomputer, a server, and the electronic device 50 may also include a mobile device such as a notebook computer, a tablet computer, and the like, which is not limited herein. In the present embodiment, the memory 51 may be a target memory chip or a memory other than the target memory chip.
Specifically, the processor 52 is configured to control itself and the memory 51 to implement the steps of any of the above-described control method embodiments of the memory chip. Processor 52 may also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip having signal processing capabilities. The Processor 52 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 52 may be commonly implemented by an integrated circuit chip.
Referring to fig. 6, fig. 6 is a block diagram illustrating an embodiment of a computer-readable storage medium according to the present application. The computer readable storage medium 60 stores program instructions 61 capable of being executed by the processor, the program instructions 61 being for implementing the steps of any of the above-described embodiments of the control method of the memory chip.
According to the scheme, after the target command related to the communication protocol applied by the target memory chip is received, the target character corresponding to the target memory chip in the target command is determined, and the preset operation corresponding to the target character is executed on the target memory chip, so that the target character corresponding to the target memory chip can be combined based on the interactive mode of the communication protocol, the related operation is carried out on the target memory chip, and the operability of the target memory chip is expanded.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
The foregoing description of the various embodiments is intended to highlight different aspects of the various embodiments that are the same or similar, which can be referenced with one another and therefore are not repeated herein for brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely one type of logical division, and an actual implementation may have another division, for example, a unit or a component may be combined or integrated with another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on network elements. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.

Claims (10)

1. A control method of a memory chip is characterized by comprising the following steps:
determining a communication protocol applied by a target storage chip;
determining a target character corresponding to the target memory chip in a received target command related to the communication protocol;
and executing preset operation corresponding to the target character on the target memory chip.
2. The method of claim 1, wherein the target command comprises a first target command and a second target command, wherein the target character in the first target command is a flash memory type switching character, and wherein the target character in the second target command is a data migration character;
based on the target command, executing a preset operation corresponding to the target command, including: switching the current flash memory type of the storage area of the target storage chip to a preset flash memory type based on the first target command;
and storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type based on the second target command.
3. The method of claim 2, wherein the target commands further include a third target command, the target character in the third target command being a target capacity character;
before the switching the current flash memory type of the storage area of the target memory chip to the preset flash memory type based on the first target command, the method further includes:
determining a target capacity required to be released in the target storage chip based on the third target command, so that the storage area corresponding to a preset flash memory type can store the target data after the flash memory type of the storage area on the target storage chip is switched to the preset flash memory type;
judging whether the capacity of a storage area corresponding to the residual capacity of the target storage chip after the flash memory type is switched to a preset flash memory type can store the target data or not;
and if so, executing the first target command, and switching the current flash memory type of the storage area of the target storage chip to a preset flash memory type.
4. The method of claim 2, wherein the target commands further include a fourth target command, and a target character of the fourth target command is a factory reset character;
before the switching the current flash memory type of the storage area of the target memory chip to a preset flash memory type based on the first target command, the method further includes: and executing factory setting restoration operation on the target memory chip based on the received fourth target command.
5. The method according to claim 3 or 4, wherein after storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type, the method further comprises:
determining a mapping relation between a logical address of the target data and a first physical address of a storage area of a current flash memory type for storing the target data;
and replacing the first physical address in the mapping relation with a second physical address of a storage area corresponding to a preset flash memory type for storing the target data so as to establish a new mapping relation.
6. The method according to claim 3 or 4, wherein the target commands further comprise a fifth target command and a sixth target command, the target character in the fifth target command is a data migration pause character, and the target character in the sixth target command is a data migration cancel character;
after the storing the target data stored in the storage area corresponding to the current flash memory type in the storage area corresponding to the preset flash memory type based on the second target command, the method further includes:
based on the fifth target command, suspending execution of target data stored in a storage area corresponding to the current flash memory type in a storage area corresponding to the preset flash memory type; alternatively, the first and second electrodes may be,
and stopping executing the target data stored in the storage area corresponding to the current flash memory type to be stored in the storage area corresponding to the preset flash memory type based on the sixth target command.
7. The method of claim 6, wherein the target commands further include a seventh target command, and wherein the target characters in the seventh target command are status query characters;
the executing, based on the target command, a preset operation corresponding to the target command includes: determining a current state of the target memory chip based on the seventh target command;
if the target data stored in the storage area corresponding to the current flash memory type is currently stored in the storage area corresponding to the preset flash memory type, determining that the current state is in data migration; if the execution is currently suspended, and the target data stored in the storage area corresponding to the current flash memory type is stored in the storage area corresponding to the preset flash memory type, determining that the current state is in suspended data migration; and if the execution of the target data stored in the storage area corresponding to the current flash memory type is stopped, storing the target data in the storage area corresponding to the preset flash memory type, and determining that the current state is that the data migration is cancelled.
8. The method of claim 1, wherein the target command further comprises authentication information; the method further comprises the following steps:
after receiving each target command, verifying whether verification information of the target command is preset verification information or not so as to perform handshake authentication by using the verification information;
and if the verification information is preset verification information, confirming that handshake authentication is successful, and executing preset operation corresponding to the target character on the target memory chip.
9. An electronic device comprising a processor and a memory coupled to each other, wherein,
the processor is configured to execute the memory-stored computer program to perform the method of any of claims 1 to 8.
10. A computer-readable storage medium, in which a computer program is stored which can be executed by a processor, the computer program being adapted to carry out the method of any one of claims 1 to 8.
CN202110961544.4A 2021-08-20 2021-08-20 Control method of memory chip, related device and storage medium Pending CN115708073A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110961544.4A CN115708073A (en) 2021-08-20 2021-08-20 Control method of memory chip, related device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110961544.4A CN115708073A (en) 2021-08-20 2021-08-20 Control method of memory chip, related device and storage medium

Publications (1)

Publication Number Publication Date
CN115708073A true CN115708073A (en) 2023-02-21

Family

ID=85212750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110961544.4A Pending CN115708073A (en) 2021-08-20 2021-08-20 Control method of memory chip, related device and storage medium

Country Status (1)

Country Link
CN (1) CN115708073A (en)

Similar Documents

Publication Publication Date Title
US11360696B2 (en) System startup method and apparatus, electronic device, and storage medium
US9280462B2 (en) Nonvolatile storage device and operating system (OS) image program method thereof
CN110032405B (en) System boot code memory management method, memory device and electronic system using same
TWI512459B (en) Cooperative memory management and method thereof
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
KR102198609B1 (en) Mobile divece and operating method thereof
TWI602115B (en) Data storage method of data storage device
TWI524183B (en) Data writing method, memory control circuit unit and memory storage apparatus
US8954705B2 (en) Memory space management method and memory controller and memory storage device and memory storage using the same
CN109710317B (en) System starting method and device, electronic equipment and storage medium
CN109086078B (en) Android system upgrading method and device, server and mobile terminal
JP6157637B2 (en) Virtual boundary code in the data image of the read / write memory device
KR20200031852A (en) Apparatus and method for retaining firmware in memory system
TW202008171A (en) Data writing method and storage controller
US11294779B2 (en) Memory device providing fast data recovery
KR20160074025A (en) Operating method for data storage device
CN105637521A (en) Data processing method and intelligent terminal
CN111324290A (en) Memory device
TW201833421A (en) A system of an electronic lock for updating a firmware of the electronic lock
JP2004220068A (en) Memory card and method for writing data in memory
US10042712B2 (en) Numerical controller
US7257030B2 (en) Operating a storage component
JP7355876B2 (en) Program startup method, equipment, and storage medium
CN115708073A (en) Control method of memory chip, related device and storage medium
US11314453B2 (en) Memory system managing map data based on risk of malware—infection of host, and operating method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination