CN105657508A - Flash memory data processing method for television board card - Google Patents

Flash memory data processing method for television board card Download PDF

Info

Publication number
CN105657508A
CN105657508A CN201610036115.5A CN201610036115A CN105657508A CN 105657508 A CN105657508 A CN 105657508A CN 201610036115 A CN201610036115 A CN 201610036115A CN 105657508 A CN105657508 A CN 105657508A
Authority
CN
China
Prior art keywords
space
data
write
read
mark
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
CN201610036115.5A
Other languages
Chinese (zh)
Other versions
CN105657508B (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.)
SHANGHAI KITKING ELECTRONIC CO Ltd
Original Assignee
SHANGHAI KITKING ELECTRONIC 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 SHANGHAI KITKING ELECTRONIC CO Ltd filed Critical SHANGHAI KITKING ELECTRONIC CO Ltd
Priority to CN201610036115.5A priority Critical patent/CN105657508B/en
Publication of CN105657508A publication Critical patent/CN105657508A/en
Application granted granted Critical
Publication of CN105657508B publication Critical patent/CN105657508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • H04N21/42692Internal components of the client ; Characteristics thereof for reading from or writing on a volatile storage medium, e.g. Random Access Memory [RAM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of semiconductor data storage, and discloses a flash memory data processing method for a television board card. The method comprises the following steps: dividing a flash memory space into a read-only space and two read-write spaces, wherein the read-only space is used for storing a read-only program; a first read-write space of the two read-write spaces is used for storing data which are rarely modified, and a second read-write space of the two read-write spaces is used for storing data which are frequently modified; and dividing the two read-write spaces into a same first space and a mirror image space, wherein the first space is used for storing the same data, and the mirror image space is used for normal use of data when read-write exceptions occur. The flash memory data processing method for the television board card provided by the invention can effectively protect original data when exceptions occur in an operation process of a user, so that no abnormal or crash phenomenon occurs after powering up again.

Description

Television board flash memory data processing method
Technical field
The invention belongs to semi-conductor technical field of data storage, particularly a kind of television board flash memory data processing method.
Background technology
In recent years, LCD TV whether signal processing still operate control, period widely applies numerary signal to operate, particularly nearly for some time internet permeates to TV terminal, intelligent television can become the main flow in market in the near future, human-computer interaction probability is improved greatly, so it is very huge in the inner data processing amount of machine, and televisor plate card dependent program and real-time processing data major part are all stored in a slice flash memory (Flash) chip, these data can carry out real-time update in user operation process, and Flash chip storage generally operates with module unit. write must could write new data after first all data of the block of correspondence first being wiped, if so this part data not being protected, in user operation in improper or operation when falling electricity, re-power, owing to this part data is wiped free of, program disorder or deadlock phenomenon can be caused.
Summary of the invention
In order to solve the problems of the technologies described above, the present invention provides a kind of television board flash memory data processing method, by changing the read-write mode of flash memory, and the phenomenons such as deadlock when reply read-write operation is abnormal.
The technical scheme that the present invention takes is:
A kind of television board flash memory data processing method, it is characterized in that, flash memory space is divided into a read-only space, two read-write spaces, described read-only space for storing read-only program, the size in described read-only space be described read-only program by block get whole after size; The data that the first read-write space in two read-write spaces is seldom modified for storing, the size in described first read-write space be the described data being seldom modified by block get whole after the twice of size, the data that 2nd read-write space is often modified for storing, the size in described 2nd read-write space is remain space in described flash memory;
For read-only space, before television board dispatches from the factory, just read-only data is write read-only space;
For the first read-write space, first read-write space is divided into the first space and mirror image space, saving the first character in the first space and mirror image space as mark byte, described mark byte writes corresponding to data erase, the data in space, completes write operation;
For the 2nd read-write space, 2nd read-write space is divided into the first space and mirror image space, first space and mirror image space are divided into some data blocks and a mark block, byte number shared by described mark block is the number of institute's divided data block, in described mark block, the corresponding each data block of each byte is stored the state of data, and each byte in described mark block writes with data erase, the data corresponding to corresponding each data block space, completes to write, be changed to the operation of old data;
The process carrying out data write operation to described first read-write space is as follows:
(1) the mark byte in the first space is revised as data erase mark, the first space data in erasing first read-write space;
(2) the mark byte in the first space is revised as data and is writing mark, in the first space, write data;
(3), after data have write, the mark byte in the first space has been revised as write mark;
(4) mirror image space is carried out above-mentioned identical write operation,
The process carrying out data reading operation from described first read-write space is as follows:
(1) identifier reading the first space, whether corresponding to completing write mark, in this way, then reads the first space data, otherwise
(2) data in mirror image space are read;
The process carrying out data write operation to described 2nd read-write space is as follows:
(1) mark whether each mark in the mark block in the first space exists corresponding data erasing is retrieved, if any, corresponding mark in mark block is then revised as data writing and identify and write data, after having write, correspondence in mark block is identified and has been revised as write mark, be changed to old data mark by all the other mark blocks in the first space completing to write identify all to change into, then the mirror image space of correspondence is carried out same operation, such as nothing, then
(2) mark in mark block is all revised as data erase mark, the data in the first space are all wiped, change correspondence mark into data to write, first data block in the first space writes data, after having write, just corresponding mark has changed write mark into, and mirror image space carries out above-mentioned identical write operation;
The process carrying out data reading operation from described 2nd read-write space is as follows:
(1) whether read the mark in the mark block in the first space corresponding to completing write mark, in this way, then read the data in the data block of this mark correspondence, otherwise
(2) data in data block corresponding in mirror image space are read.
Further, after described read-only space write data, write-protect operation is carried out.
Further, described data erase, data write, complete write, correspondence mark is represented by byte 0XFF, 0XAA, 0XA0,0X00 respectively to be changed to old data.
Further, preamble, master routine are deposited in described read-only space; Program storage information, factory's parameter are deposited in described first read-write space; Information-setting by user, analog quantity adjustment data are deposited in described 2nd read-write space.
The invention has the beneficial effects as follows:
When user operation process occurs abnormal, original data are effectively protected, after can not producing to re-power, exception or deadlock phenomenon occur.
Accompanying drawing explanation
Accompanying drawing 1 is the modularization structural representation of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the embodiment of television board flash memory data processing method of the present invention is done explanation in detail.
Flash memory space is divided into a read-only space, two read-write spaces, described read-only space for storing read-only program, the size in described read-only space be described read-only program by block get whole after size; The data that the first read-write space in two read-write spaces is seldom modified for storing, the size in described first read-write space be the described data being seldom modified by block get whole after the twice of size, the data that 2nd read-write space is often modified for storing, the size in described 2nd read-write space is remain space in described flash memory.
For read-only space, before television board dispatches from the factory, just read-only data is write read-only space; And read-only sky is carried out write-protect operation. For depositing the read-only data such as preamble, master routine.
For the first read-write space, first read-write space is divided into the first space and mirror image space, saving the first character in the first space and mirror image space as mark byte, described mark byte writes corresponding to data erase, the data in space, completes write operation. First read-write space is for depositing the data such as the program storage information of seldom read-write, factory's parameter.
For the 2nd read-write space, 2nd read-write space is divided into the first space and mirror image space, first space and mirror image space are divided into some data blocks and a mark block, byte number shared by described mark block is the number of institute's divided data block, in described mark block, the corresponding each data block of each byte is stored the state of data, each byte in described mark block and the data erase corresponding to corresponding each data block space, data write, complete write, it is changed to the operation of old data, information-setting by user is deposited in 2nd read-write space, the data that analog quantity adjustment etc. are often revised.
The process carrying out data write operation to described first read-write space is as follows:
(1) the mark byte in the first space is revised as data erase mark, the first space data in erasing first read-write space;
(2) the mark byte in the first space is revised as data and is writing mark, in the first space, write data;
(3), after data have write, the mark byte in the first space has been revised as write mark;
(4) mirror image space is carried out above-mentioned identical write operation.
The process carrying out data reading operation from described first read-write space is as follows:
(1) identifier reading the first space, whether corresponding to completing write mark, in this way, then reads the first space data, otherwise
(2) data in mirror image space are read.
The process carrying out data write operation to described 2nd read-write space is as follows:
(1) mark whether each mark in the mark block in the first space exists corresponding data erasing is retrieved, if any, corresponding mark in mark block is then revised as data writing and identify and write data, after having write, correspondence in mark block is identified and has been revised as write mark, be changed to old data mark by all the other mark blocks in the first space completing to write identify all to change into, then the mirror image space of correspondence is carried out same operation, such as nothing, then
(2) mark in mark block is all revised as data erase mark, the data in the first space are all wiped, change correspondence mark into data to write, first data block in the first space writes data, after having write, just corresponding mark has changed write mark into, and mirror image space carries out above-mentioned identical write operation.
The process carrying out data reading operation from described 2nd read-write space is as follows:
(1) whether read the mark in the mark block in the first space corresponding to completing write mark, in this way, then read the data in the data block of this mark correspondence, otherwise
(2) data in data block corresponding in mirror image space are read.
FIGS 1, below the present invention will be described in detail.
First the data being stored in Flash are classified: 1, unchangeable data in operation; 2, data infrequently it are modified; 3, data often it are modified.
Flash is carried out subregion and protection; 1, it is divided into three spaces to store each self-corresponding data respectively for storing above-mentioned three kinds of data; 2, by not allowing to be modified data space write-protect software, the data of period are protected; data in this space can only be carried out reading operation by master control unit, can not the data in this space be rewritten. 3, the space being infrequently modified data and the data space that is often modified carry out being divided into space, space first and the mirror image space of 2 same sizes more separately.
The space being infrequently modified data is 2 times of actual amount of data (getting whole rear by BLOCK), first space and mirror image space size are with practical programs sizableness, store data structure is mark byte+real data, mark byte is for identifying the state of data below, it is wiped free of (write) respectively as these data with 0XFF, 0XAA, 0XA0, data write, and have completed new data (up-to-date data) state. .
The space being often modified data is divided into 2 spaces, space first and mirror image space, depending on the size of actual amount of data, each space is divided into N number of data block and a mark block, each data block size is with actual amount of data sizableness, mark block has N number of byte, and each byte is corresponding in turn to the data state that a data block is used in identification data block. Identifying respective blocks of data state with 4 kinds of different data, namely 0XFF, 0XAA, 0XA0,0X00 are wiped free of (write) as data, and data write, and have completed new data (up-to-date data) and data are changed to 4 kinds of states marks of old data.
Master control unit to be infrequently modified data and be often modified data carry out read operation time, priority access first space, whether index flag has up-to-date data, if any then reading the data being designated up-to-date data, as do not found, up-to-date data identify, then access its mirror image space, retrieve its data being designated up-to-date data and read.
The data being infrequently modified are carried out write operation by master control unit, preferentially all former data in the first space are wiped, write is simultaneously according to process modified logo byte state, after having write, in the same way its mirror image space is write, the unusual conditions such as electricity are fallen as write the first steric course in data, cause data having been write, then its zone bit is not just 0XA0 mark, after re-powering, when this part data is read by master control unit, would not in the first spatial retrieval to this byte, then automatically arrive mirror image spatial retrieval, go the data read in mirror image space as up-to-date data. the same, when the data being often modified are carried out write operation by master control unit, 0XFF byte whether is had in the preferential mark block retrieving the first space successively, if had, data are write the data block that this byte is corresponding, after having write, then the mark byte of this data block can turn into the mark that namely it is carried out new data by 0XA0, changes the byte of the former 0XA0 of being designated into 0X00 simultaneously and carries out old data mark, after completing, with same operating method, same write operation is done in its mirror image space.
The above is only the preferred embodiment of the present invention; it is noted that for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (4)

1. a television board flash memory data processing method, it is characterized in that: flash memory space is divided into a read-only space, two read-write spaces, described read-only space for storing read-only program, the size in described read-only space be described read-only program by block get whole after size; The data that the first read-write space in two read-write spaces is seldom modified for storing, the size in described first read-write space be the described data being seldom modified by block get whole after the twice of size, the data that 2nd read-write space is often modified for storing, the size in described 2nd read-write space is remain space in described flash memory;
For read-only space, before television board dispatches from the factory, just read-only data is write read-only space;
For the first read-write space, first read-write space is divided into the first space and mirror image space, saving the first character in the first space and mirror image space as mark byte, described mark byte writes corresponding to data erase, the data in space, completes write operation;
For the 2nd read-write space, 2nd read-write space is divided into the first space and mirror image space, first space and mirror image space are divided into some data blocks and a mark block, byte number shared by described mark block is the number of institute's divided data block, in described mark block, the corresponding each data block of each byte is stored the state of data, and each byte in described mark block writes with data erase, the data corresponding to corresponding each data block space, completes to write, be changed to the operation of old data;
The process carrying out data write operation to described first read-write space is as follows:
(1) the mark byte in the first space is revised as data erase mark, the first space data in erasing first read-write space;
(2) the mark byte in the first space is revised as data and is writing mark, in the first space, write data;
(3), after data have write, the mark byte in the first space has been revised as write mark;
(4) mirror image space is carried out above-mentioned identical write operation,
The process carrying out data reading operation from described first read-write space is as follows:
(1) identifier reading the first space, whether corresponding to completing write mark, in this way, then reads the first space data, otherwise
(2) data in mirror image space are read;
The process carrying out data write operation to described 2nd read-write space is as follows:
(1) mark whether each mark in the mark block in the first space exists corresponding data erasing is retrieved, if any, corresponding mark in mark block is then revised as data writing and identify and write data, after having write, correspondence in mark block is identified and has been revised as write mark, be changed to old data mark by all the other mark blocks in the first space completing to write identify all to change into, then the mirror image space of correspondence is carried out same operation, such as nothing, then
(2) mark in mark block is all revised as data erase mark, the data in the first space are all wiped, change correspondence mark into data to write, first data block in the first space writes data, after having write, just corresponding mark has changed write mark into, and mirror image space carries out above-mentioned identical write operation;
The process carrying out data reading operation from described 2nd read-write space is as follows:
(1) whether read the mark in the mark block in the first space corresponding to completing write mark, in this way, then read the data in the data block of this mark correspondence, otherwise
(2) data in data block corresponding in mirror image space are read.
2. television board flash memory data processing method according to claim 1, it is characterised in that: after described read-only space write data, carry out write-protect operation.
3. television board flash memory data processing method according to claim 1 and 2, it is characterised in that: described data erase, data write, complete write, correspondence mark is represented by byte 0XFF, 0XAA, 0XA0,0X00 respectively to be changed to old data.
4. television board flash memory data processing method according to claim 1 and 2, it is characterised in that: preamble, master routine are deposited in described read-only space; Program storage information, factory's parameter are deposited in described first read-write space; Information-setting by user, analog quantity adjustment data are deposited in described 2nd read-write space.
CN201610036115.5A 2016-01-20 2016-01-20 Television board flash memory data processing method Active CN105657508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610036115.5A CN105657508B (en) 2016-01-20 2016-01-20 Television board flash memory data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610036115.5A CN105657508B (en) 2016-01-20 2016-01-20 Television board flash memory data processing method

Publications (2)

Publication Number Publication Date
CN105657508A true CN105657508A (en) 2016-06-08
CN105657508B CN105657508B (en) 2018-08-07

Family

ID=56487642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610036115.5A Active CN105657508B (en) 2016-01-20 2016-01-20 Television board flash memory data processing method

Country Status (1)

Country Link
CN (1) CN105657508B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030084152A1 (en) * 2001-10-30 2003-05-01 Chung Keicy K. Read-only storage device having network interface, a system including the device, and a method of distributing files over a network
CN101089830A (en) * 2006-06-16 2007-12-19 亮发科技股份有限公司 Memory device and its operation method
US20090106480A1 (en) * 2007-10-23 2009-04-23 Keicy Chung Computer storage device having separate read-only space and read-write space, removable media component, system management interface, and network interface
CN101504711A (en) * 2009-03-26 2009-08-12 北京鼎普科技股份有限公司 Movable storage device and method for controlling computer data downloading

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030084152A1 (en) * 2001-10-30 2003-05-01 Chung Keicy K. Read-only storage device having network interface, a system including the device, and a method of distributing files over a network
CN101089830A (en) * 2006-06-16 2007-12-19 亮发科技股份有限公司 Memory device and its operation method
US20090106480A1 (en) * 2007-10-23 2009-04-23 Keicy Chung Computer storage device having separate read-only space and read-write space, removable media component, system management interface, and network interface
CN101504711A (en) * 2009-03-26 2009-08-12 北京鼎普科技股份有限公司 Movable storage device and method for controlling computer data downloading

Also Published As

Publication number Publication date
CN105657508B (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN100424655C (en) Method for managing flash memory
CN101937319B (en) Memory systems and mapping methods thereof
CN1902599B (en) Method for updating data in non-volatile memory systems and operating the non-volatile memory systems system
CN102135942B (en) Method for realizing wear-leveling in storage equipment as well as the storage equipment
CN105740163A (en) Nand Flash bad block management method
CN101640069B (en) Average wear method and average wear system for flash memory
CN101334758B (en) Device and method for embedded system expanding memory space
CN101630233B (en) Data access method used for flash memory, storage system and controller
CN102831072A (en) Flash memory device, and management method, data read-write method and data read-write device thereof
CN103294615A (en) Method for storing user information of set top box
CN103996412A (en) Power-fail protection method applied to intelligent-card nonvolatile memories
CN1936866A (en) Flash memory body storing mechanism with data restoring function
CN101408864B (en) Data protection method for current failure and controller using the same
CN101425338B (en) Writing method for nonvolatile memory and controller using the method
CN101699476A (en) Data processing method and device of smart cards
CN103488710A (en) Efficient-storage unsteady data structure for big data pages
CN101661431B (en) Block management method for flash memory, flash storage system and controller
CN101527169A (en) Data write-in method for flash memory and controller thereof
CN102541753B (en) A kind of read-write optimization method of in-line memory
CN102592670A (en) Data writing method, memory controller and memory storage device
CN103309619A (en) NAND Flash memory data storage method
CN103218300B (en) Data processing method, Memory Controller and memorizer memory devices
CN101303667B (en) Method and device for establishing magnetic disk null cluster table and seeking magnetic disk null cluster
CN102981975A (en) Management method of flash data and system thereof
CN107341049B (en) Transaction optimization processing method and 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
GR01 Patent grant
GR01 Patent grant