CN107329693A - VMC microcontroller and its method for accessing data - Google Patents

VMC microcontroller and its method for accessing data Download PDF

Info

Publication number
CN107329693A
CN107329693A CN201710430971.3A CN201710430971A CN107329693A CN 107329693 A CN107329693 A CN 107329693A CN 201710430971 A CN201710430971 A CN 201710430971A CN 107329693 A CN107329693 A CN 107329693A
Authority
CN
China
Prior art keywords
vmc
data
flash
microcontroller
array
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.)
Pending
Application number
CN201710430971.3A
Other languages
Chinese (zh)
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.)
Suzhou Bayair Purifying Science And Technology Co Ltd
Original Assignee
Suzhou Bayair Purifying Science And Technology 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 Suzhou Bayair Purifying Science And Technology Co Ltd filed Critical Suzhou Bayair Purifying Science And Technology Co Ltd
Priority to CN201710430971.3A priority Critical patent/CN107329693A/en
Publication of CN107329693A publication Critical patent/CN107329693A/en
Pending legal-status Critical Current

Links

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/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]
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements

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)
  • Read Only Memory (AREA)

Abstract

The invention discloses a kind of method of VMC microcontroller accesses data, suitable for being performed in VMC microcontroller, comprise the following steps:Initialization step:In-chip FLASH is initialized;Definition step:Using structure defined variable data, Array for structural body is formed;Write step:" write-in " function is used, the Array for structural body is write and in-chip FLASH is stored in;Lock step:FLASH locks, and preserves data.VMC microcontroller disclosed by the invention and its method for accessing data, variable data can be defined as to Array for structural body and be stored in non-volatile data memory in-chip FLASH, in-chip FLASH cost is low, occupancy PCB space is small and data rate memory is fast, simultaneously, compared to individual data FLASH repetition gradually accessing operation, FLASH limited access defect is overcome using Array for structural body, the service life of in-chip FLASH is extended, the durability of in-chip FLASH is improved.

Description

VMC microcontroller and its method for accessing data
Technical field
The present invention relates to VMC technical field, more particularly to a kind of VMC microcontroller and its access data Method.
Background technology
VMC has been widely used in family, large area Administrative Area and industrial circle.VMC micro-control Device MCU processed needs to carry out power-off protection to data at work as core component, to ensure the company of whole VMC operation Coherence.In the case of data volume is less, both Data Power-off Reserve modes of FLASH or EEPROM are typically taken.Because of EEPROM Possess it is simple to operate, be easy to read-write and the high advantage of durability, therefore be widely used on VMC microcontroller, as Non-volatile data memory is used.Being stored using EEPROM needs external integrated EEPROM IC, in order to drive this IC need to reserve multiple I/O ports on microcontroller and write special driver, and be reserved on printing board PCB The IC is welded in space.So from the point of view of the global design of VMC microcontroller, EEPROM is complex, cost is higher, Required PCB space area is larger.
The content of the invention
Therefore, the present invention provides a kind of VMC microcontroller and its method for accessing data, efficiently solve At least one problem of face.
According to an aspect of the invention, there is provided a kind of VMC microcontroller, uses structure defined variable number According to, formation Array for structural body, and the Array for structural body is stored in in-chip FLASH.
Alternatively, according to the VMC microcontroller of the present invention, the variable data includes:Number of devices, controller Automatic/hand pattern, the automatic sensing data flag bit, controller of sending are opened
Machine-operated machine flag bit, cleaning equipment mode of operation(Manual/auto pattern), clarifier quantity, controller run time.
Alternatively, according to the VMC microcontroller of the present invention, the in-chip FLASH, including:
Main storage area, for storing the variable data;
Block of information area, the protection information for storing startup program, configuration information and the main memory block area.
Alternatively, according to the VMC microcontroller of the present invention, Array for structural body is stored in the master of in-chip FLASH Memory block.
According to a further aspect of the invention there is provided a kind of method of VMC microcontroller accesses data, suitable for Perform, comprise the following steps in VMC microcontroller:
Initialization step:In-chip FLASH is initialized;
Definition step:Using structure defined variable data, Array for structural body is formed;
Write step:" write-in " function is used, the Array for structural body is write and in-chip FLASH is stored in;
Lock step:FLASH locks, and preserves data.
Alternatively, according to the method for the VMC microcontroller accesses data of the present invention, in the initialization step, Further comprise:
Unlocked step:" unblock " function is used, in-chip FLASH is unlocked;
Remove step:" removing " function is used, in-chip FLASH register is removed.
Alternatively, according to the method for the access data of the VMC microcontroller of the present invention, in said write step, Array for structural body is write by in-chip FLASH using pointer mode.
Variable data, can be defined as knot by VMC microcontroller disclosed by the invention and its method for accessing data Structure body array is simultaneously stored in non-volatile data memory in-chip FLASH, and in-chip FLASH cost is low, take circuit board PCB space Small and data rate memory is fast, meanwhile, compared to individual data FLASH repetition gradually accessing operation, using Array for structural body Overcome FLASH limited access defect, extend the service life of in-chip FLASH, improve the durability of in-chip FLASH.
Brief description of the drawings
By reading the detailed description of following detailed description, various other advantages and benefit is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of embodiment, and is not considered as to invention Limitation.In the accompanying drawings:
Fig. 1 is the structural representation of VMC microcontroller according to an embodiment of the invention.
Fig. 2 is the schematic flow sheet of VMC microcontroller accesses data method of the present invention.
Embodiment
The present invention is further detailed explanation with specific embodiment below in conjunction with the accompanying drawings.The embodiment is shown Example is shown in the drawings, and the specific embodiment described in following embodiments of the present invention is only as the specific reality of the present invention Apply the exemplary illustration of mode, it is intended to for explaining the present invention, and be not configured to limitation of the present invention.
Fig. 1 is the structural representation of VMC microcontroller according to an embodiment of the invention.
As shown in figure 1, the VMC microcontroller of the embodiment of the present invention is used as non-volatile number using in-chip FLASH 100 According to memory, including main storage area 110 and block of information area 120, wherein main storage area 110 is used to store variable data, block of information Area 120 is used for the protection information for storing startup program, configuration information and main memory block area 110.
VMC microcontroller needs the variable data for powering off preservation to include:Number of devices, controller automatic/hand mould Formula, automatic transmission sensing data flag bit, controller start and close flag bit, cleaning equipment mode of operation(Manual/auto mould Formula), clarifier quantity, controller run time etc., these variable datas are the data acquisition systems of same type, for convenience of in piece FLASH100 accesses data, and VMC microcontroller is defined to form structure number using structure to above-mentioned variable data Group 111, and the Array for structural body 111 is stored in in-chip FLASH 100,
Fig. 2 is the schematic flow sheet of VMC microcontroller accesses data method of the present invention.
As shown in Fig. 2 being deposited the invention provides a kind of VMC microcontroller there is provided a kind of VMC microcontroller The method for evidence of fetching, suitable for being performed in VMC microcontroller, comprises the following steps:
Initialization step:In-chip FLASH is initialized;
Definition step S1300:Using structure defined variable data, Array for structural body is formed;
Write step S1400:" write-in " function is used, the Array for structural body is write and in-chip FLASH is stored in;
Step of locking S1500:FLASH locks, and preserves data;
Wherein, in the initialization step, further comprise:
Unlocked step S1100:" unblock " function is used, in-chip FLASH is unlocked;
Remove step S1200:" removing " function is used, in-chip FLASH register is removed;
Wherein, in unlocked step S1100, carry out in-chip FLASH 100 using FLASH_Unlock () function and unlock, only solve In locking plate after FLASH100, data could be write thereto.Unlock after in-chip FLASH 100, in step S1200 is removed, use Function FLASH_ClearFlag removes the status register of in-chip FLASH 100.
In definition step S1300, using structure defined variable data, Array for structural body 111, structure definition are formed It is as follows:
struct para_set
{
u8 number[4];//0:Number of devices;1:Controller automatic/hand pattern;2:It is automatic to send sensing data; 3:Controller start and close mark;
u8 auto_man[code_set_MAX];// cleaning equipment mode of operation(Manual/auto pattern);“code_ set_MAX”:Clarifier quantity
u16 FC1_run_time;// controller run time
};
extern struct para_set use_number;
Compared to single variable data in FLASH repetition gradually accessing operation, having for FLASH is overcome using Array for structural body 111 Limit storage defect, extends the service life of in-chip FLASH, improves the durability of in-chip FLASH.Meanwhile, facilitate fresh air system System Micro-processor MCV quickly reads information.
In write step S1400, " sizeof " write-in function is used, the Array for structural body 111 is write and deposited In in-chip FLASH 100;Employ after structure, the data of storage to in-chip FLASH 100 can be read by " write-in " function Its quantity is taken, no matter data are increased or decreased and impacted all without to Array for structural body 111.
Write-in to Array for structural body 111 in write step S1400 uses pointer mode, in data transfer, pointer Transmission is address rather than real data, so both improves transmission speed, and a large amount of internal memories are saved again.
In the step S1500 that locks, after the storage of Array for structural body 111 terminates, FLASH locks, and preserves data, prevents data Lose.
It should be noted that above-described embodiment is that the present invention will be described rather than limited the invention, and Those skilled in the art can design alternative embodiment without departing from the scope of the appended claims.In claim In, word "comprising" does not exclude the presence of data or step not listed in the claims.

Claims (7)

1. a kind of VMC microcontroller, it is characterised in that use structure defined variable data, forms Array for structural body, And the Array for structural body is stored in in-chip FLASH.
2. VMC microcontroller according to claim 1, it is characterised in that the variable data includes:Number of devices Amount, controller automatic/hand pattern, automatic transmission sensing data flag bit, controller start and close flag bit, cleaning equipment Mode of operation(Manual/auto pattern), clarifier quantity, controller run time.
3. VMC microcontroller according to claim 1 or 2, it is characterised in that the in-chip FLASH, including:
Main storage area, for storing the variable data;
Block of information area, the protection information for storing startup program, configuration information and the main memory block area.
4. VMC microcontroller according to claim 3, it is characterised in that Array for structural body is stored in piece The FLASH main storage area.
5. a kind of method of VMC microcontroller accesses data, suitable for being performed in VMC microcontroller, including such as Lower step:
Initialization step:In-chip FLASH is initialized;
Definition step:Using structure defined variable data, Array for structural body is formed;
Write step:" write-in " function is used, the Array for structural body is write and in-chip FLASH is stored in;
Lock step:FLASH locks, and preserves data.
6. the method for access data according to claim 5, wherein, in the initialization step, further comprise:
Unlocked step:" unblock " function is used, in-chip FLASH is unlocked;
Remove step:" removing " function is used, in-chip FLASH register is removed.
7. the method for access data according to claim 5, wherein, will using pointer mode in said write step Array for structural body writes in-chip FLASH.
CN201710430971.3A 2017-06-09 2017-06-09 VMC microcontroller and its method for accessing data Pending CN107329693A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710430971.3A CN107329693A (en) 2017-06-09 2017-06-09 VMC microcontroller and its method for accessing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710430971.3A CN107329693A (en) 2017-06-09 2017-06-09 VMC microcontroller and its method for accessing data

Publications (1)

Publication Number Publication Date
CN107329693A true CN107329693A (en) 2017-11-07

Family

ID=60195098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710430971.3A Pending CN107329693A (en) 2017-06-09 2017-06-09 VMC microcontroller and its method for accessing data

Country Status (1)

Country Link
CN (1) CN107329693A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122366A (en) * 2010-01-07 2011-07-13 上海华虹集成电路有限责任公司 Method for protecting flash in IC (Integrated Circuit) card chip
US20110276744A1 (en) * 2010-05-05 2011-11-10 Microsoft Corporation Flash memory cache including for use with persistent key-value store
CN103677897A (en) * 2013-11-06 2014-03-26 天津瑞能电气有限公司 System chip and programming method of system chip
CN105183392A (en) * 2015-09-18 2015-12-23 广州日滨科技发展有限公司 Method for storing fixed-length data on FLASH
CN105426317A (en) * 2015-10-29 2016-03-23 宁波卓奥电子科技有限公司 Storage method for storing user data into Flash and read method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122366A (en) * 2010-01-07 2011-07-13 上海华虹集成电路有限责任公司 Method for protecting flash in IC (Integrated Circuit) card chip
US20110276744A1 (en) * 2010-05-05 2011-11-10 Microsoft Corporation Flash memory cache including for use with persistent key-value store
CN103677897A (en) * 2013-11-06 2014-03-26 天津瑞能电气有限公司 System chip and programming method of system chip
CN105183392A (en) * 2015-09-18 2015-12-23 广州日滨科技发展有限公司 Method for storing fixed-length data on FLASH
CN105426317A (en) * 2015-10-29 2016-03-23 宁波卓奥电子科技有限公司 Storage method for storing user data into Flash and read method

Similar Documents

Publication Publication Date Title
US9405675B1 (en) System and method for managing execution of internal commands and host commands in a solid-state memory
CN104750626B (en) Data memory device and method for controlling flash memory
US7554855B2 (en) Hybrid solid-state memory system having volatile and non-volatile memory
EP2115595B1 (en) Memory device performance enhancement through pre-erase mechanism
CN106776359A (en) A kind of NAND Flash bad block management methods and system
US20060218359A1 (en) Method and system for managing multi-plane memory devices
CN106528443B (en) FLASH management system and method suitable for spaceborne data management
CN106294229A (en) Read while in serial interface memory and write storage operation
WO2006108755A1 (en) Method and system for storing logical data blocks into flash-blocks in multiple non-volatile memories which are connected to at least one common data i/o bus
CN104360958A (en) Bad block management system and bad block management method based on block reservation area replacement
WO2009063614A1 (en) Memory controller, nonvolatile storage module, access module, and nonvolatile storage system
CN103456360B (en) The management method of nonvolatile memory and device
CN103942151A (en) Data storage method and device for flash memory
CN101145394A (en) Apparatus and method for providing atomicity with respect to request of write operation for successive sector
CN102567225A (en) Method and device for managing system memory
CN104051010B (en) Method and apparatus for programming non-volatile memory including a plurality of blocks
CN107783730A (en) Storage device, memory IC and the write-in processing method write to memory IC
EP1855187A3 (en) Computer system for managing number of writes for storage medium and control method therefor
WO2009013877A1 (en) Memory controller, memory card, and nonvolatile memory system
CN101609431B (en) Flash memory apparatus and method for operating the same
CN107329693A (en) VMC microcontroller and its method for accessing data
US11080203B2 (en) Data storage device and control method for non-volatile memory
CN102362263A (en) SSD controller, and method for operating an SSD controller
US20120079166A1 (en) Electronic device and method for initializing data storage
CN115878033A (en) Solid state disk and mapping table management method thereof

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171107

RJ01 Rejection of invention patent application after publication