CN1913040A - Method for configuring parameter in NOR FLASH - Google Patents

Method for configuring parameter in NOR FLASH Download PDF

Info

Publication number
CN1913040A
CN1913040A CNA2005100366339A CN200510036633A CN1913040A CN 1913040 A CN1913040 A CN 1913040A CN A2005100366339 A CNA2005100366339 A CN A2005100366339A CN 200510036633 A CN200510036633 A CN 200510036633A CN 1913040 A CN1913040 A CN 1913040A
Authority
CN
China
Prior art keywords
parameter
flash
value
storage space
unit
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.)
Granted
Application number
CNA2005100366339A
Other languages
Chinese (zh)
Other versions
CN100431051C (en
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.)
CHINA TECHNOLOGY EXCHANGE CO., LTD.
State Grid Beijing Electric Power Co Ltd
State Grid Economic and Technological Research Institute
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB2005100366339A priority Critical patent/CN100431051C/en
Publication of CN1913040A publication Critical patent/CN1913040A/en
Application granted granted Critical
Publication of CN100431051C publication Critical patent/CN100431051C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

This invention relates to a method for matching parameters in NOR FLASH, which divides an erasure block unit region stored with programs and residual space into several storage units, each one of which stores a parameter to register the start and end addresses of said unit, determining the storage space of said parameter based on the length of the parameter and times to be modified, storing parameters necessary to be stored in said storage unit, finding out the storage unit of said parameter when it is needed to be modified to store the modified value just behind the current value, when a parameter is called, the value stored in the first un-empty region looked up inversely from the end address of the parameter storage space is the current newest parameter value.

Description

A kind of in NOR FLASH the method for configuration parameter
Technical field
The present invention relates in the embedded system memory device flash storage space be divided and utilized.
Background technology
NOR and NAND are two kinds of main nonvolatile flash memory technology on the present market.Intel at first developed NOR flash technology in 1988, thoroughly changed the situation that was originally ruled all the land by EPROM and EEPROM.The characteristics of NOR are to carry out in the chip, and application program can directly be moved in the flash flash memory like this, needn't read code among the RAM of system again.The transfer efficiency of NOR FLASH is very high, has very high cost benefit when the low capacity of 1~4MB, therefore is widely used in embedded system.
Be divided into a plurality of block (erase block unit) in the NOR Flash chip, common block size is 64KB, 128KB.System mainly contains reading and writing, wipes etc. the bottom that operates in of flash.Wherein wiping with block is that unit carries out, and promptly erase operation needs to wipe the zone of a bock at least.
In embedded system device, the flash storage space is divided into a plurality of zones such as boot district, parameter region, inner core region, file system area usually, as shown in Figure 1.Parameter region will take one or more block district (flash minimum erase units).If parameter is few, at big erase block and do not have among the flash of parameter region, distribute a block stored parameter often to cause waste separately to the flash storage space, in low-cost equipment, it is very outstanding that the price of flash chip just seems.For example, the total equipment of the hardware of certain terminal device is 100 yuan, and the flash price of the flash of 2M and 4M just differs about 10 yuan.Simultaneously, if some parameter change, the block that place, entire parameter district will be wiped by system often wipes, and may fatal error occur in outage.
If in a system, except the stored programme that distributes, also have bigger remaining space among certain block of flash, then can utilize these spaces to be used for storing the parameter that some often do not change.If the program of this block can not be wiped free of, then face the difficult problem that these these parameters need be revised again.
Summary of the invention
The technical problem to be solved in the present invention is, at problems of the prior art, propose a kind of in NORFLASH the method for configuration parameter, make full use of stored program block remaining space, can upgrade parameter.
Technical scheme of the present invention is:
1.1 with having program stored therein among the NOR FLASH and erase block unit (block) area dividing of remaining space being arranged is several storage unit, each storage unit writes down the initial and end address of each unit as the storage space of a parameter;
1.2, determine the storage space of this parameter according to each parameter length and the number of times that can revise
1.3 will need stored parameters to store in the said memory cells;
1.4 when needing to revise certain parameter, find the storage unit of this parameter, and then the parameter value of revising be stored in the back of currency;
1.5 when calling certain parameter, be not empty zone from the end address reverse find of this parameter storage space, first is not exactly current up-to-date parameter value for the value of empty area stores.
In such scheme, when the storage space of certain parameter was taken, system program copied the content of this erase block unit in the storer (RAM) to, then the last look of original program code and each parameter thereof is write in this erase block unit again.
The present invention can effectively save the flash storage space, and particularly according to traditional partition method the time, program size has just surpassed under the situation of all storage spaces of flash, and the effect of this method is outstanding especially.For some parameter that often is not modified, adopt this method, can reduce that parameter b lock is wiped free of the parameter risk of missing that causes because other parameters often are modified.
Description of drawings
Fig. 1 is a flash subregion synoptic diagram in the embedded system;
Fig. 2 is a process flow diagram of using method configuration parameter of the present invention and call parameters;
Fig. 3 is a boot district stored parameter synoptic diagram;
Fig. 4 is that MAC Address is provided with synoptic diagram.
Embodiment:
Fig. 2 is a process flow diagram of using method configuration parameter of the present invention and call parameters.
Elder generation's configuration parameter.With having program stored therein among the NOR FLASH and erase block unit (block) area dividing of remaining space being arranged is several storage unit, and each storage unit writes down the initial and end address of each unit as the storage space of a parameter; According to each parameter length and the number of times that can revise, determine the storage space of this parameter again; To need stored parameters to store in the said memory cells then, promptly write among the FLASH.
When need revising certain parameter, find the parameter current position, i.e. and then the storage unit of this parameter is stored in the parameter value of revising the back of currency.Can repeatedly revise.When the storage space of certain parameter was taken, system program copied the content of this erase block unit among the RAM to, then the last look of original program code and each parameter thereof was write in this erase block unit again, restarted configuration parameter.
In the time of need calling certain parameter, searching the parameter current position, is not empty zone from the end address reverse find of this parameter storage space, and first is not exactly current up-to-date parameter value for the value of empty area stores, can call after finding.
Example one:
When the block of flash was bigger, the boot program often can not take a block district.Parameter is stored among the block at boot program place.As shown in Figure 3.Because the program in boot district can not be destroyed, can not carry out erase operation so revise the parameter in this district.At boot program afterbody, distribute the storage space of the zone of certain byte number for each parameter as this parameter, the first address of each parameter is fixed, and known.During the value of certain parameter of modification of program, leave newly-installed value in value back that this parameter was provided with last time.The value that " parameter i_n " expression parameter i is provided with for the n time, n increases representation program parameter is made amendment.When certain parameter of routine call, at first determine the memory location of this parameter according to the first address of this parameter, then from the up-to-date parameter value of the afterbody reverse find of this parameter storage space, promptly search and be not dummy section, get the last look that value in this parameter length zone is this parameter then.The current physical address that needs call parameters can be located in records such as number modification number of times.
Example two:
MAC Address is a common important parameter, and the possibility that this parameter is modified is smaller, adopts this method store M AC address advantageous.Memory allocation as shown in Figure 4.
The block size of flash is 128KB, and certain subprogram takies 64KB, and parameter can take remaining 64KB space so.Distributing to MAC Address parameter storage space is 0x10000 to 0x10078, like this, can store 20 MAC Address values, and promptly this parameter can be revised at most 19 times.Initial MAC Address parameter MAC_0 leaves among 6 Byte that 0x10000 begins, and first revision MAC_1 is right after MAC_0 and deposits, and revises once more that the rest may be inferred.When this MAC Address parameter of system call, program is that the unit reverse find is empty byte from the storage space afterbody 0x10078 of MAC Address parameter with 6 Byte.First is not up-to-date parameter value for the value of empty unit storage space.Read this value, use for program.

Claims (2)

1, a kind of in NOR FLASH the method for configuration parameter, comprising:
1.1 will have program stored therein among the NOR FLASH and have the erase block unit area of remaining space to be divided into several storage unit, each storage unit writes down the initial and end address of each unit as the storage space of a parameter;
1.2, determine the storage space of this parameter according to each parameter length and the number of times that can revise;
1.3 will need stored parameters to store in the said memory cells;
1.4 when needing to revise certain parameter, find the storage unit of this parameter, and then the parameter value of revising be stored in the back of currency;
1.5 when calling certain parameter, be not empty zone from the end address reverse find of this parameter storage space, first is not exactly current up-to-date parameter value for the value of empty area stores.
2, claim 1 described in NOR FLASH the method for configuration parameter, it is characterized in that, when the storage space of certain parameter is taken, system program copies the content of this erase block unit in the storer to, then the last look of original program code and each parameter thereof is write in this erase block unit again.
CNB2005100366339A 2005-08-12 2005-08-12 Method for configuring parameter in NOR FLASH Expired - Fee Related CN100431051C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100366339A CN100431051C (en) 2005-08-12 2005-08-12 Method for configuring parameter in NOR FLASH

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100366339A CN100431051C (en) 2005-08-12 2005-08-12 Method for configuring parameter in NOR FLASH

Publications (2)

Publication Number Publication Date
CN1913040A true CN1913040A (en) 2007-02-14
CN100431051C CN100431051C (en) 2008-11-05

Family

ID=37721937

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100366339A Expired - Fee Related CN100431051C (en) 2005-08-12 2005-08-12 Method for configuring parameter in NOR FLASH

Country Status (1)

Country Link
CN (1) CN100431051C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938594A (en) * 2010-08-02 2011-01-05 福建新大陆通信科技股份有限公司 Volume saving method for digital television set top box
CN102306125A (en) * 2011-08-17 2012-01-04 深圳市共进电子股份有限公司 Method for erasing and writing data of FLASH memory
CN103853669A (en) * 2014-03-21 2014-06-11 北京国芯威电子科技股份有限公司上海分公司 Storage management method based on NOR Flash
CN111831324A (en) * 2020-05-31 2020-10-27 中车永济电机有限公司 Rail transit control device parameter configuration method based on functional safety
CN112558868A (en) * 2020-12-07 2021-03-26 炬芯科技股份有限公司 Method, device and equipment for storing configuration data
CN114089915A (en) * 2017-03-27 2022-02-25 珠海极海半导体有限公司 File additional writing operation method and device based on FLASH memory

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1204501C (en) * 2001-09-18 2005-06-01 华为技术有限公司 FLASH storage file management method
CN1266614C (en) * 2003-04-29 2006-07-26 大唐移动通信设备有限公司 Method for quickening logic block mapping speed in Flash file system
TWI240863B (en) * 2003-09-05 2005-10-01 Megawin Technology Co Ltd Method for efficiently controlling flash memory read/write

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938594A (en) * 2010-08-02 2011-01-05 福建新大陆通信科技股份有限公司 Volume saving method for digital television set top box
CN102306125A (en) * 2011-08-17 2012-01-04 深圳市共进电子股份有限公司 Method for erasing and writing data of FLASH memory
CN102306125B (en) * 2011-08-17 2016-04-06 深圳市共进电子股份有限公司 A kind of data erasing-writing method of FLASH memory
CN103853669A (en) * 2014-03-21 2014-06-11 北京国芯威电子科技股份有限公司上海分公司 Storage management method based on NOR Flash
CN114089915A (en) * 2017-03-27 2022-02-25 珠海极海半导体有限公司 File additional writing operation method and device based on FLASH memory
CN114089915B (en) * 2017-03-27 2022-12-20 珠海极海半导体有限公司 File additional writing operation method and device based on FLASH memory
CN111831324A (en) * 2020-05-31 2020-10-27 中车永济电机有限公司 Rail transit control device parameter configuration method based on functional safety
CN112558868A (en) * 2020-12-07 2021-03-26 炬芯科技股份有限公司 Method, device and equipment for storing configuration data
CN112558868B (en) * 2020-12-07 2024-04-09 炬芯科技股份有限公司 Method, device and equipment for storing configuration data

Also Published As

Publication number Publication date
CN100431051C (en) 2008-11-05

Similar Documents

Publication Publication Date Title
US10642729B2 (en) Data storage device and operating method thereof wherein update to physical-to-logical mapping of destination block is restarted when closing active block
KR100389867B1 (en) Flash memory management method
CN1078364C (en) Flash file system
JP5571691B2 (en) Maintaining mapping address tables in storage
CN101278267B (en) Non-volatile memory with scheduled reclaim operations
US7631138B2 (en) Adaptive mode switching of flash memory address mapping based on host usage characteristics
US8244958B2 (en) Method and system for facilitating fast wake-up of a flash memory system
US20080177935A1 (en) Method and system for facilitating fast wake-up of a flash memory system
US7769944B2 (en) Partial-write-collector algorithm for multi level cell (MLC) flash
CN1204501C (en) FLASH storage file management method
KR101089150B1 (en) Non-volatile memory with scheduled reclaim operations
CN101777061B (en) JAVA card object management method and JAVA card
CN101408880A (en) Methods and apparatus for file management using partitioned file metadata
CN110175001A (en) A kind of NOR-FLASH date storage method, computer equipment and storage medium
CN100431051C (en) Method for configuring parameter in NOR FLASH
US7925821B2 (en) Nonvolatile semiconductor storage device and method of managing the same
CN102043721A (en) Memory management method for flash memory
CN1383510A (en) Method, system and computer program for data management on storage medium
CN1822230A (en) Method for realizing memory file system based on NAND Flash
CN102169460A (en) Method and device for managing variable length data
US8261013B2 (en) Method for even utilization of a plurality of flash memory chips
CN1849590A (en) Management of erased blocks in flash memories
CN105630697B (en) A kind of storage device using MRAM storage small documents
CN1662873A (en) Method for restoring administrative data records of a memory that can be erased in blocks
CN116339617A (en) Automatic deletion in persistent storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: STATE GRID BEIJING ELECTRIC POWER COMPANY CHINA TE

Effective date: 20140129

Owner name: BEIJING POWER ECONOMIC RESEARCH INSTITUTE

Free format text: FORMER OWNER: ZTE CORPORATION

Effective date: 20140129

COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518057 SHENZHEN, GUANGDONG PROVINCE TO: 100055 XICHENG, BEIJING

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20140129

Address after: 100055 No. 15 West Street, Guanganmen station, Beijing, Xicheng District

Patentee after: State Power Economic Research Institute

Patentee after: State Grid Beijing Electric Power Company

Patentee after: CHINA TECHNOLOGY EXCHANGE CO., LTD.

Address before: 518057 Nanshan District, Guangdong high tech Industrial Park, science and Technology Industrial Park, ZTE building, block A, layer 6, layer

Patentee before: ZTE Corporation

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081105

Termination date: 20160812