CN114237506B - Method for storing and reading/writing EMMC data - Google Patents

Method for storing and reading/writing EMMC data Download PDF

Info

Publication number
CN114237506B
CN114237506B CN202111527024.9A CN202111527024A CN114237506B CN 114237506 B CN114237506 B CN 114237506B CN 202111527024 A CN202111527024 A CN 202111527024A CN 114237506 B CN114237506 B CN 114237506B
Authority
CN
China
Prior art keywords
data
partition
writing
reading
read
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
CN202111527024.9A
Other languages
Chinese (zh)
Other versions
CN114237506A (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202111527024.9A priority Critical patent/CN114237506B/en
Publication of CN114237506A publication Critical patent/CN114237506A/en
Application granted granted Critical
Publication of CN114237506B publication Critical patent/CN114237506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0626Reducing size or complexity of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention relates to a memory of intelligent household appliances, and discloses a method for storing and reading and writing EMMC data, which is implemented on an intelligent television without an EEPROM memory, realizes the storage function of the original EEPROM through the data storage and the reading and writing of the EMMC, ensures the reliability, the stability and the consistency of the data storage and the reading and writing, and reduces the quality risk. The invention stores the corresponding key data in EMMC, divides the special storage space, divides the storage space into a plurality of items according to frequency and data use, MAPs MAP with EEPROM data, and divides a main partition and a backup partition when dividing the special partition in order to prevent data errors, wherein the sizes of the two partitions are the same, and the internal data MAP is the same. In addition, the invention also provides a data reading, data writing and data checking scheme, which ensures the reliability, stability and consistency of data storage and reading and writing and reduces the quality risk.

Description

Method for storing and reading/writing EMMC data
Technical Field
The invention relates to a memory of intelligent household appliances, in particular to a method for storing and reading/writing EMMC (embedded multimedia card) data.
Background
With the development of intelligent televisions, the requirements of users for purchasing large-screen computers are increased obviously, so that the purchasing threshold is reduced, the product competitiveness is improved, and each television manufacturer controls the cost as a first thing competing with other competing products. In the prior art, in the aspect of using the memory of the smart television, most manufacturers use a data storage combination of emmc+eeprom, the EEPROM is used for storing KEY data such as MAC, KEY, screen parameter, deviceID, etc., and the EMMC is used for dividing and storing a plurality of partition data such as BOOT, SYSTEM, DATA, etc. EEPROM is 4K in size and occupies a small data space, but is not inexpensive. The EMMC has the functions of data storage and reading and writing, the data reliability and stability of the EMMC are verified in production and use, the residual space of the partitioned partition is large, and the storage and reading and writing functions of the EEPROM can be completely and independently partitioned to replace the storage and reading and writing functions of the EEPROM, so that the hardware cost of the intelligent television is saved.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the method for storing and reading and writing the EMMC data is realized on the intelligent television without the EEPROM memory, the storage function of the original EEPROM is realized through the data storage and the reading and writing of the EMMC, the reliability, the stability and the consistency of the data storage and the reading and writing are ensured, and the quality risk is reduced.
The technical scheme adopted for solving the technical problems is as follows:
the method for storing and reading and writing EMMC data is applied to a smart television with EEPROM memory removed and EMMC replaced, and comprises the following steps:
storage space allocation: dividing two partitions which are specially used for storing EEPROM data in the EMMC, wherein the two partitions have the same size, one partition is a main partition, and the other partition is a backup partition; dividing the main and spare areas into a plurality of items with the same number;
data mapping: MAP mapping is carried out on item and EEPROM data in the main and standby partitions;
reading data: when reading data, firstly reading the data from the main partition, successfully returning the data, if the data is read from the backup partition again after the data is read, synchronizing the data to the main partition after the data is read successfully, and if the data is read from the backup partition, returning error printing;
and (3) data writing: when writing data, the main partition and the backup partition write data simultaneously, the writing identification bit is set to be 0 before writing, and after the main partition and the backup partition write data, the writing identification bit is set to be 1;
and (3) data verification: reading the writing identification bit when starting up, and if the writing identification bit is 1, indicating that the data writing of the main partition and the backup partition is successful; if the writing identification bit is 0, the data of the main partition and the data of the backup partition are respectively read, and if the reading of the main partition is successful and the reading of the backup partition is failed, the data of the main partition is synchronized to the backup partition; if the main partition fails to read, the backup partition is successfully read, and the backup partition data is synchronized to the main partition; and if the primary partition and the backup partition are failed to be read, returning to the error printing.
Specifically, the EEPROM data is system data that cannot be changed by a user, and includes: KEY data such as MAC, KEY, screen, deviceID, etc.
As a further optimization, the main partition and the backup partition are both 2M in size, each partition is divided into 32 items, and 1 item is 64K in size.
As a further optimization, when MAP mapping is performed on item and EEPROM data, common data is placed in one item according to the read-write frequency and the use of the data, and unused item is used as reserved expandable data.
As further optimization, the data in the main partition and the backup partition are read and written according to a Block whole Block.
The beneficial effects of the invention are as follows:
the invention can utilize EMMC to realize the storage function of the original EEPROM, save the cost of EEPROM devices, improve the competitiveness of the product, fully utilize EMMC space, read and write or expand EMMC data, and the read and write data is stable and reliable, and has quick response speed.
Drawings
Fig. 1 is a flow chart of EMMC storage space allocation in an embodiment;
fig. 2 is an EMMC data MAP in an embodiment;
FIG. 3 is a read data flow diagram in an embodiment;
FIG. 4 is a write data flow diagram in an embodiment;
FIG. 5 is a flow chart of data verification in an embodiment.
Detailed Description
The invention aims to provide a method for storing and reading and writing EMMC data, which is realized on an intelligent television without an EEPROM memory, realizes the storage function of the original EEPROM through the data storage and the reading and writing of the EMMC, ensures the reliability, the stability and the consistency of the data storage and the reading and writing, and reduces the quality risk.
The core idea is as follows: based on the EMMC having the same data storage and read-write functions, the data reliability and stability thereof have been verified in production and use, and the divided partitions have a large remaining space, so that the consideration of the storage and read-write functions of the EEPROM can be completely divided alone, the present invention stores the corresponding key data in the EMMC, divides the storage space into a plurality of items by dividing the dedicated storage space and dividing the storage space into a plurality of items according to frequency and data use, MAP-MAPs with the EEPROM data, and in order to prevent data errors, when dividing the dedicated partition, divides one main partition and backup partition, the two partitions have the same size, and the internal data MAP is the same. In addition, the invention also provides a data reading, data writing and data checking scheme, which ensures the reliability, stability and consistency of data storage and reading and writing and reduces the quality risk.
Examples:
the EMMC sizes we use currently are 8G/16G/32G/64G/128G, etc., EMMC must be erased in blocks (blocks), while EEPROM can be erased only one Byte at a time. The current Block size of the EMMC is 512Byte, and in order to better map Byte data in the EEPROM into the EMMC, the EMMC places commonly used data into one item according to the read-write frequency and the application of the data, and the size of each item is 64K.
As shown in fig. 1, two partitions are added to the EMMC, both of which are 2M in size and identical to the internal data MAP. One is the primary partition, and in order to prevent data errors, a backup partition is added. The two partitions are specially used for storing EEPORM data by the system, and neither upgrade nor power down affects the two partitions.
As shown in FIG. 2, since the EEPROM can be read and written in bytes and the EMMC is read and written in blocks, the data in the EEPROM is recombined, the EMMC is divided into a plurality of items according to frequency and data use, each item is 64K, the 2M partition can be divided into 32 items, 17 items are allocated in FIG. 2, and the rest of the items are reserved, so that the expansion of the following data is convenient. 1 item is larger in space and if not used up, new data can be added inside this item.
As shown in FIG. 3, the flow of reading data requires reading data from the main partition, returning data after successful reading, and reading data from the backup partition after unsuccessful reading, for example, synchronizing data to the main partition after successful reading, for example, returning error printing after unsuccessful reading.
As shown in fig. 4, the flow of writing data requires that both the main partition and the backup partition write data simultaneously, in order to prevent that the data is not written completely under the condition of power failure, an identification bit is set to 0 before writing, and the identification bit is reset to 1 after the writing of the main partition and the backup partition is completed, so that whether the writing action is performed or not can be judged through the identification bit.
As shown in fig. 5, the verification process of the data will acquire the identification bit of the data interface read and write data when the data is started, if the identification bit is 1, it indicates that the writing of the main partition and the backup partition is successful, and returns verification success information. If the read write data identification bit is 0, there are three cases: firstly, if the main partition is successfully read and the backup partition is failed to be read, the data of the main partition is synchronized to the backup partition; secondly, if the main partition fails to read and the backup partition succeeds in reading, the backup partition data is synchronized to the main partition; third, if the primary partition and the backup partition are both failed to read, the error printing is returned.

Claims (5)

1. The method for storing and reading and writing the EMMC data is applied to a smart television with EEPROM memory removed and replaced by EMMC, and is characterized by comprising the following steps:
storage space allocation: dividing two partitions which are specially used for storing EEPROM data in the EMMC, wherein the two partitions have the same size, one partition is a main partition, and the other partition is a backup partition; dividing the main and spare areas into a plurality of items with the same number;
data mapping: MAP mapping is carried out on item and EEPROM data in the main and standby partitions;
reading data: when reading data, firstly reading the data from the main partition, successfully returning the data, if the data is read from the backup partition again after the data is read, synchronizing the data to the main partition after the data is read successfully, and if the data is read from the backup partition, returning error printing;
and (3) data writing: when writing data, the main partition and the backup partition write data simultaneously, the writing identification bit is set to be 0 before writing, and after the main partition and the backup partition write data, the writing identification bit is set to be 1;
and (3) data verification: reading the writing identification bit when starting up, and if the writing identification bit is 1, indicating that the data writing of the main partition and the backup partition is successful; if the writing identification bit is 0, the data of the main partition and the data of the backup partition are respectively read, and if the reading of the main partition is successful and the reading of the backup partition is failed, the data of the main partition is synchronized to the backup partition; if the main partition fails to read, the backup partition is successfully read, and the backup partition data is synchronized to the main partition; and if the primary partition and the backup partition are failed to be read, returning to the error printing.
2. A method of EMMC data storage and reading and writing, as claimed in claim 1,
the EEPROM data is system data which cannot be changed by a user, and comprises: MAC, KEY, screen, deviceID KEY data.
3. A method of EMMC data storage and reading and writing, as claimed in claim 1,
the main partition and the backup partition are 2M in size, each partition is divided into 32 items, and the size of 1 item is 64K.
4. A method for storing and reading EMMC data according to claim 3,
when MAP mapping is performed on items and EEPROM data, common data is placed in one item according to the read-write frequency and the use of the data, and unused items are used as reserved expandable data.
5. A method of EMMC data storage and read-write according to any one of claims 1 to 4, characterized in that,
and the data in the main partition and the backup partition are read and written according to the Block whole Block.
CN202111527024.9A 2021-12-14 2021-12-14 Method for storing and reading/writing EMMC data Active CN114237506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111527024.9A CN114237506B (en) 2021-12-14 2021-12-14 Method for storing and reading/writing EMMC data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111527024.9A CN114237506B (en) 2021-12-14 2021-12-14 Method for storing and reading/writing EMMC data

Publications (2)

Publication Number Publication Date
CN114237506A CN114237506A (en) 2022-03-25
CN114237506B true CN114237506B (en) 2023-05-02

Family

ID=80755777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111527024.9A Active CN114237506B (en) 2021-12-14 2021-12-14 Method for storing and reading/writing EMMC data

Country Status (1)

Country Link
CN (1) CN114237506B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116825175B (en) * 2023-05-29 2024-02-23 珠海妙存科技有限公司 eMMC consistency testing method, controller and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069381A (en) * 2015-08-03 2015-11-18 惠州Tcl移动通信有限公司 Intelligent terminal based partition protection method and system
CN105302679A (en) * 2015-11-03 2016-02-03 惠州Tcl移动通信有限公司 Detection method and system for intelligent terminal storage stability
CN107832637A (en) * 2017-11-20 2018-03-23 丹东瑞银科技有限公司 EMMC and EMMC subregion Write-protection method
CN111367468A (en) * 2018-12-26 2020-07-03 爱思开海力士有限公司 Memory system and operating method thereof
CN111552498A (en) * 2020-05-20 2020-08-18 广州通达汽车电气股份有限公司 Method and system for realizing screen parameter upgrading of display screen
CN111885420A (en) * 2020-07-31 2020-11-03 深圳创维-Rgb电子有限公司 Standby protection method and device, smart television and readable storage medium
CN112306368A (en) * 2019-07-24 2021-02-02 青岛海信传媒网络技术有限公司 Method and device for expanding user data partition by EMMC (enhanced multi-media card)
CN112540779A (en) * 2020-12-08 2021-03-23 深圳创维-Rgb电子有限公司 Local dimming method for display device, display device and storage medium
CN112565891A (en) * 2020-12-10 2021-03-26 四川长虹电器股份有限公司 Secret key burning and secret key matching method based on different storage devices of smart television

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11934680B2 (en) * 2020-02-06 2024-03-19 Arris Enterprises Llc Systems and methods for booting from NAND flash using squashfs to maximize memory

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069381A (en) * 2015-08-03 2015-11-18 惠州Tcl移动通信有限公司 Intelligent terminal based partition protection method and system
CN105302679A (en) * 2015-11-03 2016-02-03 惠州Tcl移动通信有限公司 Detection method and system for intelligent terminal storage stability
CN107832637A (en) * 2017-11-20 2018-03-23 丹东瑞银科技有限公司 EMMC and EMMC subregion Write-protection method
CN111367468A (en) * 2018-12-26 2020-07-03 爱思开海力士有限公司 Memory system and operating method thereof
CN112306368A (en) * 2019-07-24 2021-02-02 青岛海信传媒网络技术有限公司 Method and device for expanding user data partition by EMMC (enhanced multi-media card)
CN111552498A (en) * 2020-05-20 2020-08-18 广州通达汽车电气股份有限公司 Method and system for realizing screen parameter upgrading of display screen
CN111885420A (en) * 2020-07-31 2020-11-03 深圳创维-Rgb电子有限公司 Standby protection method and device, smart television and readable storage medium
CN112540779A (en) * 2020-12-08 2021-03-23 深圳创维-Rgb电子有限公司 Local dimming method for display device, display device and storage medium
CN112565891A (en) * 2020-12-10 2021-03-26 四川长虹电器股份有限公司 Secret key burning and secret key matching method based on different storage devices of smart television

Also Published As

Publication number Publication date
CN114237506A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN108052655B (en) Data writing and reading method
CN108874298B (en) Data storage method and device
CN114237506B (en) Method for storing and reading/writing EMMC data
CN102024502A (en) Flash device testing method and device as well as board and network equipment
WO2018145392A1 (en) Differential update method and device, terminal, storage medium, and processor
CN109683983B (en) Method and equipment for generating and loading mirror image file
CN110286853A (en) A kind of method for writing data and device, computer readable storage medium
CN109685190B (en) Power-down protection method and device for IC card
CN105138284A (en) Virtual machine disk mirror image synchronization operation optimization system and method
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
CN102075710B (en) Starting operation method for television and television
CN110837387B (en) Portable power source leasing system, automatic revenue collecting system and updating method thereof
CN106598548A (en) Solution method and device for read-write conflict of storage unit
CN106354718B (en) File management method and device of user identification module
CN103425436A (en) Terminal equipment and virtual storage unit management method
CN107148612B (en) Method and device for expanding user partition
CN111400248B (en) Method for writing data and recovering data and file system
CN201869296U (en) Television
CN103970683A (en) Method for accelerating starting of USB flash disk
CN107908500B (en) Bad block identification method and device
CN104133640A (en) Quick recovery from dormancy
CN103578566A (en) Memory storage apparatus and restoration method thereof
CN116072202A (en) Storage device management method, system and storage medium
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
CN114490172A (en) Data storage system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant