CN109634581A - A kind of date storage method based on STM32F103ZET6 and eMMC card - Google Patents

A kind of date storage method based on STM32F103ZET6 and eMMC card Download PDF

Info

Publication number
CN109634581A
CN109634581A CN201811322059.7A CN201811322059A CN109634581A CN 109634581 A CN109634581 A CN 109634581A CN 201811322059 A CN201811322059 A CN 201811322059A CN 109634581 A CN109634581 A CN 109634581A
Authority
CN
China
Prior art keywords
data
emmc card
emmc
memory
card
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
CN201811322059.7A
Other languages
Chinese (zh)
Other versions
CN109634581B (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.)
Luoyang Institute of Electro Optical Equipment AVIC
Original Assignee
Luoyang Institute of Electro Optical Equipment AVIC
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 Luoyang Institute of Electro Optical Equipment AVIC filed Critical Luoyang Institute of Electro Optical Equipment AVIC
Priority to CN201811322059.7A priority Critical patent/CN109634581B/en
Publication of CN109634581A publication Critical patent/CN109634581A/en
Application granted granted Critical
Publication of CN109634581B publication Critical patent/CN109634581B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • 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

Abstract

The present invention provides a kind of date storage methods based on STM32F103ZET6 and eMMC card, using the STM32F103ZET6 single-chip microcontroller of ST company, it is crosslinked using SDIO module and eMMC card, realize the generation of clock and the transmission of order and data, SDIO interface mounts eMMC card, it is stored for data, and completes interface driver software design.Single-chip microcontroller high-performance, low cost, low-power consumption, the rich interface that the present invention uses, eMMC card is with size is small, memory capacity is big, read or write speed is fast, the advantages that long service life, flank speed is up to 416Mbps, ST company provides largely open software library, and interface driver software development is carried out on the basis of Freeware library, shortens the R&D cycle, simultaneously because software library is standard database, the interface driver software developed on the basis of standard database facilitates to be transplanted to other models;Self-defining data format, shields file system, substantially reduces the R&D cycle, and due to not having file system, reliability is higher in use for memory.

Description

A kind of date storage method based on STM32F103ZET6 and eMMC card
Technical field
The present invention relates to embedded data technical field of memory, especially a kind of data design Storage method be can be applied to Mobile phone, Portable type mobile storage device and other military, civilian data storage devices.
Background technique
In built-in field, single-chip microcontroller is small in size with its, light weight, cheap, the medium advantage of function collection become It practises, the first choice of application and exploitation.STM32F103ZET6 single-chip microcontroller be aim at require high-performance, low cost, low-power consumption it is embedded Using and the processor of ARM Cortex-M3 kernel that specially designs, be the single-chip microcontroller being most widely used at present.Many monolithics Machine requires mass-memory unit and carrys out storing data, and this requires single-chip microcontrollers to have the function of massive store.Based on single-chip microcontroller Data storage device design mainly consider following factor:
Memory capacity;
Interface compatibility;
Shape size;
Research and develop cost.
Currently, being suitable for the storage equipment of single-chip microcontroller mainly has eMMC card, flash disk, SD card, mmc card and CF card etc..eMMC Card becomes insertion with the features such as its size is small, memory capacity is big, read or write speed is fast, movement is flexible, compatible, highly-safe forward The first choice of formula field mobile device local datastore solution.
Using eMMC card as storage equipment, developer does not need to set again because of different NAND Flash suppliers Count specification;Processing NAND Flash compatibility and problem of management are not needed;It the R&D cycle for substantially reducing new product, reduces Research and develop cost;The software library that ST company offer simultaneously largely opens facilitates memory interface drive software using open source code It realizes;File system is realized on single-chip microcontroller, can greatly increase research and development difficulty, while having the memory of file system in reality In use process, due to powered-off fault etc., the reliability of memory devices can be reduced.
Summary of the invention
For overcome the deficiencies in the prior art, on Vehicles Collected from Market to low-power consumption, large capacity and miniaturized recorder Demand, the present invention provides a kind of date storage method based on STM32F103 series monolithic and eMMC card, with realize compared with In short time, on the basis of lower research and development cost, the small-sized of a kind of low-power consumption, large capacity, fast reading and writing and favorable expandability is developed Data storage device.
The step of the technical solution adopted by the present invention to solve the technical problems, is as follows:
Step 1: using the STM32F103ZET6 single-chip microcontroller of ST company, using SDIO module and the crosslinking of eMMC card, when realization The generation of clock and the transmission of order and data, SDIO interface mount eMMC card, store for data;
Step 2: interface driver software design
Firstly, selecting the software library based on STM32F103 system in the Open Source Code that ST company provides;
Secondly it on the basis of software library, is advised according to STM32F10x family chip SDIO interface specification and eMMC card agreement Model completes the driving of eMMC card initialization;
EMMC card reading and writing operation driving is finally carried out according to eMMC card protocol specification, eMMC card is with 512 byte of data block Form is written and read;
Step 3: self-defining data structure
Memory is written into according to self-defining data structure in data, self-defining data structure includes state packet and data packet, State packet storage location is fixed, for identify memory capacity, software version, memory overlay marks, memory record number, The position of total time, Data Area data significant notation, record data in memory is recorded, for inquiring when each packet data recording It is used;The data type that data packet is defined according to practical application, more new state packet when recording data packet every time.
The state packet format is shown in Table 1, and data packet format is shown in Table 2:
The state packet format of 1 self-defining data structure of table
The data packet format of the customized table structure of table 2
The state packet and data package size are 512 bytes.
The beneficial effects of the present invention are:
1) present invention use STM32F103ZET6 single-chip microcontroller, the series monolithic have high-performance, low cost, low-power consumption, The features such as rich interface, uses in built-in field very extensive at present;
2) eMMC card has many advantages, such as that size is small, memory capacity is big, read or write speed is fast, and long service life, flank speed can Up to 416Mbps;
3) ST company provides largely open software library, and interface driver software is carried out on the basis of Freeware library and is opened Hair, shortens the R&D cycle, simultaneously because software library is standard database, the interface driver developed on the basis of standard database Software facilitates to be transplanted to other models;
4) self-defining data format shields file system, substantially reduces the R&D cycle, due to there is no file system, Reliability is higher in use for memory.
Detailed description of the invention
Fig. 1 is the interconnection of signals relational graph of STM32F103ZET6 and eMMC card in the present invention.
Fig. 2 is interface driver software development flow figure of the present invention.
Fig. 3 is that eMMC card initialization of the present invention drives development process figure.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples.
The technical scheme is that first is that using STM32F103ZET6 processor SDIO interface, mount eMMC card, It is stored for data;Second is that carrying out the exploitation of eMMC interface driver on the basis of Freeware library;Third is that file system is shielded, Using self-defining data structure.
Step 1: using the STM32F103ZET6 single-chip microcontroller of ST company, using SDIO module and the crosslinking of eMMC card, when realization The generation of clock and the transmission of order and data, SDIO interface mount eMMC card, store for data;
Step 2: interface driver software design
Firstly, selecting the software library based on STM32F103 system in the Open Source Code that ST company provides;
Secondly it on the basis of software library, is advised according to STM32F10x family chip SDIO interface specification and eMMC card agreement Model completes the driving of eMMC card initialization;
EMMC card reading and writing operation driving is finally carried out according to eMMC card protocol specification, eMMC card is with 512 byte of data block Form is written and read;
Step 3: self-defining data structure
Memory is written into according to self-defining data structure in data, self-defining data structure includes state packet and data packet, State packet storage location is fixed, for identify memory capacity, software version, memory overlay marks, memory record number, Total time, Data Area data significant notation are recorded (in order to which gradually small memory erasing time, real data can not have to greatest extent Erasing, it is invalid to set data field), position of the record data in memory, when for each packet data recording used in inquiry;Number According to the data type that packet is defined according to practical application, more new state packet when recording data packet every time.State packet and packet structure Definition meets record demand, some of them field can self-defining according to actual needs, state packet and data package size are 512 Byte, state packet format are shown in Table 1, and data packet format is shown in Table 2.
The state packet format of 1 self-defining data structure of table
The data packet format of the customized table structure of table 2
Hardware of the invention uses the STM32F103ZET6 single-chip microcontroller of ST company, which has SDIO interface, can prop up The memories such as SD card, eMMC card are held, while can be used for extending mass storage, the correlation of eMMC card is realized using SDIO module Function, such as the generation of clock, the transmission of order and data.SDIO interface mounts eMMC card, stores for data. STM32F103ZET6 single-chip microcontroller and eMMC card signal crosslinking relationship are shown in Fig. 1.
In order to realize that STM32F103ZET6 single-chip microcontroller to the read-write operation of eMMC card, needs exploitation to be based on The eMMC card interface drive software of STM32F103ZET6, entire interface driver software development flow are shown in Fig. 2.Firstly, in ST company Software library based on STM32F103 system is provided in the Open Source Code of offer;Secondly on the basis of software library, according to STM32F10x family chip SDIO interface specification and eMMC card protocol specification carry out the driving exploitation of eMMC card initialization, eMMC Card initialization is the core of entire drive software, and only initialization is correct, just can be carried out the read-write operation of data, initialization process Figure is shown in Fig. 3;EMMC card reading and writing operation driving exploitation is finally carried out according to eMMC card protocol specification, eMMC card is with data block (512 Byte) form be written and read.
After realizing single-chip microcontroller to the normal read-write operation of eMMC card, data are written according to self-defining data structure and are stored Device.Self-defining data structure includes state packet and data packet, and state packet storage location is fixed, for identifying memory capacity, soft Part version, memory overlay marks, memory record number, record total time, Data Area data significant notation are (for maximum limit Degree gradually small memory erasing time, real data can not have to erasing, it is invalid to set data field), record data are in memory Interior position, when for each packet data recording used in inquiry;Data packet is the data type defined according to practical application, is remembered every time More new state packet when recording data packet.

Claims (2)

1. a kind of date storage method based on STM32F103ZET6 and eMMC card, it is characterised in that include the following steps:
Step 1: using the STM32F103ZET6 single-chip microcontroller of ST company, being crosslinked using SDIO module and eMMC card, realize clock It generates and the transmission of order and data, SDIO interface mounts eMMC card, stored for data;
Step 2: interface driver software design
Firstly, selecting the software library based on STM32F103 system in the Open Source Code that ST company provides;
Secondly complete according to STM32F10x family chip SDIO interface specification and eMMC card protocol specification on the basis of software library It is driven at eMMC card initialization;
EMMC card reading and writing operation driving is finally carried out according to eMMC card protocol specification, eMMC card is in the form of 512 byte of data block It is written and read;
Step 3: self-defining data structure
Memory is written into according to self-defining data structure in data, self-defining data structure includes state packet and data packet, state Packet storage location is fixed, for identifying memory capacity, software version, memory overlay marks, memory record number, record Total time, Data Area data significant notation record position of the data in memory, for inquiring institute when each packet data recording With;The data type that data packet is defined according to practical application, more new state packet when recording data packet every time;The state packet format It is shown in Table 1, data packet format is shown in Table 2.
The state packet format of 1 self-defining data structure of table
The data packet format of the customized table structure of table 2
2. a kind of date storage method based on STM32F103ZET6 and eMMC card according to claim 1, feature exist In including the following steps:
The state packet and data package size are 512 bytes.
CN201811322059.7A 2018-11-08 2018-11-08 Data storage method based on STM32F103ZET6 and eMMC card Active CN109634581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811322059.7A CN109634581B (en) 2018-11-08 2018-11-08 Data storage method based on STM32F103ZET6 and eMMC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811322059.7A CN109634581B (en) 2018-11-08 2018-11-08 Data storage method based on STM32F103ZET6 and eMMC card

Publications (2)

Publication Number Publication Date
CN109634581A true CN109634581A (en) 2019-04-16
CN109634581B CN109634581B (en) 2022-01-04

Family

ID=66067557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811322059.7A Active CN109634581B (en) 2018-11-08 2018-11-08 Data storage method based on STM32F103ZET6 and eMMC card

Country Status (1)

Country Link
CN (1) CN109634581B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040047356A1 (en) * 2002-09-06 2004-03-11 Bauer Blaine D. Network traffic monitoring
CN102063379A (en) * 2010-12-28 2011-05-18 天津市亚安科技电子有限公司 Data storage method of FLASH memory
CN102867019A (en) * 2012-07-30 2013-01-09 利尔达科技有限公司 Separated file system and management method thereof
CN105302612A (en) * 2015-11-18 2016-02-03 西南技术物理研究所 Method for quick upgrading of software program of single-chip microcomputer in electronic system case
US20160162201A1 (en) * 2014-12-08 2016-06-09 Symbol Technologies, Inc. Emmc functionality expander
US20170140494A1 (en) * 2015-11-17 2017-05-18 Google Inc. Converting flash content to html content by generating an instruction list
US20180095863A1 (en) * 2016-10-04 2018-04-05 Samsung Electronics Co., Ltd. Integrated circuit and application processor
CN108399076A (en) * 2018-03-02 2018-08-14 山东超越数控电子股份有限公司 A kind of firmware update and device based on UEFI

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040047356A1 (en) * 2002-09-06 2004-03-11 Bauer Blaine D. Network traffic monitoring
CN102063379A (en) * 2010-12-28 2011-05-18 天津市亚安科技电子有限公司 Data storage method of FLASH memory
CN102867019A (en) * 2012-07-30 2013-01-09 利尔达科技有限公司 Separated file system and management method thereof
US20160162201A1 (en) * 2014-12-08 2016-06-09 Symbol Technologies, Inc. Emmc functionality expander
US20170140494A1 (en) * 2015-11-17 2017-05-18 Google Inc. Converting flash content to html content by generating an instruction list
CN105302612A (en) * 2015-11-18 2016-02-03 西南技术物理研究所 Method for quick upgrading of software program of single-chip microcomputer in electronic system case
US20180095863A1 (en) * 2016-10-04 2018-04-05 Samsung Electronics Co., Ltd. Integrated circuit and application processor
CN108399076A (en) * 2018-03-02 2018-08-14 山东超越数控电子股份有限公司 A kind of firmware update and device based on UEFI

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
ROB ROY VENKAT BOMMAKANTI: "ODROID-XU4 Beginner’s Guide", 《HARDKERNEL》 *
STM32F10X UPDATE HISTORY: "Release Notes for STM32F10x Standard Peripherals Library Drivers", 《ST》 *
李锦明,马林: "基于eMMC的128路数据采集系统设计", 《测控技术与仪器仪表》 *
费超等: "基于S3C2440和μC/OS的FAT文件系统的设计与实现", 《电子设计工程》 *

Also Published As

Publication number Publication date
CN109634581B (en) 2022-01-04

Similar Documents

Publication Publication Date Title
US7376781B2 (en) Virtual USB card reader with PCI express interface
US8281062B2 (en) Portable storage device supporting file segmentation and multiple transfer rates
US7496703B2 (en) Virtual IDE card reader with PCI express interface
US7822912B2 (en) Flash storage chip and flash array storage system
US20060206653A1 (en) [virtual ide storage device with pci express]
KR101395778B1 (en) Memory card and memory system including the same and operating method thereof
US7606964B2 (en) Virtual USB flash memory storage device with PCI express interface, controller and method thereof
US20080307158A1 (en) Method and apparatus for providing data type and host file information to a mass storage system
US8914579B2 (en) Access device, information recording device, controller, and information recording system
CN101354906B (en) Flash memory controller for solid hard disk
CN103270500A (en) Transaction log recovery
US20080250189A1 (en) Circuit and Method for Improving Operation Life of Memory
CN116185892B (en) Flash memory controller and method for accessing flash memory particles
CN102446137A (en) Data write-in method, memory controller and memory storage device
CN116578234B (en) Flash memory access system and method
CN109634581A (en) A kind of date storage method based on STM32F103ZET6 and eMMC card
US11681638B2 (en) Method of synchronizing time between host device and storage device and system performing the same
CN102467460B (en) Data management method, memory controller and memory storage device
CN210776642U (en) Automatic disk splicing device for multiple TF cards
CN110286855A (en) A kind of devices and methods therefor of the automatic assorted cold dishes of multiple TF cards
CN201004226Y (en) Minimum system module of ARM processor with FLASH and SDRAM
CN116185891B (en) Descriptor management method
GB2397191A (en) A portable digital image and sound recording device providing an interface to an external storage device
KR200404469Y1 (en) Data Storage Disk for IDE and SCSI interface using the Flash Memory
CN113159260A (en) Design method of small data storage 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