CN100463492C - Method for storing station name of security receiving chip - Google Patents

Method for storing station name of security receiving chip Download PDF

Info

Publication number
CN100463492C
CN100463492C CNB2007101854150A CN200710185415A CN100463492C CN 100463492 C CN100463492 C CN 100463492C CN B2007101854150 A CNB2007101854150 A CN B2007101854150A CN 200710185415 A CN200710185415 A CN 200710185415A CN 100463492 C CN100463492 C CN 100463492C
Authority
CN
China
Prior art keywords
sector
byte
information
subregion
appointment
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.)
Active
Application number
CNB2007101854150A
Other languages
Chinese (zh)
Other versions
CN101184155A (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.)
CETC 54 Research Institute
Original Assignee
CETC 54 Research Institute
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 CETC 54 Research Institute filed Critical CETC 54 Research Institute
Priority to CNB2007101854150A priority Critical patent/CN100463492C/en
Publication of CN101184155A publication Critical patent/CN101184155A/en
Application granted granted Critical
Publication of CN100463492C publication Critical patent/CN100463492C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for storing station name by a safe receiving chip, belonging to the technical field of digital information processing for the management of digital memory in communications field. The invention is characterized in allocating the memory reasonably, and realizing storage, compiling indexes and performing corresponding state tags to the program name according to the length of the program name, the capacity of the memory and the size of the sector. The invention has the advantages of being convenient for managing the storing data, reducing erasing times to the memory, prolonging the service life of the memory, and being especially suitable for storing station names in flash memory.

Description

The method of storing station name of security receiving chip
Technical field
The present invention relates to the method for a kind of storing station name of security receiving chip in the communications field, it is specially adapted in Flash (flash memory) TV programme platform name stored and the platform name information of TV programme is managed.
Background technology
The Flash memory can't be wiped single byte, as wiping the content of certain byte, can only wipe the sector at this byte place is whole, the byte that will not need to wipe writes then, no longer writes the byte that will wipe, therefore, fill order's byte-erase or to upgrade operation cumbersome, and if frequently wipe some byte of same sector, because of will be to whole sector operation, can make that the erasable number of times of this sector is too much, make the lost of life of Flash.
Therefore, need a kind of reasonable method of exploitation, can either reduce erasable number of times, improve the useful life of chip, make things convenient for again the data of being stored are managed Flash.
Summary of the invention
Technical problem to be solved by this invention just provides a kind of the realization program platform name is stored and the effective method of storing station name of security receiving chip of management, the present invention is according to characteristics such as the capacity of the length of program platform name and used memory, sector-size, reasonable distribution is carried out in space to memory, to program platform name store, produce index and do corresponding status indication.The present invention has convenient data to storage and manages, and reduces the number of times that memory is wiped, and prolongs the characteristics such as useful life of memory.
The object of the present invention is achieved like this, and it comprises step:
1. the sector 0 of memory, sector 1 as total index area, the sector numbers that record has been used, after in memory, writing data at every turn, then in sector 0 or sector 1, write the sequence number of last sector of this time using, 0 opening entry sector numbers at first from the sector, each sequence number takies a byte, sequence number is then write to sector 1 after writing and expiring in sector 0, after sector 1 has been write sector 0 is wiped, sector 0, sector 1 are used alternatingly as index
2. 2 begin to store actual information station's name from the sector, the sector of stored information platform is divided into N subregion, N is a natural number, and wherein subregion 0 is not stored actual table name information as the index of this sector, begins to be used for storing station name information from subregion 1,
3. subregion 0 identifies as follows as the index of this sector: the corresponding platform name information area of per two bytes, and the 1st byte writes special value and represents that the whole information area of this sector uses up; The 2nd byte writes special value and represents that the whole information area of this sector is designated garbage, allows whole sector erasing; The byte of back is the platform name information of corresponding this sector storage successively, the 3rd byte writes special value and represents that the subregion 1 of this sector has platform name information, the 4th byte writes the platform name information that special value represents that the subregion 1 of this sector has and lost efficacy, by that analogy, described special value is 00 to FF hexadecimal number, and is self-defined definite.
4. detect the inefficacy platform name that two sectors are arranged in the sector of stored information platform name and all surpass half of number of partitions, then useful name with these two sectors reads successively, is written in the sector of appointment, in the 1st byte of the sector of appointment and the 2nd byte, write the sequence number of these two sectors, with these two sector erasing, in the information copy of the sector of an appointment sector after wipe, wipe the sector of appointment then
5. avoid in wiping the sector process or in the information copy process of the sector of appointment, the integrality that power down influences data takes place, with latter two byte of the sector of appointment as sign, the penult byte writes special value and represents that the sectors of data of appointment is complete, last byte writes special value and represents that the information of the sector of appointment has copied and finish, can wipe, if the nonspecific numerical value of latter two byte, also non-00H or FFH, represent that then power down has taken place in this sector, also can wipe once more in erase process.Described special value is 00 to FF hexadecimal number, and is self-defined definite.
The present invention compares with background technology, has following advantage:
(1) the present invention stores the Flash memory according to the data characteristics subregion, can effectively utilize memory space, can reduce the area of circuit, can reduce cost again.
(2) the present invention adds index in the content of storage, can also reduce the erasable number of times of Flash conveniently to the management of storage data, improves the useful life of chip.
Description of drawings
Fig. 1 is the schematic diagram of the embodiment of the invention.
Fig. 2 is the storage organization schematic diagram of embodiment of the invention 64KFlash memory.Information area capacity is 256 bytes among Fig. 2, and each sector capacity is 512 bytes.
Fig. 3 is the schematic diagram of the embodiment of the invention to 64KFlash memory allocated space.The information area, sector 0, sector 1 subregion not among Fig. 3, all the other sectors all are divided into 16 subregions by 32 bytes.
Embodiment
Referring to figs. 1 through Fig. 3, the inventive method comprises step:
1. the sector 0 of memory, sector 1 as total index area, the sector numbers that record has been used, after in memory, writing data at every turn, then in sector 0 or sector 1, write the sequence number of last sector of this time using, 0 opening entry sector numbers at first from the sector, each sequence number takies a byte, and sector 0 is write and is then write sequence number to sector 1 after full, after sector 1 has been write sector 0 is wiped, sector 0, sector 1 are used alternatingly as index.
2. 2 begin to store actual information station's name from the sector, the sector of stored information platform is divided into N subregion, N is a natural number, and wherein subregion 0 is not stored actual table name information as the index of this sector, begins to be used for storing station name information from subregion 1.
3. subregion 0 identifies as follows as the index of this sector: the corresponding platform name information area of per two bytes, and the 1st byte writes special value and represents that the whole information area of this sector uses up; The 2nd byte writes special value and represents that the whole information area of this sector is designated garbage, allows whole sector erasing; The byte of back is the platform name information of corresponding this sector storage successively, the 3rd byte writes special value and represents that the subregion 1 of this sector has platform name information, the 4th byte writes the platform name information that special value represents that the subregion 1 of this sector has and lost efficacy, by that analogy.Special value described in the embodiment is 00 to FF hexadecimal number, and is self-defined definite.
4. detect the inefficacy platform name that two sectors are arranged in the sector of stored information platform name and all surpass half of number of partitions, then useful name with these two sectors reads successively, is written in the sector of appointment, in the 1st byte of the sector of appointment and the 2nd byte, write the sequence number of these two sectors, with these two sector erasing, in the information copy of the sector of an appointment sector after wipe, wipe the sector of appointment then.
5. avoid in wiping the sector process or in the information copy process of the sector of appointment, the integrality that power down influences data takes place, with latter two byte of the sector of appointment as sign, the penult byte writes special value and represents that the sectors of data of appointment is complete, last byte writes special value and represents that the information of the sector of appointment has copied and finish, can wipe, if the nonspecific numerical value of latter two byte, also non-00H or FFH, represent that then power down has taken place in this sector, also can wipe once more in erase process.Special value described in the embodiment is 00 to FF hexadecimal number, and is self-defined definite.
The present invention is based on the Flash memory and realize the storage and the management of TV programme platform name, Fig. 1 is the principle schematic of the embodiment of the invention.
Flash memory with 64K is the operating process that embodiment illustrates this method below:
Fig. 2 is the schematic diagram of embodiment of the invention 64KFlash memory.Information area capacity is 256 bytes among Fig. 2, and each sector capacity is 512 bytes.
Wherein 256 bytes of the information area keep, and will be used as the test record or the chip configuration information conservation zone of chip.
The sector numbers of using is write down: as storing sector 7 at present into, then write 07H in sector 0 as total index area in sector 0,1; Because add program the sector has been used 9 as the back, then write 09H on next address, the rest may be inferred; If whole sector 0 is write full, then begin to write to sector 1, after sector 1 has been write, sector 0 is wiped. Sector 0,1 is used alternatingly as index.
2 begin to store actual information station's name from the sector, the sector of stored information platform is divided into 16 subregions by 32 bytes, numbering is followed successively by 0 to 15, wherein subregion 0 is as the index of this sector, do not store actual table name information, subregion 1 to subregion 15 is used for storing station name information, so 15 platform name information can be stored in each sector; Definition sector 2 is 61 totally 60 sector storage platform name information to the sector, then can store 15 * 60=900 platform name information altogether.
Fig. 3 is the schematic diagram of the embodiment of the invention to 64KFlash memory allocated space.The information area, sector 0, sector 1 subregion not among Fig. 3, all the other sectors all are divided into 16 districts by 32 bytes.
Subregion 0 is as the index of this sector, as follows sign: 32 bytes are by the corresponding platform name information area of per two bytes, and the 1st byte writes the whole information area that 55H represents this sector and use up; The 2nd byte writes the whole information area that AAH represents this sector and is designated garbage, can wipe this sector; Corresponding successively 15 the platform name information of 30 bytes of back write 55H as the 3rd byte and represent that this sector subregion 1 has platform name information, and the 4th byte writes the platform name information that AAH represents this sector subregion 1 and lost efficacy.55H and AAH can be self-defined in actual design among the embodiment.
Wiping of sector: the backup area of usefulness is upgraded in sector 62 as the sector.All surpass 8 if detect the fail message platform of two sectors, then useful name with these two sectors reads successively, is written in the sector 62, the 1st of 62 the byte and the 2nd byte write the sector number that correspondence will be upgraded in the sector afterwards, afterwards with two sector erasing of correspondence, in the information copy of sector 62 sector after wipe, wipe sector 62 afterwards, detect two corresponding sectors before noting wiping and whether finished corresponding operating, in order to avoid corresponding operating is not finished in power down in the operation.
Be the integrality of avoiding in sector erase process or power down influences data in the information copy of sector 62, with latter two byte of sector 62 as sign, the penult byte writes the data integrity that 55H represents sector 62, last byte writes information that AAH represents sector 62 and has copied and finish, and can wipe.If non-55H of latter two byte and AAH, also non-00H or FFH represent that then power down has taken place in this sector in erase process, also can wipe once more.55H and AAH can be self-defined in actual design among the embodiment.
For avoid write or erase process in power down cause the imperfect operate as normal that influences system of information, must notice during design Flash logic that affirmation writes or erasing move is complete effectively, when increasing a platform name, in the index of correspondence, write 55H again after corresponding name write such as certain district in certain sector; In like manner, if corresponding index is 00H (empty information) or other information, and corresponding information storage area has data, then thinks invalid data, writes AAH on the corresponding byte of expression data validity, so that wipe opportune moment.55H and AAH can be self-defined in actual design among the embodiment.

Claims (2)

1. the method for a storing station name of security receiving chip is characterized in that comprising step:
1. the sector 0 of memory, sector 1 as total index area, the sector numbers that record has been used, after in memory, writing data at every turn, then in sector 0 or sector 1, write the sequence number of last sector of this time using, 0 opening entry sector numbers at first from the sector, each sequence number takies a byte, sequence number is then write to sector 1 after writing and expiring in sector 0, after sector 1 has been write sector 0 is wiped, sector 0, sector 1 are used alternatingly as index
2. 2 begin to store actual information station's name from the sector, the sector of stored information platform is divided into N subregion, N is a natural number, and wherein subregion 0 is not stored actual table name information as the index of this sector, begins to be used for storing station name information from subregion 1,
3. subregion 0 identifies as follows as the index of this sector: the corresponding platform name information area of per two bytes, and the 1st byte of subregion 0 writes special value and represents that the whole information area of this sector uses up; The 2nd byte of subregion 0 writes special value and represents that the whole information area of this sector is designated garbage, allows whole sector erasing; The byte of back is the platform name information of corresponding this sector storage successively, the 3rd byte of subregion 0 writes special value and represents that the subregion 1 of this sector has platform name information, the 4th byte of subregion 0 writes the platform name information that special value represents that the subregion 1 of this sector has and lost efficacy, by that analogy
4. detect the inefficacy platform name that two sectors are arranged in the sector of stored information platform name and all surpass half of number of partitions, then useful name with these two sectors reads successively, is written in the sector of appointment, in the 1st byte of the sector of appointment and the 2nd byte, write the sequence number of these two sectors, with these two sector erasing, in the information copy of the sector of an appointment sector after wipe, wipe the sector of appointment then
5. avoid in wiping the sector process or in the information copy process of the sector of appointment, the integrality that power down affects data takes place; With latter two byte of the sector of appointment as sign; The penult byte writes the data integrity that special value represents the sector of appointment; Last byte writes information that special value represents the sector of appointment and has copied and finish; Can wipe; If the nonspecific numerical value of latter two byte; Also non-zero 0H or FFH; Represent that then power down has taken place in this sector in erase process; Also can again wipe
Step 4., the 5. content of cycle detection memory, 4. the content of storage satisfies step, 5. in the condition of appointment then the sector of appointment is wiped or write operation.
2. the method for storing station name of security receiving chip according to claim 1 is characterized in that: the 3., 5. the special value described in the step is 00 to FF hexadecimal number, self-definedly determines.
CNB2007101854150A 2007-12-18 2007-12-18 Method for storing station name of security receiving chip Active CN100463492C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101854150A CN100463492C (en) 2007-12-18 2007-12-18 Method for storing station name of security receiving chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101854150A CN100463492C (en) 2007-12-18 2007-12-18 Method for storing station name of security receiving chip

Publications (2)

Publication Number Publication Date
CN101184155A CN101184155A (en) 2008-05-21
CN100463492C true CN100463492C (en) 2009-02-18

Family

ID=39449218

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101854150A Active CN100463492C (en) 2007-12-18 2007-12-18 Method for storing station name of security receiving chip

Country Status (1)

Country Link
CN (1) CN100463492C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340432B (en) * 2008-08-14 2010-12-22 中国电子科技集团公司第五十四研究所 Safe receiving chip channel name updating method based on network
CN102279806A (en) * 2011-05-18 2011-12-14 深圳创维-Rgb电子有限公司 Digital television equipment and storage method for single program initiation (SPI) memory
CN103914407B (en) * 2012-12-30 2016-09-14 航天信息股份有限公司 A kind of SD card power down protection, restoration methods and the SD card with power down protection
CN107861687B (en) * 2017-10-13 2020-09-11 华立科技股份有限公司 Method for realizing bit-by-bit storage of electric quantity decimal of electric meter on FLASH memory
CN109947369A (en) * 2019-03-22 2019-06-28 河南卓正电子科技有限公司 Date storage method and device
CN112965661A (en) * 2021-03-01 2021-06-15 歌尔科技有限公司 Data storage method, device, equipment and storage medium
CN113316010B (en) * 2021-05-28 2023-02-28 杭州国芯科技股份有限公司 Method for recording current viewing channel information by set top box
CN114356792B (en) * 2021-11-18 2023-03-10 国电南瑞三能电力仪表(南京)有限公司 Electric energy meter frozen data storage method based on FLASH pre-erasing technology and electric energy meter

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1143812A (en) * 1995-08-18 1997-02-26 三菱电机株式会社 Memory device
US6118706A (en) * 1998-08-13 2000-09-12 Texas Instruments Incorporated Flash memory block or sector clear operation
CN1351350A (en) * 2000-10-27 2002-05-29 岳京星 Method for partitioning memory block and identifying R/W information in flash memory
US6807103B2 (en) * 2000-11-15 2004-10-19 Stmicroelectronics S.A. Page-erasable flash memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1143812A (en) * 1995-08-18 1997-02-26 三菱电机株式会社 Memory device
US6118706A (en) * 1998-08-13 2000-09-12 Texas Instruments Incorporated Flash memory block or sector clear operation
CN1351350A (en) * 2000-10-27 2002-05-29 岳京星 Method for partitioning memory block and identifying R/W information in flash memory
US6807103B2 (en) * 2000-11-15 2004-10-19 Stmicroelectronics S.A. Page-erasable flash memory

Also Published As

Publication number Publication date
CN101184155A (en) 2008-05-21

Similar Documents

Publication Publication Date Title
CN100463492C (en) Method for storing station name of security receiving chip
CN102081577B (en) Data storage structure of Flash memory and data manipulation mode thereof
EP1197868B1 (en) Method of driving remapping in flash memory and flash memory architecture suitable therefor
US7594062B2 (en) Method for changing data of a data block in a flash memory having a mapping area, a data area and an alternative area
KR100849221B1 (en) Method for managing non-volatile memory, and memory-based apparatus including the non-volatile memory
US7991942B2 (en) Memory block compaction method, circuit, and system in storage devices based on flash memories
US8321652B2 (en) Process and method for logical-to-physical address mapping using a volatile memory device in solid state disks
EP2115595B1 (en) Memory device performance enhancement through pre-erase mechanism
TWI553475B (en) Page based management of flash storage
US20030229753A1 (en) Flash memory file system
CN105760113B (en) High-speed processing apparatus and file management method based on nand flash memory
KR101447188B1 (en) Method and apparatus for controlling I/O to optimize flash memory
US20020026566A1 (en) Data backup in non-volatile memory
KR101077904B1 (en) Apparatus and method for managing flash memory using page level mapping algorithm
CN102662856A (en) Solid state disk and access method
CN101470632A (en) Sharing internal memory management method and apparatus
CN106469122A (en) Valid data merging method, Memory Controller and memorizer memory devices
CN109669889B (en) Light Nor Flash control method and device
CN112596668A (en) Bad block processing method and system for memory
US20070005929A1 (en) Method, system, and article of manufacture for sector mapping in a flash device
CN103578566B (en) Memory storage apparatus and restorative procedure thereof
EP2264602A1 (en) Memory device for managing the recovery of a non volatile memory
EP2267725A1 (en) Memory device for managing the recovery of a non volatile memory
CN108376121B (en) Data storage method of Flash memory
CN102880562B (en) Flash memory device

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