CN105657508B - Television board flash memory data processing method - Google Patents
Television board flash memory data processing method Download PDFInfo
- Publication number
- CN105657508B CN105657508B CN201610036115.5A CN201610036115A CN105657508B CN 105657508 B CN105657508 B CN 105657508B CN 201610036115 A CN201610036115 A CN 201610036115A CN 105657508 B CN105657508 B CN 105657508B
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/426—Internal components of the client ; Characteristics thereof
- H04N21/42692—Internal 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 Semiconductors data technical field of memory, disclose a kind of television board flash memory data processing method, flash memory space is divided into a read-only space, two read-write spaces, the read-only space is for storing a reader, the first read-write space in two read-write spaces is for storing the data seldom changed, second read-write space is for storing the data often changed, two read-write spaces are divided into identical first space and mirror image space, identical data are stored respectively, the normal use of data when for reading and writing exception.The present invention is realized when occurring abnormal in user operation process, is effectively protected, is not will produce after re-powering to legacy data, exception or crash phenomenon occurs.
Description
Technical field
The invention belongs to Semiconductors data technical field of memory, especially a kind of television board flash memory data processing method.
Background technology
In recent years, during which LCD TV whether signal processing or operation and control widely applies digital signal to be grasped
Make, especially close a period of time internet is permeated to television terminal, and smart television can become the master in market in the near future
Stream so that human-computer interaction probability greatly improves, thus it is very huge in machine internal data treating capacity, and television set board is related
Program and real-time processing data are largely stored in a piece of flash memory(Flash)In chip, these data are in user operation process
In can carry out real-time update, and Flash chip storage is usually to be operated with module unit.Write-in has to corresponding piece first
All data first wipe after new data could be written, so if not protected to this partial data, grasped in user
Make in improper or operation in the case of power down, to re-power, since this partial data has been wiped free of, can cause misprogramming or
Crash phenomenon.
Invention content
In order to solve the above technical problem, the present invention provides a kind of television board flash memory data processing methods, pass through change
The read-write mode of flash memory, cope with read-write operation exception when crash phenomena such as.
The technical solution adopted by the present invention is that:
A kind of television board flash memory data processing method, characterized in that flash memory space is divided into read-only space, two
A read-write space, for storing a reader, the size in the read-only space is that a reader presses block in the read-only space
Size after rounding;The first read-write space in two read-write spaces is for storing the data seldom changed, first read-write
The size in space is the data seldom changed by twice of the size after block rounding, and the second read-write space is passed through for storing
The size of the data often changed, second read-write space is remaining space in the flash memory;
Read-only space just is written by read-only data before television board manufacture for read-only space;
For the first read-write space, the first read-write space is divided into the first space and mirror image space, by the first space and
The first character section in mirror image space is as identification byte, and the identification byte corresponds to the data erasing in space, data are being write
Enter, completes write operation;
For the second read-write space, the second read-write space is divided into the first space and mirror image space, by the first space and
Mirror image space is divided into several data blocks and a home block, byte number shared by the home block for institute's divided data block number,
Each byte corresponds to the state of the stored data of each data block in the home block, described mark each byte in the block with
Corresponding to corresponding each data block space data erasing, data are currently written into, completions is written, be changed to legacy data operate;
The process that data write operation is carried out to first read-write space is as follows:
(1)The identification byte in the first space is revised as data erasing mark, first space in the first read-write of erasing space
Data;
(2)The identification byte in the first space is revised as data and is currently written into mark, data are written in the first space;
(3)After the completion of data write-in, the identification byte in the first space is revised as to complete write-in mark;
(4)Above-mentioned identical write operation is carried out to mirror image space,
The process that data reading operation is carried out from first read-write space is as follows:
(1)Whether the identifier for reading the first space corresponds to completion write-in mark, if so, then reading the first space number
According to otherwise
(2)Read the data in mirror image space;
The process that data write operation is carried out to second read-write space is as follows:
(1)It retrieves and is respectively identified whether in the home block in the first space there are the mark that corresponding data is wiped, if any then by mark
Know corresponding mark in the block and be revised as data and be currently written into mark and data are written, after the completion of write-in, correspondence in the block will be identified
Mark is revised as completing write-in mark, and write-in mark will be completed in remaining home block in the first space and is changed to be changed to legacy data
Mark, then corresponding mirror image space is similarly operated, such as nothing, then
(2)Mark in the block will be identified and be revised as data erasing mark, the data in the first space are all wiped, it will be right
It should identify and be changed to data and be currently written into, data are written in first data block in the first space, it, will be by correspondence after the completion of write-in
Mark is changed to complete write-in mark, and carries out above-mentioned identical write operation to mirror image space;
The process that data reading operation is carried out from second read-write space is as follows:
(1)Read the first space mark it is in the block identify whether correspond to complete write-in mark, if so, then reading the mark
Know corresponding data data in the block, otherwise
(2)Read corresponding data data in the block in mirror image space.
Further, after the read-only space write-in data, write-protect operation is carried out.
Further, the data are wiped, data are currently written into, completion is written, are changed to legacy data correspondence mark leads to respectively
Byte 0XFF, 0XAA, 0XA0,0X00 is crossed to indicate.
Further, the read-only space storage bootstrap, main program;First read-write space storage program storage letter
Breath, factory parameters;Second read-write space storage information-setting by user, analog quantity adjust data.
The beneficial effects of the invention are as follows:
When occurring abnormal in user operation process, legacy data is effectively protected, not will produce and re-power
Afterwards, there is exception or crash phenomenon.
Description of the drawings
Attached drawing 1 is the modular construction schematic diagram of the present invention.
Specific implementation mode
It elaborates below in conjunction with the accompanying drawings to the specific implementation mode of television board flash memory data processing method of the present invention.
Flash memory space is divided into a read-only space, two read-write spaces, the read-only space is for storing read-only journey
The size of sequence, the read-only space is that a reader presses the size after block rounding;First read-write in two read-write spaces is empty
Between for storing the data seldom changed, the size in first read-write space is that the data seldom changed are taken by block
Twice of size after whole, the second read-write space is for storing the data often changed, the size in second read-write space
For remaining space in the flash memory.
Read-only space just is written by read-only data before television board manufacture for read-only space;And by it is read-only it is empty into
Row write protection operation.For storing the read-only datas such as bootstrap, main program.
For the first read-write space, the first read-write space is divided into the first space and mirror image space, by the first space and
The first character section in mirror image space is as identification byte, and the identification byte corresponds to the data erasing in space, data are being write
Enter, completes write operation.First read-write space is used to store the data such as program storage information, the factory parameters seldom read and write.
For the second read-write space, the second read-write space is divided into the first space and mirror image space, by the first space and
Mirror image space is divided into several data blocks and a home block, byte number shared by the home block for institute's divided data block number,
Each byte corresponds to the state of the stored data of each data block in the home block, described mark each byte in the block with
Corresponding to corresponding each data block space data erasing, data are currently written into, completions is written, be changed to legacy data operate,
The data that second read-write space storage information-setting by user, analog quantity adjustment etc. are often changed.
The process that data write operation is carried out to first read-write space is as follows:
(1)The identification byte in the first space is revised as data erasing mark, first space in the first read-write of erasing space
Data;
(2)The identification byte in the first space is revised as data and is currently written into mark, data are written in the first space;
(3)After the completion of data write-in, the identification byte in the first space is revised as to complete write-in mark;
(4)Above-mentioned identical write operation is carried out to mirror image space.
The process that data reading operation is carried out from first read-write space is as follows:
(1)Whether the identifier for reading the first space corresponds to completion write-in mark, if so, then reading the first space number
According to otherwise
(2)Read the data in mirror image space.
The process that data write operation is carried out to second read-write space is as follows:
(1)It retrieves and is respectively identified whether in the home block in the first space there are the mark that corresponding data is wiped, if any then by mark
Know corresponding mark in the block and be revised as data and be currently written into mark and data are written, after the completion of write-in, correspondence in the block will be identified
Mark is revised as completing write-in mark, and write-in mark will be completed in remaining home block in the first space and is changed to be changed to legacy data
Mark, then corresponding mirror image space is similarly operated, such as nothing, then
(2)Mark in the block will be identified and be revised as data erasing mark, the data in the first space are all wiped, it will be right
It should identify and be changed to data and be currently written into, data are written in first data block in the first space, it, will be by correspondence after the completion of write-in
Mark is changed to complete write-in mark, and carries out above-mentioned identical write operation to mirror image space.
The process that data reading operation is carried out from second read-write space is as follows:
(1)Read the first space mark it is in the block identify whether correspond to complete write-in mark, if so, then reading the mark
Know corresponding data data in the block, otherwise
(2)Read corresponding data data in the block in mirror image space.
Referring to attached drawing 1, below the present invention will be described in detail.
The data being stored in Flash are classified first:1, unchangeable data in operating;2, infrequently by
Change data;3, often by modification data.
Flash is subjected to subregion and protection, 1, be divided into three spaces for storing above-mentioned three kinds of data and store respectively respectively
Corresponding data, 2, would not allow for being changed data space and the data of period are protected with write-protect software, main control unit
Read operation can only be carried out to the data in this space, the data in the space cannot be rewritten.3, it will infrequently be repaiied
Change the space of data and the data space often changed respectively carry out being divided into again the first space of 2 an equal amount of spaces and
Mirror image space.
Infrequently by 2 times (by after BLOCK roundings) that the space of modification data is actual amount of data, the first space and mirror image
Space size is with practical programs sizableness, and storage data structure is identification byte+real data, after identification byte is for identifying
The state of face data is wiped free of with 0XFF, 0XAA, 0XA0 respectively as the data(It is not written), data are currently written into, are completed
New data(Latest data)State..
The first space of 2 spaces and mirror image space are often divided by the space of modification data, depending on actual amount of data
Each space is divided into N number of data block and a home block by size, and each data block size is the same as actual amount of data size phase
When home block has N number of byte, each byte to be corresponding in turn to a data block for the data mode in identification data block.With 4 kinds
Respectively block data mode, i.e. 0XFF, 0XAA, 0XA0,0X00 are wiped free of different Data Identifications as data(It is not written), number
According to being currently written into, new data is completed(Latest data)And data are changed to 4 kinds of status indicators of legacy data.
Main control unit is to infrequently by modification data and when being often read by modification data, preferentially accessing
Whether one space, index flag have latest data, and if any the data for being identified as latest data are then read, such as no discovery is newest
Data Identification then accesses its mirror image space, retrieves it and is identified as the data of latest data and is read out.
Main control unit carries out write operation to the data infrequently changed, preferentially to all former data in the first space into
Row erasing, write-in simultaneously according to process modified logo byte status, after the completion of write-in, in the same way to its mirror image space into
Row write enters, such as data be written the first steric course occur power down unusual condition, lead to that completion could not be write data into, then its
Flag bit is not just 0XA0 marks,, would not be in the first sky when main control unit is read out this partial data after re-powering
Between retrieve the byte, then arrive mirror image spatial retrieval automatically, go to read the data in mirror image space as latest data.Ibid,
Whether when main control unit carries out write operation to the data often changed, preferentially retrieving successively in the home block in the first space has
0XFF bytes, if there is then writing data into the corresponding data block of the byte, after the completion of write-in, then the identification byte of the data block
It can become 0XA0 and carry out the mark of new data to it, while the former byte for being identified as 0XA0 is changed to 0X00 and carries out legacy data mark
Know, after the completion, same write operation is done to its mirror image space with same mode of operation.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
Member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications also should be regarded as
Protection scope of the present invention.
Claims (4)
1. a kind of television board flash memory data processing method, it is characterised in that:Flash memory space is divided into read-only space, two
A read-write space, for storing a reader, the size in the read-only space is that a reader presses block in the read-only space
Size after rounding;The first read-write space in two read-write spaces is for storing the data seldom changed, first read-write
The size in space is the data seldom changed by twice of the size after block rounding, and the second read-write space is passed through for storing
The size of the data often changed, second read-write space is remaining space in the flash memory;
Read-only space just is written by read-only data before television board manufacture for read-only space;
For the first read-write space, the first read-write space is divided into the first space one and mirror image space one, by the first space one
For first character section with mirror image space one as identification byte, the identification byte is corresponding to the data erasing in space, data just
It is being written, is completing write operation;
For the second read-write space, the second read-write space is divided into the first space two and mirror image space two, by the first space two
It is divided into several data blocks and a home block with mirror image space two, byte number is a of institute's divided data block shared by the home block
It counts, each byte corresponds to the state of the stored data of each data block, described mark each word in the block in the home block
Section is wiped with the data corresponding to corresponding each data block space, data are currently written into, completion is written, is changed to legacy data behaviour
Make;
The process that data write operation is carried out to first read-write space is as follows:
(1)The identification byte in the first space one is revised as data erasing mark, first space one in the first read-write of erasing space
Data;
(2)The identification byte in the first space one is revised as data and is currently written into mark, data are written in the first space one;
(3)After the completion of data write-in, the identification byte in the first space one is revised as to complete write-in mark;
(4)Write operation is carried out to mirror image space one, the step of write operation and above-mentioned steps(1)Extremely(3)In to first space
The step of one write operation, is identical;
The process that data reading operation is carried out from first read-write space is as follows:
(1)Whether the identifier for reading the first space one corresponds to completion write-in mark, if so, then reading the first space one number
According to otherwise
(2)Read the data in mirror image space one;
The process that data write operation is carried out to second read-write space is as follows:
(1)It retrieves and is respectively identified whether in the home block in the first space two there are the mark that corresponding data is wiped, if any then by mark
Corresponding mark in the block is revised as data and is currently written into mark and data are written, and after the completion of write-in, will identify corresponding mark in the block
Knowledge is revised as completing write-in mark, and write-in mark will be completed in remaining home block in the first space two and is changed to be changed to legacy data
Mark, then corresponding mirror image space two is similarly operated, such as nothing, then
(2)Mark in the block will be identified and be revised as data erasing mark, the data in the first space two are all wiped, will be corresponded to
Mark is changed to data and is currently written into, and data are written in first data block in the first space two, will be by correspondence after the completion of write-in
Mark is changed to complete write-in mark, and carries out write operation, write operation step and above-mentioned steps to mirror image space two(1)、(2)In it is right
It is identical that first space two carries out the step of write operation;
The process that data reading operation is carried out from second read-write space is as follows:
(1)Read the first space two mark it is in the block identify whether correspond to complete write-in mark, if so, then reading the mark
Corresponding data data in the block, otherwise
(2)Read corresponding data data in the block in mirror image space two.
2. television board flash memory data processing method according to claim 1, it is characterised in that:The read-only space write-in
After data, write-protect operation is carried out.
3. television board flash memory data processing method according to claim 1 or 2, it is characterised in that:The data erasing,
Data, which are currently written into, completion is written, are changed to legacy data corresponds to mark respectively by byte 0XFF, 0XAA, 0XA0,0X00 table
Show.
4. television board flash memory data processing method according to claim 1 or 2, it is characterised in that:The read-only space
Store bootstrap, main program;First read-write space storage program storage information, factory parameters;Second read-write is empty
Between storage information-setting by user, analog quantity adjust data.
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 CN105657508A (en) | 2016-06-08 |
CN105657508B true 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 (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101089830A (en) * | 2006-06-16 | 2007-12-19 | 亮发科技股份有限公司 | Memory device and its operation method |
CN101504711A (en) * | 2009-03-26 | 2009-08-12 | 北京鼎普科技股份有限公司 | Movable storage device and method for controlling computer data downloading |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7444393B2 (en) * | 2001-10-30 | 2008-10-28 | Keicy K. Chung | Read-only storage device having network interface, a system including the device, and a method of distributing files over a network |
US8769185B2 (en) * | 2007-10-23 | 2014-07-01 | Keicy Chung | Computer storage device having separate read-only space and read-write space, removable media component, system management interface, and network interface |
-
2016
- 2016-01-20 CN CN201610036115.5A patent/CN105657508B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101089830A (en) * | 2006-06-16 | 2007-12-19 | 亮发科技股份有限公司 | Memory device and its operation method |
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 |
---|---|
CN105657508A (en) | 2016-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8312554B2 (en) | Method of hiding file at data protecting mode for non-volatile memory module, memory controller and portable memory storage apparatus | |
US8335098B2 (en) | Memory device including OTP memory block and pseudo MTP memory block and memory access method | |
CN101772810B (en) | Block addressing for parallel memory arrays | |
US7725646B2 (en) | Method of using a flash memory for a circular buffer | |
CN103294615B (en) | A kind of method for storing set-top box users information | |
US8271719B2 (en) | Non-volatile memory controller device and method therefor | |
US9213631B2 (en) | Data processing method, and memory controller and memory storage device using the same | |
US20140019670A1 (en) | Data writing method, memory controller, and memory storage device | |
US8417902B2 (en) | One-time-programmable memory emulation | |
CN106598479A (en) | Method and device for fail-safe erase of flash memory | |
US9772937B2 (en) | Data processing method, memory controller and memory storage apparatus | |
CN106649144A (en) | Data storage device and operating method thereof | |
CN107402716A (en) | Method for writing data, memory control circuit unit and internal storing memory | |
TW201243593A (en) | Data writing method, memory controller and memory storage apparatus | |
US9009442B2 (en) | Data writing method, memory controller and memory storage apparatus | |
CN101408864B (en) | Data protection method for current failure and controller using the same | |
CN101295281A (en) | Memory device and method for limiting access authority of the same | |
US20190347037A1 (en) | Data storage apparatus and system information programming method therefor | |
CN103218300B (en) | Data processing method, Memory Controller and memorizer memory devices | |
US20140089566A1 (en) | Data storing method, and memory controller and memory storage apparatus using the same | |
CN105657508B (en) | Television board flash memory data processing method | |
CN106648443B (en) | Valid data merging method, Memory Controller and memory storage apparatus | |
CN109634534B (en) | Method for quickly judging capacity of memory chip | |
CN107562655B (en) | A kind of date storage method and device | |
CN108959109A (en) | Method for reading data, memorizer control circuit unit and memory storage apparatus |
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 |