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.
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.