CN114237506A - EMMC data storage and read-write method - Google Patents

EMMC data storage and read-write method Download PDF

Info

Publication number
CN114237506A
CN114237506A CN202111527024.9A CN202111527024A CN114237506A CN 114237506 A CN114237506 A CN 114237506A CN 202111527024 A CN202111527024 A CN 202111527024A CN 114237506 A CN114237506 A CN 114237506A
Authority
CN
China
Prior art keywords
data
partition
reading
emmc
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.)
Granted
Application number
CN202111527024.9A
Other languages
Chinese (zh)
Other versions
CN114237506B (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 an intelligent household appliance, and discloses an EMMC data storage and read-write method, which realizes the storage function of the original EEPROM on an intelligent television without an EEPROM memory through the data storage and read-write of the EMMC, ensures the reliability, stability and consistency of the data storage and read-write and reduces the quality risk. The invention stores the corresponding key data in the EMMC, carries out MAP mapping with the EEPROM data by dividing the special memory space and dividing the memory space into a plurality of items according to frequency and data use, and divides a main partition and a backup partition when dividing the special partition in order to prevent data errors, wherein the size of the two partitions is 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, so that the reliability, stability and consistency of data storage and reading and writing are ensured, and the quality risk is reduced.

Description

EMMC data storage and read-write method
Technical Field
The invention relates to a memory of an intelligent household appliance, in particular to a method for storing, reading and writing EMMC (embedded multimedia card) data.
Background
With the development of smart televisions, the screen is enlarged, the scene is changed and the quality is improved, the requirement for purchasing a large screen television by a user is increased obviously, and in order to reduce the purchasing threshold and improve the product competitiveness, each television manufacturer controls the cost as the first thing to compete with other competitive products. In the past, most manufacturers adopt a DATA storage combination of EMMC + EEPROM in terms of the use of a memory of the smart television, the EEPROM is used for storing KEY DATA such as MAC, KEY, screen parameter, DeviceID and the like, and the EMMC is used for dividing and storing a plurality of partition DATA such as BOOT, SYSTEM, DATA and the like. The EEPROM is 4K in size, occupies small data space, and is not cheap. The EMMC also has data storage and read-write functions, the data reliability and stability of the EMMC are verified in production and use, the partitioned partitions have large residual space, and the EMMC can completely and independently partition the storage and read-write functions of the EEPROM so as to save the hardware cost of the smart television.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the EMMC data storage and reading and writing method is provided, the storage function of the original EEPROM is realized through data storage and reading and writing of the EMMC on the smart television without an EEPROM memory, the reliability, stability and consistency of data storage and reading and writing are ensured, and the quality risk is reduced.
The technical scheme adopted by the invention for solving the technical problems is as follows:
an EMMC data storage and read-write method is applied to a smart television which is replaced by an EMMC by removing an EEPROM memory, and comprises the following steps:
and (3) storage space allocation: dividing two partitions 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 standby partitions into a plurality of items with the same number respectively;
data mapping: performing MAP mapping on the item and EEPROM data in the main partition and the standby partition;
data reading: when reading data, firstly reading data from the main partition, successfully reading the data and returning the data, if the reading fails, reading the data from the backup partition, and synchronizing the data to the main partition after the reading succeeds, if the reading fails, returning error printing;
data writing: when data is written, the main partition and the backup partition write data simultaneously, a write identification bit is set to be 0 before writing, and the write identification bit is set to be 1 after the main partition and the backup partition are written;
data verification: reading the writing identification bit when starting up, if the writing identification bit is 1, indicating that the data are successfully written into the main partition and the backup partition; if the write identification bit is 0, respectively reading the data of the main partition and the backup partition, and if the reading of the main partition is successful and the reading of the backup partition is failed, synchronizing the data of the main partition to the backup partition; if the main partition fails to be read and the backup partition succeeds to be read, synchronizing the backup partition data to the main partition; and if the reading of the main partition and the reading of the backup partition both fail, 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 parameter, DeviceID, etc.
As a further optimization, the size of the primary partition and the backup partition are both 2M, each partition is divided into 32 items, and 1 item is 64K in size.
As a further optimization, when MAP mapping is performed on the item and the 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 extensible data.
As further optimization, the data in the main partition and the backup partition are read and written in a whole Block according to Block.
The invention has the beneficial effects that:
the invention can utilize the EMMC to realize the storage function of the original EEPROM, thereby saving the device cost of the EEPROM, improving the product competitiveness, fully utilizing the EMMC space, reading and writing or expanding the EMMC data, and having stable and reliable read-write data and high response speed.
Drawings
FIG. 1 is a flow chart of EMMC memory space allocation in an embodiment;
FIG. 2 is an EMMC data MAP 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 the embodiment.
Detailed Description
The invention aims to provide an EMMC data storage and reading and writing method, which realizes the storage function of the original EEPROM on an intelligent television without an EEPROM memory through the data storage and reading and writing of the EMMC, ensures the reliability, stability and consistency of the data storage and reading and writing and reduces the quality risk.
The core idea is as follows: based on the fact that the EMMC also has data storage and read-write functions, the data reliability and stability of the EMMC are verified in production and use, and the residual space of the divided partitions is large, therefore, the consideration that the partitions can completely and independently replace the storage and read-write functions of the EEPROM is taken into consideration. In addition, the invention also provides a data reading, data writing and data checking scheme, so that the reliability, stability and consistency of data storage and reading and writing are ensured, and the quality risk is reduced.
Example (b):
the EMMC currently used is 8G/16G/32G/64G/128G, etc., and the EMMC must be erased in blocks (Block), while the EEPROM can be erased one Byte (Byte) at a time. The current Block size of the EMMC is 512 bytes, in order to better map Byte data in the EEPROM into the EMMC, the EMMC places commonly used data in one item according to the reading and writing frequency and the use 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 are identical to the internal data MAP. One is a main partition, and in order to prevent data errors, a backup partition is additionally added. The two partitions are dedicated to storing EEPORM data, and neither upgrading nor powering down will affect the two partitions.
As shown in fig. 2, since the EEPROM can be read and written by bytes, and the EMMC is read and written by blocks, the data in the EEPROM is now reassembled, we divide the EMMC into a plurality of items according to the frequency and data usage, each item is 64K in size, a 2M partition can be divided into 32 items, 17 items are already allocated as shown in fig. 2, and the rest are reserved to facilitate the expansion of the following data. The space of 1 item is larger, and if the space is not used up, new data can be added into the item.
As shown in FIG. 3, the flow of reading data requires reading data from the primary partition, reading the data back successfully, reading the data from the backup partition again after reading failure, synchronizing the data to the primary partition if reading is successful, and returning error printing if reading failure.
As shown in fig. 4, a flow of writing data requires that both the main partition and the backup partition write data at the same time, in order to prevent that data is not written completely in the case of power failure, an identification bit is set to 0 before writing, and the identification bit is reset to 1 after the main partition and the backup partition write completely, so that whether the write operation is completed or not can be judged by the identification bit.
As shown in fig. 5, the data verification process may obtain a data interface read write data identification bit when the computer is started, and if the identification bit is 1, it indicates that both the main partition and the backup partition are successfully written, and returns verification success information. If the read write data flag bit is 0, there are three cases: firstly, if the main partition is successfully read and the backup partition is failed to read, the data of the main partition is synchronized to the backup partition; secondly, if the reading of the main partition fails and the reading of the backup partition succeeds, the data of the backup partition is synchronized to the main partition; third, if the primary partition and the backup partition both fail to read, an error print is returned.

Claims (5)

1. An EMMC data storage and read-write method is applied to a smart television which is replaced by an EMMC instead of an EEPROM memory, and is characterized by comprising the following steps:
and (3) storage space allocation: dividing two partitions 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 standby partitions into a plurality of items with the same number respectively;
data mapping: performing MAP mapping on the item and EEPROM data in the main partition and the standby partition;
data reading: when reading data, firstly reading data from the main partition, successfully reading the data and returning the data, if the reading fails, reading the data from the backup partition, and synchronizing the data to the main partition after the reading succeeds, if the reading fails, returning error printing;
data writing: when data is written, the main partition and the backup partition write data simultaneously, a write identification bit is set to be 0 before writing, and the write identification bit is set to be 1 after the main partition and the backup partition are written;
data verification: reading the writing identification bit when starting up, if the writing identification bit is 1, indicating that the data are successfully written into the main partition and the backup partition; if the write identification bit is 0, respectively reading the data of the main partition and the backup partition, and if the reading of the main partition is successful and the reading of the backup partition is failed, synchronizing the data of the main partition to the backup partition; if the main partition fails to be read and the backup partition succeeds to be read, synchronizing the backup partition data to the main partition; and if the reading of the main partition and the reading of the backup partition both fail, returning to the error printing.
2. The EMMC data storage and read-write method of claim 1,
the EEPROM data is system data which can not be changed by a user, and comprises: KEY data such as MAC, KEY, screen parameter, DeviceID, etc.
3. The EMMC data storage and read-write method of claim 1,
the size of the main partition and the backup partition are both 2M, each partition is divided into 32 items, and the size of 1 item is 64K.
4. A method of EMMC data storage and reading and writing according to claim 3,
when MAP mapping is carried out on the item and the EEPROM data, common data are placed in one item according to the reading and writing frequency and the application of the data, and unused items are used as reserved extensible data.
5. The method of EMMC data storage and reading and writing according to any one of claims 1-4,
and the data in the main partition and the backup partition are read and written in a whole Block according to 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 true CN114237506A (en) 2022-03-25
CN114237506B 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)

Cited By (1)

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

Citations (10)

* 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
US20210247921A1 (en) * 2020-02-06 2021-08-12 Arris Enterprises Llc Systems and methods for booting from nand flash using squashfs to maximize memory

Patent Citations (10)

* 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)
US20210247921A1 (en) * 2020-02-06 2021-08-12 Arris Enterprises Llc Systems and methods for booting from nand flash using squashfs to maximize memory
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

Cited By (2)

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

Also Published As

Publication number Publication date
CN114237506B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN108052655B (en) Data writing and reading method
US7353993B2 (en) Card and host device
US20130138872A1 (en) Apparatus with a memory controller configured to control access to randomly accessible non-volatile memory
CN106155915B (en) Data storage processing method and device
CN108874298B (en) Data storage method and device
CN102024502B (en) Flash device testing method and device as well as board and network equipment
CN102999436B (en) The method and apparatus of dynamic partition information is generated in Nand flash memory
CN109683983B (en) Method and equipment for generating and loading mirror image file
CN102945179A (en) Software upgrading method and device based on memory technology device (MTD) partition
CN114237506B (en) Method for storing and reading/writing EMMC data
CN109685190B (en) Power-down protection method and device for IC card
CN110286853A (en) A kind of method for writing data and device, computer readable storage medium
CN105138284A (en) Virtual machine disk mirror image synchronization operation optimization system and method
CN114968668A (en) Data processing method and device, data access terminal and storage medium
CN110837387B (en) Portable power source leasing system, automatic revenue collecting system and updating method thereof
CN102870099B (en) Analog electrical erasable (EEE) storer and method of operating thereof
CN102075710A (en) Starting operation method for television and television
CN106354718B (en) File management method and device of user identification module
CN107148612B (en) Method and device for expanding user partition
CN103425436A (en) Terminal equipment and virtual storage unit management method
CN111400248B (en) Method for writing data and recovering data and file system
CN103970683A (en) Method for accelerating starting of USB flash disk
CN107908500B (en) Bad block identification method and device
US8370599B2 (en) Storage system and controlling system and method thereof
CN111124294A (en) Sector mapping information management method and device, storage medium and equipment

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