[go: up one dir, main page]

CN112799980A - A method and device for adjusting NAND FLASH frequency - Google Patents

A method and device for adjusting NAND FLASH frequency Download PDF

Info

Publication number
CN112799980A
CN112799980A CN202110136260.1A CN202110136260A CN112799980A CN 112799980 A CN112799980 A CN 112799980A CN 202110136260 A CN202110136260 A CN 202110136260A CN 112799980 A CN112799980 A CN 112799980A
Authority
CN
China
Prior art keywords
configuration information
read
nand flash
nand
write frequency
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
CN202110136260.1A
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.)
Beijing HJIMI Technology Co Ltd
Original Assignee
Beijing HJIMI Technology 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 Beijing HJIMI Technology Co Ltd filed Critical Beijing HJIMI Technology Co Ltd
Priority to CN202110136260.1A priority Critical patent/CN112799980A/en
Publication of CN112799980A publication Critical patent/CN112799980A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/32Timing circuits
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/38Response verification devices
    • G11C29/42Response verification devices using error correcting codes [ECC] or parity check
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/22Read-write [R-W] timing or clocking circuits; Read-write [R-W] control signal generators or management 
    • G11C7/222Clock generating, synchronizing or distributing circuits within memory device
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

本申请提供了一种调整NAND FLASH频率的方法及装置,当环境变化时,会引起NAND控制器的配置信息与最佳读写频率不匹配,进而导致的存储操作错误,该方法为了解决这一问题,动态调整NAND FLASH的读写频率,同时调整NAND控制器的配置信息,使配置信息与NAND FLASH的读写频率相匹配,降低环境或器件本身变化对读写频率的影响,保证NAND控制器控制的准确性,进而保证NAND FLASH存储操作的成功率。并且,将配置后的NAND控制器的配置信息写入到NAND FLASH,使启动时可以从NAND FLASH获取配置信息,保证NAND控制器配置的速度,节省启动时间,提高整体效率。

Figure 202110136260

The present application provides a method and device for adjusting the frequency of NAND FLASH. When the environment changes, the configuration information of the NAND controller may not match the optimal read/write frequency, which will result in storage operation errors. The method aims to solve this problem. To solve the problem, dynamically adjust the read and write frequency of NAND FLASH, and at the same time adjust the configuration information of the NAND controller, so that the configuration information matches the read and write frequency of NAND FLASH, reduce the impact of changes in the environment or the device itself on the read and write frequency, and ensure that the NAND controller The accuracy of control, thereby ensuring the success rate of NAND FLASH storage operations. In addition, the configuration information of the configured NAND controller is written to the NAND FLASH, so that the configuration information can be obtained from the NAND FLASH during startup, which ensures the speed of the NAND controller configuration, saves startup time, and improves the overall efficiency.

Figure 202110136260

Description

Method and device for adjusting NAND FLASH frequency
Technical Field
The present application relates to the field of memory technologies, and in particular, to a method for adjusting NAND FLASH frequency.
Background
The NAND flash memory (NAND FLASH) is a nonvolatile semiconductor memory that can be electrically erased and written online, has the advantages of fast erasing and writing speed, low power consumption, large capacity, low cost, and the like, and is widely used in electronic products such as MP3, MP4, mobile phones, digital cameras, video cameras, and the like.
In general, a fixed read/write frequency, for example, a higher read/write frequency, is set for NAND FLASH, but when the read/write frequency is lowered due to a change in environment or NAND FLASH itself, a read/write error will be caused.
Disclosure of Invention
To solve the foregoing technical problems, embodiments of the present application provide a method and an apparatus for adjusting NAND FLASH frequency, so as to achieve the purposes of ensuring NAND FLASH correctness of storage operation, ensuring configuration speed of a NAND controller, saving start-up time, and improving overall efficiency, and the technical solution is as follows:
a method of adjusting NAND FLASH frequency, comprising:
obtaining configuration information of the pre-placed NAND controller from NAND FLASH;
if the acquired configuration information of the NAND controller is correct, configuring the NAND controller according to the configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
if the NAND FLASH storage operation is successful, writing the configured configuration information of the configured NAND controller to the NAND FLASH;
executing a monitoring program, namely judging whether the NAND FLASH storage operation failure frequency is higher than a set frequency threshold value, and/or judging whether an adjustment process is not executed within a set time length, wherein the adjustment process is to adjust the NAND FLASH read-write frequency to obtain a target read-write frequency, and adjust the configuration information to the configuration information matched with the target read-write frequency until the target read-write frequency meets the set requirement, and the NAND FLASH storage operation is successful under the control of a NAND controller configured according to the adjusted configuration information;
if yes, executing the adjusting process;
if the NAND FLASH storage operation fails, the adjustment process is performed.
Optionally, the obtaining configuration information of the pre-placed NAND controller from NAND FLASH includes:
configuration information for the pre-placed NAND controller is obtained from within the particular partition of NAND FLASH.
Optionally, the method further includes:
and if the acquired configuration information of the NAND controller is wrong, executing the adjusting process.
Optionally, the adjusting the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjusting the configuration information to configuration information matched with the target read-write frequency until the target read-write frequency meets a setting requirement, and the storing operation of NAND FLASH is successful under the control of a NAND controller configured according to the adjusted configuration information, including:
selecting the read-write frequency positioned at the middle point within the available read-write frequency range as a target read-write frequency;
adjusting the configuration information to configuration information matched with the target read-write frequency to serve as target configuration information, configuring the NAND controller by using the target configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
when the storage operation is successful, judging whether the target read-write frequency is in a read-write frequency range with the interval length being the set interval length;
if not, adjusting the available read-write frequency range according to a first processing mode to obtain a first read-write frequency range, replacing the available read-write frequency range with the first read-write frequency range, and returning to the step of executing the step of selecting the read-write frequency positioned at the midpoint in the available read-write frequency range;
if yes, finishing the adjustment;
and when the storage operation is wrong, adjusting the available reading and writing frequency range according to a second processing mode to obtain a second reading and writing frequency range, replacing the available reading and writing frequency range with the second reading and writing frequency range, and returning to the step of executing the step of selecting the reading and writing frequency at the midpoint in the available reading and writing frequency range.
Optionally, the configuring the NAND controller according to the configuration information includes:
acquiring an ECC check code corresponding to the configuration information of the NAND controller from the NAND FLASH, and taking the ECC check code as a reference ECC check code;
generating an ECC check code of the acquired configuration information of the NAND controller as a target ECC check code;
comparing whether the reference ECC check code is consistent with the target ECC check code;
and if the configuration information is consistent with the configuration information, configuring the NAND controller according to the configuration information.
Optionally, the executing the monitoring program, determining whether the frequency of the storage operation failure of NAND FLASH is higher than a set frequency threshold, and/or determining whether an adjustment process has not been executed within a set time period, includes:
executing a monitoring program to obtain the RTC time of the step of judging whether the NAND FLASH storage operation failed last time and/or judging whether the adjustment process is not executed within the set time length, and the current RTC time;
judging whether the frequency of failure of the previous execution of the NAND FLASH storage operation is higher than a set frequency threshold, and/or judging whether the difference between the RTC time of the step of not executing the adjustment process within the set time length and the current RTC time exceeds a set time threshold;
if so, the step of determining NAND FLASH whether the frequency of storage operation failures is higher than a set frequency threshold and/or determining whether no adjustment process has been performed within a set time period is performed.
An apparatus for adjusting NAND FLASH frequency, comprising:
an acquisition module, configured to acquire configuration information of a pre-placed NAND controller from NAND FLASH;
the configuration module is used for configuring the NAND controller according to the configuration information if the acquired configuration information of the NAND controller is correct;
a control module for controlling NAND FLASH the memory operation by the configured NAND controller;
a determination module to write configuration information of the configured NAND controller to the NAND FLASH if the NAND FLASH store operation was successful;
a monitoring module, configured to execute a monitoring program, determine whether the NAND FLASH storage operation failure frequency is higher than a set frequency threshold, and/or determine whether an adjustment process is not executed within a set duration, where the adjustment process is to adjust the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjust the configuration information to configuration information matched with the target read-write frequency until the target read-write frequency meets a set requirement, and the NAND FLASH storage operation is successful under the control of a NAND controller configured according to the adjusted configuration information;
an adjusting module, configured to execute the adjusting process if the frequency of NAND FLASH storage operation failures is higher than a set frequency threshold, and/or the adjusting process is not executed within a set time duration, or execute the adjusting process if the NAND FLASH storage operation failures.
Optionally, the obtaining module is specifically configured to:
configuration information for the pre-placed NAND controller is obtained from within the particular partition of NAND FLASH.
Optionally, the adjusting module is further configured to:
and if the acquired configuration information of the NAND controller is wrong, executing the adjusting process.
Optionally, the adjusting module is specifically configured to:
selecting the read-write frequency positioned at the middle point within the available read-write frequency range as a target read-write frequency;
adjusting the configuration information to configuration information matched with the target read-write frequency to serve as target configuration information, configuring the NAND controller by using the target configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
when the storage operation is successful, judging whether the target read-write frequency is in a read-write frequency range with the interval length being the set interval length;
if not, adjusting the available read-write frequency range according to a first processing mode to obtain a first read-write frequency range, replacing the available read-write frequency range with the first read-write frequency range, and returning to the step of executing the step of selecting the read-write frequency positioned at the midpoint in the available read-write frequency range;
if yes, finishing the adjustment;
and when the storage operation is wrong, adjusting the available reading and writing frequency range according to a second processing mode to obtain a second reading and writing frequency range, replacing the available reading and writing frequency range with the second reading and writing frequency range, and returning to the step of executing the step of selecting the reading and writing frequency at the midpoint in the available reading and writing frequency range.
Optionally, the configuration module is specifically configured to:
acquiring an ECC check code corresponding to the configuration information of the NAND controller from the NAND FLASH, and taking the ECC check code as a reference ECC check code;
generating an ECC check code of the acquired configuration information of the NAND controller as a target ECC check code;
comparing whether the reference ECC check code is consistent with the target ECC check code;
and if the configuration information is consistent with the configuration information, configuring the NAND controller according to the configuration information.
Optionally, the monitoring module is specifically configured to:
executing a monitoring program to obtain the RTC time of the step of judging whether the NAND FLASH storage operation failed last time and/or judging whether the adjustment process is not executed within the set time length, and the current RTC time;
judging whether the frequency of failure of the previous execution of the NAND FLASH storage operation is higher than a set frequency threshold, and/or judging whether the difference between the RTC time of the step of not executing the adjustment process within the set time length and the current RTC time exceeds a set time threshold;
if so, the step of determining NAND FLASH whether the frequency of storage operation failures is higher than a set frequency threshold and/or determining whether no adjustment process has been performed within a set time period is performed.
Compared with the prior art, the beneficial effect of this application is:
in the application, when the environment changes, the configuration information of the NAND controller is not matched with the read-write frequency, and further the storage operation error is caused, in order to solve the problem, the target read-write frequency is obtained by adjusting the read-write frequency of NAND FLASH, the configuration information is adjusted to the configuration information matched with the target read-write frequency, the read-write frequency of NAND FLASH is adjusted, the configuration information of the NAND controller is adjusted at the same time, the configuration information is matched with the read-write frequency of NAND FLASH, the storage operation error caused by the fact that the configuration information of the NAND controller is not matched with the read-write frequency of NAND FLASH is avoided, the influence of the change of the environment or the device on the read-write frequency is reduced, the control accuracy of the NAND controller is ensured, and the success rate of the storage operation of NAND FLASH is further ensured.
And if the NAND FLASH storage operation is successful, the configured configuration information of the NAND controller is written into the NAND FLASH, so that the configuration speed of the NAND controller is ensured, the starting time is saved, and the overall efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of embodiment 1 of a method for adjusting NAND FLASH frequency provided by the present application;
fig. 2 is a flowchart of embodiment 2 of a method for adjusting NAND FLASH frequency provided by the present application;
fig. 3 is a flowchart of embodiment 3 of a method for adjusting NAND FLASH frequency provided by the present application;
fig. 4 is a schematic diagram of a logic structure of an apparatus for adjusting NAND FLASH frequency provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
As shown in fig. 1, a flowchart of embodiment 1 of a method for adjusting NAND FLASH frequency provided by the present application may include, but is not limited to, the following steps:
step S11, obtaining configuration information of the pre-placed NAND controller from within NAND FLASH.
In this embodiment, the configuration information of the NAND controller can be understood as: for configuring the NAND controller with information that controls NAND FLASH the ability to perform storage operations (e.g., read, write, or erase).
Specifically, the configuration information of the pre-placed NAND controller is obtained from within the particular partition of NAND FLASH.
In this embodiment, the specific partition may be, but is not limited to, a newly created partition. Of course, the specific partition may also be: there is a portion of the storage area in the existing partition.
The configuration information of the pre-placed NAND controller can be, but is not limited to: and before the null value or the current time, the configuration information of the NAND controller is matched with the read-write frequency after the read-write frequency of NAND FLASH is adjusted.
Step S12, it is determined whether the acquired configuration information of the NAND controller is correct.
The determination of whether the acquired configuration information of the NAND controller is correct may include, but is not limited to: and reading NAND FLASH the check bit, and judging whether the acquired configuration information of the NAND controller is correct according to the read check bit.
If so, go to step S13.
And step S13, configuring the NAND controller according to the configuration information, and performing storage operation by using the configured NAND controller control NAND FLASH.
And step S14, judging whether the NAND FLASH storage operation is successful.
If successful, go to step S15; if the failure is caused by a reason that the configuration information of the NAND controller is not matched with the read/write frequency due to the environmental change, step S17 is executed.
Step S15, writing configuration information of the configured NAND controller to the NAND FLASH.
If the NAND FLASH operation is successful, the configured NAND controller may be used as the to-be-used NAND controller without adjusting the read-write frequency NAND FLASH.
Step S16, executing a monitoring program to determine whether the frequency of the NAND FLASH storage operation failure is higher than a set frequency threshold, and/or determine whether an adjustment process has not been executed within a set time duration.
The adjusting process is to adjust the NAND FLASH read-write frequency to obtain a target read-write frequency, and adjust the configuration information to the configuration information matched with the target read-write frequency until the target read-write frequency meets the setting requirement, and the NAND FLASH is under the control of the NAND controller configured according to the adjusted configuration information, the storage operation is successful.
In this embodiment, the process of determining whether the frequency of the storage operation failure at NAND FLASH is higher than the set frequency threshold may be:
and counting the NAND FLASH storage operation failure times within the t time, and processing the NAND FLASH storage operation failure times within the t time to obtain the NAND FLASH storage operation failure frequency, wherein t is a number greater than 0.
The number of times NAND FLASH storage operation fails within t time is processed, which may be, but is not limited to: the number of times NAND FLASH storage operations failed within time t is taken as time t.
The process of determining NAND FLASH that the storage operation failed may be: acquiring an ECC check code corresponding to the configuration information of the NAND controller from the NAND FLASH, and generating the ECC check code of the acquired configuration information of the NAND controller as a target ECC check code; and comparing whether the reference ECC check code is consistent with the target ECC check code, and if not, determining that the storage operation fails.
Optionally, the start attribute of the monitor program may be set to be that the process of the monitor program is started within a set time after the process of the monitor program is closed. The set time may be set to zero seconds or may be set to N seconds. N is a number greater than 0.
After the starting attribute of the monitoring program is set to be the process closing of the monitoring program, the process of the monitoring program is started within the set time, so that the timeliness of the execution of the monitoring program can be ensured, and the reliability of monitoring is ensured.
In this embodiment, when the frequency of the storage operation failure of NAND FLASH is higher than the set frequency threshold, and/or when the adjustment process is not executed within the set time length, the adjustment process is executed again, which can ensure that the adjustment process is not started at ordinary times, and reduce the consumption of the cpu resource.
In this embodiment, the setting requirements may be set as needed, and are not limited in this application. For example, the set requirements may be, but are not limited to: and setting a read-write frequency range.
In this embodiment, when the target read/write frequency meets the setting requirement and the NAND FLASH is controlled by the NAND controller configured according to the adjusted configuration information, and the storage operation is successful, the adjustment of the read/write frequency of NAND FLASH may be stopped.
In this embodiment, the adjusting the NAND FLASH read-write frequency according to a dichotomy to obtain a target read-write frequency, and the adjusting the configuration information to the configuration information matched with the target read-write frequency may specifically include:
and S161, selecting the read-write frequency positioned at the middle point within the available read-write frequency range as the target read-write frequency.
And S162, adjusting the configuration information into configuration information matched with the target read-write frequency to serve as target configuration information, configuring the NAND controller by using the target configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller.
And S163, when the storage operation is successful, judging whether the target read-write frequency is in the read-write frequency range with the interval length being the set interval length.
If not, go to step S164; if yes, go to step S165.
The interval length can also be understood as: and (4) accuracy. The length of the set interval can be set as required, and is not limited in the application.
S164, according to the first processing manner, selecting one of the two endpoints of the available read/write frequency range as a first endpoint, using the target read/write frequency as a second endpoint, using the read/write frequency range with the first endpoint and the second endpoint as two endpoints as a target read/write frequency range, replacing the available read/write frequency range with the target read/write frequency range, and returning to the step S161.
In this embodiment, according to the first processing manner, one of the two end points of the available read/write frequency range may be, but is not limited to: and selecting the maximum read-write frequency from the two end points of the available read-write frequency range according to the processing mode of selecting the maximum value of the two.
Of course, according to the first processing mode, one of the two end points of the available read/write frequency range may be selected, but is not limited to: and selecting the minimum read-write frequency from the two end points of the available read-write frequency range according to the processing mode of selecting the minimum value of the two.
And S165, finishing the adjustment.
And S166, when the storage operation is wrong, selecting one of the two endpoints of the available read-write frequency range as a third endpoint according to a second processing mode, using the target read-write frequency as a second endpoint, using the read-write frequency range with the second endpoint and the third endpoint as the two endpoints as a target read-write frequency range, replacing the available read-write frequency range with the target read-write frequency range, and returning to the step S161.
In the case of a memory operation error, which may be too high in the target read/write frequency, the read/write frequency may be reduced. Specifically, according to the second processing manner, one of the two end points of the available read/write frequency range may be, but is not limited to: and selecting the minimum read-write frequency from the two end points of the available read-write frequency range according to the processing mode of selecting the minimum value of the two.
In this embodiment, according to the dichotomy, the target read-write frequency meeting the requirements can be determined quickly, and the overall adjustment efficiency is improved.
In this embodiment, the executing of the monitoring program determines whether the frequency of the storage failure at NAND FLASH is higher than a set frequency threshold, and/or determines whether the adjustment process has not been executed within a set time period, which may include but is not limited to:
executing a monitoring program to obtain RTC (Real Time Clock) Time and current RTC Time of the step of judging whether the NAND FLASH storage operation failed in the last execution of the step of judging whether the adjustment process is not executed within a set Time length or not;
judging whether the frequency of failure of the previous execution of the NAND FLASH storage operation is higher than a set frequency threshold, and/or judging whether the difference between the RTC time of the step of not executing the adjustment process within the set time length and the current RTC time exceeds a set time threshold;
if so, the step of determining NAND FLASH whether the frequency of storage operation failures is higher than a set frequency threshold and/or determining whether no adjustment process has been performed within a set time period is performed.
In this embodiment, by determining whether the difference between the RTC time last executed by the determining program and the current RTC time exceeds the set time threshold, the frequency of executing the determining program can be reduced, and the consumption of the cpu resource can be further reduced.
If yes, go to step S17.
And step S17, executing the adjusting process, wherein the adjusting process is to adjust the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjust the configuration information to the configuration information matched with the target read-write frequency until the target read-write frequency meets the set requirement, and the NAND FLASH is under the control of the NAND controller configured according to the adjusted configuration information, and the storage operation is successful.
It is understood that steps S11-S15 and the execution of the adjustment process are performed during BootLoader phase of the operating system, and step S16 and the execution of the adjustment process are performed during kemel phase of the operating system.
In the application, when the environment changes, the configuration information of the NAND controller is not matched with the optimal read-write frequency, and further the storage operation error is caused, in order to solve the problem, the target read-write frequency is obtained by dynamically adjusting the read-write frequency of NAND FLASH, the configuration information is adjusted to the configuration information matched with the target read-write frequency, the read-write frequency of NAND FLASH is adjusted, the configuration information of the NAND controller is adjusted at the same time, the configuration information is matched with the read-write frequency of NAND FLASH, the storage operation error caused by the fact that the configuration information of the NAND controller is not matched with the read-write frequency of NAND FLASH is avoided, the influence of the change of the environment or the device on the read-write frequency is reduced, the control accuracy of the NAND controller is ensured, and the success rate of the storage operation of NAND FLASH is further ensured.
And if the NAND FLASH storage operation is successful, the configured configuration information of the NAND controller is written into the NAND FLASH, so that the configuration information can be acquired from NAND FLASH during startup, and the NAND controller is configured, thereby ensuring the configuration speed of the NAND controller, saving the startup time and improving the overall efficiency.
As another alternative embodiment of the present application, referring to fig. 2, there is provided a flowchart of embodiment 2 of a method for adjusting NAND FLASH frequency, where this embodiment is mainly an extension of the method for adjusting NAND FLASH frequency described in embodiment 1 above, and as shown in fig. 2, this method may include, but is not limited to, the following steps:
step S21, obtaining the configuration information of the pre-placed NAND controller from NAND FLASH;
step S22, it is determined whether the acquired configuration information of the NAND controller is correct.
If yes, go to step S23; if not, go to step S27.
And step S23, configuring the NAND controller according to the configuration information, and performing storage operation by using the configured NAND controller control NAND FLASH.
And step S24, judging whether the NAND FLASH storage operation is successful.
If successful, go to step S25; if the failure is caused by a reason that the configuration information of the NAND controller is not matched with the read/write frequency due to the environmental change, step S27 is executed.
Step S25, writing configuration information of the configured NAND controller to the NAND FLASH.
Step S26, executing a monitoring program to determine whether the frequency of the NAND FLASH storage operation failure is higher than a set frequency threshold, and/or determine whether an adjustment process has not been executed within a set time duration.
If yes, go to step S27.
And step S27, executing the adjusting process, wherein the adjusting process is to adjust the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjust the configuration information to the configuration information matched with the target read-write frequency until the target read-write frequency meets the set requirement, and the NAND FLASH is under the control of the NAND controller configured according to the adjusted configuration information, and the storage operation is successful.
In this embodiment, when the acquired configuration information of the NAND controller is incorrect, an adjustment process is performed, so as to further ensure NAND FLASH the correctness of the storage operation.
As another alternative embodiment of the present application, referring to fig. 3, there is provided a flowchart of embodiment 3 of a method for adjusting NAND FLASH frequency, where this embodiment is mainly a refinement of the method for adjusting NAND FLASH frequency described in embodiment 1 above, and as shown in fig. 3, this method may include, but is not limited to, the following steps:
step S31, obtaining the configuration information of the pre-placed NAND controller from NAND FLASH;
step S32, it is determined whether the acquired configuration information of the NAND controller is correct.
If so, go to step S33.
The detailed procedures of steps S31-S32 can be found in the related descriptions of steps S11-S12 in embodiment 1, and are not repeated herein.
Step S33, obtaining an ECC check code corresponding to the configuration information of the NAND controller from the NAND FLASH as a reference ECC check code.
The ECC check code corresponding to the configuration information of the NAND controller in NAND FLASH may be understood as: NAND FLASH generated ECC check code for the stored configuration information of the NAND controller.
And step S34, generating an ECC check code of the acquired configuration information of the NAND controller as a target ECC check code.
And step S35, comparing whether the reference ECC check code is consistent with the target ECC check code.
If yes, go to step S36.
And step S36, configuring the NAND controller according to the configuration information, and performing storage operation by using the configured NAND controller control NAND FLASH.
Steps S33-S36 are a specific implementation of step S13 in example 1.
And step S37, judging whether the NAND FLASH storage operation is successful.
If successful, go to step S38; if the failure is caused by the reason that the configuration information of the NAND controller is not matched with the read-write frequency due to the environmental change, step S310 is executed.
Step S38, writing configuration information of the configured NAND controller to the NAND FLASH.
Step S39, executing a monitoring program to determine whether the frequency of the NAND FLASH storage operation failure is higher than a set frequency threshold, and/or determine whether an adjustment process has not been executed within a set time duration.
If yes, go to step S310.
Step S310, executing the adjustment process, where the adjustment process is to adjust the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjust the configuration information to the configuration information matched with the target read-write frequency until the target read-write frequency meets a set requirement, and the NAND FLASH succeeds in storage operation under the control of the NAND controller configured according to the adjusted configuration information.
The detailed procedures of steps S37-S310 can be found in the related descriptions of steps S14-S17 in embodiment 1, and are not described herein again.
In this embodiment, whether the reference ECC check code is consistent with the target ECC check code is compared, and if so, validity of the acquired configuration information of the NAND controller is guaranteed, so that reliability of configuration of the NAND controller is guaranteed.
Next, the device for adjusting NAND FLASH frequency provided by the present application will be described, and the device for adjusting NAND FLASH frequency described below and the method for adjusting NAND FLASH frequency described above are referred to correspondingly.
Referring to fig. 4, the apparatus for adjusting NAND FLASH frequency comprises: an acquisition module 100, a configuration module 200, a control module 300, a determination module 400, a monitoring module 500, and an adjustment module 600.
An obtaining module 100, configured to obtain configuration information of a pre-placed NAND controller from NAND FLASH;
a configuration module 200, configured to configure the NAND controller according to the configuration information if the acquired configuration information of the NAND controller is correct;
a control module 300 for performing a storage operation using the configured NAND controller control NAND FLASH;
a determining module 400, configured to write the configured configuration information of the configured NAND controller to the NAND FLASH if the NAND FLASH storing operation is successful;
a monitoring module 500, configured to execute a monitoring program, determine whether the NAND FLASH storage operation failure frequency is higher than a set frequency threshold, and/or determine whether an adjustment process is not executed within a set duration, where the adjustment process is to adjust the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjust the configuration information to configuration information matched with the target read-write frequency until the target read-write frequency meets a set requirement, and the NAND FLASH storage operation is successful under the control of a NAND controller configured according to the adjusted configuration information;
an adjusting module 600, configured to execute the adjusting process if the frequency of NAND FLASH storage operation failures is higher than a set frequency threshold, and/or the adjusting process is not executed within a set time period, or execute the adjusting process if the NAND FLASH storage operation failures.
In this embodiment, the obtaining module 100 may be specifically configured to:
configuration information for the pre-placed NAND controller is obtained from within the particular partition of NAND FLASH.
In this embodiment, the adjusting module 600 may be further configured to:
and if the acquired configuration information of the NAND controller is wrong, executing the adjusting process.
In this embodiment, the adjusting module 600 may be specifically configured to:
selecting the read-write frequency positioned at the middle point within the available read-write frequency range as a target read-write frequency;
adjusting the configuration information to configuration information matched with the target read-write frequency to serve as target configuration information, configuring the NAND controller by using the target configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
when the storage operation is successful, judging whether the target read-write frequency is in a read-write frequency range with the interval length being the set interval length;
if not, adjusting the available read-write frequency range according to a first processing mode to obtain a first read-write frequency range, replacing the available read-write frequency range with the first read-write frequency range, and returning to the step of executing the step of selecting the read-write frequency positioned at the midpoint in the available read-write frequency range;
if yes, finishing the adjustment;
and when the storage operation is wrong, adjusting the available reading and writing frequency range according to a second processing mode to obtain a second reading and writing frequency range, replacing the available reading and writing frequency range with the second reading and writing frequency range, and returning to the step of executing the step of selecting the reading and writing frequency at the midpoint in the available reading and writing frequency range.
In this embodiment, the configuration module 200 may be specifically configured to:
acquiring an ECC check code corresponding to the configuration information of the NAND controller from the NAND FLASH, and taking the ECC check code as a reference ECC check code;
generating an ECC check code of the acquired configuration information of the NAND controller as a target ECC check code;
comparing whether the reference ECC check code is consistent with the target ECC check code;
and if the configuration information is consistent with the configuration information, configuring the NAND controller according to the configuration information.
In this embodiment, the monitoring module 500 may be specifically configured to:
executing a monitoring program to obtain the RTC time of the step of judging whether the NAND FLASH storage operation failed last time and/or judging whether the adjustment process is not executed within the set time length, and the current RTC time;
judging whether the frequency of failure of the previous execution of the NAND FLASH storage operation is higher than a set frequency threshold, and/or judging whether the difference between the RTC time of the step of not executing the adjustment process within the set time length and the current RTC time exceeds a set time threshold;
if so, the step of determining NAND FLASH whether the frequency of storage operation failures is higher than a set frequency threshold and/or determining whether no adjustment process has been performed within a set time period is performed.
It should be noted that each embodiment is mainly described as a difference from the other embodiments, and the same and similar parts between the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The method and apparatus for adjusting NAND FLASH frequency provided by the present application are described in detail above, and the principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the examples is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method of adjusting NAND FLASH frequency, comprising:
obtaining configuration information of the pre-placed NAND controller from NAND FLASH;
if the acquired configuration information of the NAND controller is correct, configuring the NAND controller according to the configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
if the NAND FLASH storage operation is successful, writing the configured configuration information of the configured NAND controller to the NAND FLASH;
executing a monitoring program, namely judging whether the NAND FLASH storage operation failure frequency is higher than a set frequency threshold value, and/or judging whether an adjustment process is not executed within a set time length, wherein the adjustment process is to adjust the NAND FLASH read-write frequency to obtain a target read-write frequency, and adjust the configuration information to the configuration information matched with the target read-write frequency until the target read-write frequency meets the set requirement, and the NAND FLASH storage operation is successful under the control of a NAND controller configured according to the adjusted configuration information;
if yes, executing the adjusting process;
if the NAND FLASH storage operation fails, the adjustment process is performed.
2. The method of claim 1, wherein the obtaining configuration information of the pre-positioned NAND controller from NAND FLASH comprises:
configuration information for the pre-placed NAND controller is obtained from within the particular partition of NAND FLASH.
3. The method of claim 1, further comprising:
and if the acquired configuration information of the NAND controller is wrong, executing the adjusting process.
4. The method of claim 1, wherein the adjusting the NAND FLASH read-write frequency to obtain a target read-write frequency, and adjusting the configuration information to the configuration information matching the target read-write frequency until the target read-write frequency meets a set requirement, and wherein the storing operation of the NAND FLASH is successful under the control of a NAND controller configured according to the adjusted configuration information, comprises:
selecting the read-write frequency positioned at the middle point within the available read-write frequency range as a target read-write frequency;
adjusting the configuration information to configuration information matched with the target read-write frequency to serve as target configuration information, configuring the NAND controller by using the target configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
when the storage operation is successful, judging whether the target read-write frequency is in a read-write frequency range with the interval length being the set interval length;
if not, adjusting the available read-write frequency range according to a first processing mode to obtain a first read-write frequency range, replacing the available read-write frequency range with the first read-write frequency range, and returning to the step of executing the step of selecting the read-write frequency positioned at the midpoint in the available read-write frequency range;
if yes, finishing the adjustment;
and when the storage operation is wrong, adjusting the available reading and writing frequency range according to a second processing mode to obtain a second reading and writing frequency range, replacing the available reading and writing frequency range with the second reading and writing frequency range, and returning to the step of executing the step of selecting the reading and writing frequency at the midpoint in the available reading and writing frequency range.
5. The method of claim 1, wherein said configuring the NAND controller according to the configuration information comprises:
acquiring an ECC check code corresponding to the configuration information of the NAND controller from the NAND FLASH, and taking the ECC check code as a reference ECC check code;
generating an ECC check code of the acquired configuration information of the NAND controller as a target ECC check code;
comparing whether the reference ECC check code is consistent with the target ECC check code;
and if the configuration information is consistent with the configuration information, configuring the NAND controller according to the configuration information.
6. The method of claim 1, wherein the executing the monitoring program, determining NAND FLASH whether the frequency of storage failure is higher than a set frequency threshold, and/or determining whether an adjustment process has not been performed for a set length of time, comprises:
executing a monitoring program to obtain the RTC time of the step of judging whether the NAND FLASH storage operation failed last time and/or judging whether the adjustment process is not executed within the set time length, and the current RTC time;
judging whether the frequency of failure of the previous execution of the NAND FLASH storage operation is higher than a set frequency threshold, and/or judging whether the difference between the RTC time of the step of not executing the adjustment process within the set time length and the current RTC time exceeds a set time threshold;
if so, the step of determining NAND FLASH whether the frequency of storage operation failures is higher than a set frequency threshold and/or determining whether no adjustment process has been performed within a set time period is performed.
7. An apparatus for adjusting NAND FLASH frequency, comprising:
an acquisition module, configured to acquire configuration information of a pre-placed NAND controller from NAND FLASH;
the configuration module is used for configuring the NAND controller according to the configuration information if the acquired configuration information of the NAND controller is correct;
a control module for controlling NAND FLASH the memory operation by the configured NAND controller;
a determination module to write configuration information of the configured NAND controller to the NAND FLASH if the NAND FLASH store operation was successful;
a monitoring module, configured to execute a monitoring program, determine whether the NAND FLASH storage operation failure frequency is higher than a set frequency threshold, and/or determine whether an adjustment process is not executed within a set duration, where the adjustment process is to adjust the read-write frequency of NAND FLASH to obtain a target read-write frequency, and adjust the configuration information to configuration information matched with the target read-write frequency until the target read-write frequency meets a set requirement, and the NAND FLASH storage operation is successful under the control of a NAND controller configured according to the adjusted configuration information;
an adjusting module, configured to execute the adjusting process if the frequency of NAND FLASH storage operation failures is higher than a set frequency threshold, and/or the adjusting process is not executed within a set time duration, or execute the adjusting process if the NAND FLASH storage operation failures.
8. The apparatus of claim 7, wherein the obtaining module is specifically configured to:
configuration information for the pre-placed NAND controller is obtained from within the particular partition of NAND FLASH.
9. The apparatus of claim 7, wherein the adjustment module is further configured to:
and if the acquired configuration information of the NAND controller is wrong, executing the adjusting process.
10. The apparatus of claim 7, wherein the adjustment module is specifically configured to:
selecting the read-write frequency positioned at the middle point within the available read-write frequency range as a target read-write frequency;
adjusting the configuration information to configuration information matched with the target read-write frequency to serve as target configuration information, configuring the NAND controller by using the target configuration information, and controlling NAND FLASH to perform storage operation by using the configured NAND controller;
when the storage operation is successful, judging whether the target read-write frequency is in a read-write frequency range with the interval length being the set interval length;
if not, adjusting the available read-write frequency range according to a first processing mode to obtain a first read-write frequency range, replacing the available read-write frequency range with the first read-write frequency range, and returning to the step of executing the step of selecting the read-write frequency positioned at the midpoint in the available read-write frequency range;
if yes, finishing the adjustment;
and when the storage operation is wrong, adjusting the available reading and writing frequency range according to a second processing mode to obtain a second reading and writing frequency range, replacing the available reading and writing frequency range with the second reading and writing frequency range, and returning to the step of executing the step of selecting the reading and writing frequency at the midpoint in the available reading and writing frequency range.
CN202110136260.1A 2021-02-01 2021-02-01 A method and device for adjusting NAND FLASH frequency Pending CN112799980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110136260.1A CN112799980A (en) 2021-02-01 2021-02-01 A method and device for adjusting NAND FLASH frequency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110136260.1A CN112799980A (en) 2021-02-01 2021-02-01 A method and device for adjusting NAND FLASH frequency

Publications (1)

Publication Number Publication Date
CN112799980A true CN112799980A (en) 2021-05-14

Family

ID=75813346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110136260.1A Pending CN112799980A (en) 2021-02-01 2021-02-01 A method and device for adjusting NAND FLASH frequency

Country Status (1)

Country Link
CN (1) CN112799980A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050251672A1 (en) * 2004-05-06 2005-11-10 Samsung Electronics Co., Ltd. Mobile communication terminal including NAND flash memory and method for booting the same
CN101067968A (en) * 2007-04-29 2007-11-07 北京中星微电子有限公司 Apparatus and method for adaptive controlling flash storage interface reading and writing speed
CN102147848A (en) * 2010-02-08 2011-08-10 智微科技股份有限公司 Method for setting operation frequency of storage card and related card reading device
US20190065360A1 (en) * 2017-08-29 2019-02-28 Samsung Electronics Co., Ltd. REDUCING READ-WRITE INTERFERENCE BY ADAPTIVE SCHEDULING IN NAND FLASH SSDs
CN111290704A (en) * 2018-12-06 2020-06-16 爱思开海力士有限公司 Apparatus and method for controlling data stored in a memory system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050251672A1 (en) * 2004-05-06 2005-11-10 Samsung Electronics Co., Ltd. Mobile communication terminal including NAND flash memory and method for booting the same
CN101067968A (en) * 2007-04-29 2007-11-07 北京中星微电子有限公司 Apparatus and method for adaptive controlling flash storage interface reading and writing speed
CN102147848A (en) * 2010-02-08 2011-08-10 智微科技股份有限公司 Method for setting operation frequency of storage card and related card reading device
US20190065360A1 (en) * 2017-08-29 2019-02-28 Samsung Electronics Co., Ltd. REDUCING READ-WRITE INTERFERENCE BY ADAPTIVE SCHEDULING IN NAND FLASH SSDs
CN111290704A (en) * 2018-12-06 2020-06-16 爱思开海力士有限公司 Apparatus and method for controlling data stored in a memory system

Similar Documents

Publication Publication Date Title
CN111124517B (en) Embedded chip boot starting method and device, computer equipment and storage medium
US20150067316A1 (en) Electronic device and testing method
CN108984219B (en) Memory parameter configuration method and electronic equipment
CN113568848A (en) Processor, signal conditioning method, and computer system
US20230418590A1 (en) Instruction updates
CN112882734A (en) Upgrading method and device, computer equipment and medium
CN111816240A (en) Dynamic testing method and device for Flash Nand Flash, electronic equipment and storage medium
US11043269B2 (en) Performing a test of memory components with fault tolerance
CN114265603B (en) System upgrade method, device and electronic device based on asymmetric partitioning
CN111338698A (en) A kind of method and system for BIOS to accurately guide server to start
CN114691539B (en) Electronic device startup methods and electronic devices
CN112799980A (en) A method and device for adjusting NAND FLASH frequency
CN111090539A (en) Dual-flash-memory self-repairing method and device based on CPLD
CN106598769A (en) Method and device for checking EMMC (embedded multi media card) burning file
CN114020211A (en) Storage space management method, device, equipment and storage medium
CN118262776A (en) LPDDR DBI function test method, device, equipment and medium
CN113766554A (en) Method and device for obtaining WiFi calibration data, and WiFi device calibration test system
TW202424986A (en) Method for testing flash memory module and associated flash memory controller and memory device
CN115951920A (en) Mobile equipment upgrading method and device, storage unit and mobile equipment
CN115794180A (en) A bootloader upgrade method and system
CN113672302A (en) Router starting method and device, router and storage medium
CN113760623A (en) Solid state hard disk TCG protocol function test method, device and computer equipment
TWI635499B (en) Method for programming non-volatile memory and memory system
CN110795294B (en) Equipment abnormal analysis method, analysis device, analysis system and readable storage medium
US20250094276A1 (en) Device trimming via direct memory access

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210514