CN100428203C - Portable equipment based on non-volatile memory and method of realizing power failure protection - Google Patents

Portable equipment based on non-volatile memory and method of realizing power failure protection Download PDF

Info

Publication number
CN100428203C
CN100428203C CNB2006101147865A CN200610114786A CN100428203C CN 100428203 C CN100428203 C CN 100428203C CN B2006101147865 A CNB2006101147865 A CN B2006101147865A CN 200610114786 A CN200610114786 A CN 200610114786A CN 100428203 C CN100428203 C CN 100428203C
Authority
CN
China
Prior art keywords
voltage
power down
portable set
data
low
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.)
Expired - Fee Related
Application number
CNB2006101147865A
Other languages
Chinese (zh)
Other versions
CN1949197A (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.)
Feitian Technologies Co Ltd
Original Assignee
Beijing Feitian Technologies 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 Beijing Feitian Technologies Co Ltd filed Critical Beijing Feitian Technologies Co Ltd
Priority to CNB2006101147865A priority Critical patent/CN100428203C/en
Publication of CN1949197A publication Critical patent/CN1949197A/en
Application granted granted Critical
Publication of CN100428203C publication Critical patent/CN100428203C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

  • Techniques For Improving Reliability Of Storages (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses data power down protection technology based on non-volatile storage portable set. The portable set is set capacitance and low voltage detecting module to do low voltage detecting before data read-in and erasing for the non-volatile storage structure; if the voltage is abnormal, any operation doesn't be executed; if the portable set is power down while data read-in and erasing, capacitance discharges to supply required voltage to make the system finish oncoming operation. The invention can avoid bad data when the non-volatile storage is suddenly power down, can save firmware program development time and firmware code storage space, has higher data stored reliability and security compared with the existing method.

Description

Method based on the realization power down protection of the portable set of non-volatile memories
Technical field
The invention belongs to the power down protection technology of data, be specifically a kind of utilize the non-volatile memories structure for the portable set of storage area prevent to produce after the power down bad data a kind of based on non-volatile memories portable set and realize the method for power down protection.
Background technology
Flash: a kind of non-volatile storer, can carry out erasable and programming again to memory cell.The write operation of any Flash device can only be carried out in the storage unit of sky or the storage unit of having wiped, in most cases, carry out write operation before execution earlier wipe.The Flash storer is a kind of rapidly storer of development in recent years, it has the characteristic that the EEPROM electricity is wiped, but also has low-power consumption, high density, volume is little, reliability is high, can wipe, can rewrite overprogram, write advantages such as data and erasing speed be fast.In general, the erasable speed of Flash storer can reach Millisecond, but relative RAM, the erasable speed of Flash storer seems slower, therefore, the Flash storer is being carried out in the erasable process, if power down takes place, still be difficult to avoid producing the situation of bad data.
Intelligent key apparatus: a kind of small hardware device that has processor and storer, it can be connected with computing machine by the data communication interface by computing machine, has the key systematic function, but and the safe storage key, can preset the cryptographic algorithm function.The intelligent key apparatus computing relevant with key be fully at the device internal operation, and intelligent key apparatus has anti-characteristic of attacking, and security is high.USB Key is a kind of intelligent key apparatus of USB interface, and its built-in single-chip microcomputer or intelligent card chip can be stored user's key or digital certificate.
MCU:(Micro Controller Unit) micro controller unit is meant appearance and development thereof along with large scale integrated circuit, and CPU, storer and the multiple I/O interface etc. of computing machine are integrated on a slice chip the computing machine of the chip-scale of formation.
Along with progress of science and technology, the performance of memory device becomes the major criterion of weighing the computing power height just day by day.The storage card that constitutes with flash memory (Flash storer) replaces flexible plastic disc just gradually at present.The capacity of storage card can be done greatlyyer than floppy disk, but has the convenience of floppy disk, now is used for equipment such as portable computer, digital camera, MP3, MP4 player in a large number.
In the prior art, people's characteristics of often utilizing Flash storer power down data to be difficult for losing realize the purpose of data storage and software protection.First byte of physical block address is generally logical block number (LBN) in the Flash storer, and arranges by linear precedence.The variation of this logical block number (LBN) is set by writing corresponding program by the developer, and the logical block number (LBN) of physical block can change.Before piece is carried out the programming rewriting, need this is treated that the legacy data in the operating block reads in RAM, finishes rewriting operation, and revised data are write in the backup block in RAM, backup block and origin operation piece exchange logical block number (LBN) simultaneously, make the origin operation piece become new backup block.Need elder generation with data erase in new backup block when carrying out same operation again next time, is used to deposit revised data, and specific operation process is the same.Prior art is this writes corresponding operation code by the developer and comes piece is operated, thereby realizes the method for software protection, can prevent unexpected power down when piece is carried out rewriting operation and causes the adverse consequences of loss of data.But this method is a cost to deposit a large amount of operation codes in Flash, needs the developer to write corresponding program and prevents to produce bad data after the power down, and this method for protecting software need take a large amount of storage spaces and deposit firmware program.
Summary of the invention
In order to solve the deficiencies in the prior art, the present invention propose a kind of based on non-volatile memories portable set and realize the method for power down protection.At the inner electric capacity that increases of portable set, to power to system by capacitor discharge after the power down, the system of assurance executes last operation, realizes and finish Data Protection method after the power down from hardware.
Portable set based on non-volatile memories provided by the present invention is characterized in that, described portable set based on non-volatile memories comprises suitable storage capacitor and the MCU of built-in capacity on the pcb board.
Described MCU comprises interface module, memory module, CPU and low voltage detecting module.
Described interface module is used to realize serial communication or the parallel communications between described portable set and main frame.
Described interface module comprises usb interface module.
Described memory module is the storer of non-volatile structure, comprises Flash or EEPROM.
The storer of described non-volatile structure is divided into different storage areas, comprises firmware code storage area, storage of subscriber data zone.
Store the low-voltage autotest in the described low voltage detecting module, be used for monitoring in real time the supply voltage of portable set.
A kind of portable equipment based on non-volatile memories provided by the present invention is realized the method for power down protection, and its concrete steps are as follows:
Step 1. portable set and main frame connect.
Step 2. portable set and main frame carry out data communication, transmit required data.
Step 3. pair data write or erase operation before, portable set carries out low-voltage and detects, if find electric voltage exception, does not then carry out any operation; If voltage is normal, then continue executable operations.
When step 4. pair data are operated,,, keep operation and finish then by the storage capacitor power supply if power down takes place.
As described in step 1, in the present invention, described portable set is an intelligent key apparatus.
Described intelligent key apparatus comprises USB Key.
As described in step 2, in the process that described portable set and main frame communicate, main frame is to powering portable devices, and the charging of the storage capacitor in portable set.
In the process that portable set and main frame communicate, the user makes amendment to the data in the storage of subscriber data district by upper level applications, when promptly nonvolatile memory being rewritten, earlier the data in the operating block are read in RAM, in RAM, finish rewriting operation, and revised data are write the origin operation piece.
As described in step 4, in the process that described portable set and main frame communicate, if described portable set generation power down, then electric capacity discharges at once, provides operating voltage to system, guarantees the full content write operation piece in last packet.
In the present invention, described operation also comprises erase operation except that write operation.
Described electric capacity begins discharge after the portable set power down, the system that keeps normally moves, and capacitance can calculate by correlation parameter.Require selected electric capacity when discharge, can keep sparking voltage on normal working voltage, in the present invention until EO.
Described correlation parameter comprises the required minimum voltage of equivalent resistance, rated operational voltage, system's operate as normal of described portable set, to the time that the data package operation is required.
In method provided by the invention, can directly operate physical block, need not the participation of backup block, thereby need not the developer and write corresponding logical block operation code, save a large amount of firmware code storage spaces, the space that saves can be used to deposit more user profile and other data; Simultaneously, the characteristic of utilizing electric capacity to have to discharge and recharge, after the nonvolatile memory power down, can in time power to system, guarantee last packet complete operation, make that reliability of data storage and security are improved significantly, in the present invention, can choose the suitable electric capacity of appearance value by correlation computations, be difficult for increasing excessive cost.
Description of drawings
Fig. 1 is the structural drawing of the embodiment of the invention;
Fig. 2 is the workflow diagram in the embodiment of the invention;
Fig. 3 is the curve map of capacitor discharge in this enforcement.
Embodiment
Realize that below in conjunction with accompanying drawing and so that portable set is carried out rewriting operation data cut-off protection is an example, the invention will be further described, but not as a limitation of the invention.
In the following embodiments, described portable set collection software cryptography, identity authentication function are two-in-one; Have 64 hardware IDs; HMAC-MD5 is provided algorithm; The management of support PIN code.
Embodiment 1
As shown in Figure 1, present embodiment is described a kind ofly realizes that the portable set of data cut-off protection is USBKey, specifically comprises MCU and big electric capacity.
Described electric capacity is built on the pcb board of described portable set, is connected with MCU with main frame respectively, and the storer of described non-volatile structure is integrated among the MCU.
Described MCU is built on the pcb board of described portable set, is connected with electric capacity with main frame respectively, specifically comprises interface module, memory module, CPU, low voltage detecting module etc., is used to realize program implementation.
Described interface module is a usb interface module, is responsible for USB Key and main frame are connected.
Described memory module is the Flash structure, is divided into key data memory module and firmware program memory module, is respectively applied for storage digital certificate, key, user profile and firmware program.
Described low voltage detecting module is used to store the low-voltage autotest, by opening personnel setting.
Described electric capacity is connected with MCU with main frame respectively, is used to realize data cut-off protection, and promptly when power down took place USB Key, capacitor discharge provided operate as normal required voltage to system.
Embodiment 2
As shown in Figure 2, present embodiment provided a kind ofly realizes that its method of work of device of data cut-off protection is specific as follows:
After step 201 beginning, step 202 USB Key and main frame connect, and main frame provides operating voltage for USB Key.
Step 203 USB Key and main frame carry out data communication.
Step 204 user rewrites the data in the memory module by upper level applications.
In the present embodiment, the user will be detected voltage by the low-voltage autotest before by upper level applications the data in the memory module being rewritten, if find power down, then not carry out any operation.
The physical address of step 205 read operation piece finds corresponding operating block.
Step 206 is read in RAM with the content in the operating block.
Step 207 is rewritten data in RAM.
Step 208 judges whether to take place power down, if power down, execution in step 209, otherwise execution in step 210 take place.
In the present embodiment, describedly judge whether to take place power down by judging whether the power down sign is provided to realize.System is in operational process, and the low-voltage autotest will detect the voltage in the circuit, if detect the generation power-down conditions, the power down sign is set then; If do not detect power-down conditions, the power down sign is not set then.
Described low-voltage autotest is the part of firmware program, and described low-voltage autotest and power down sign setting program are by opening personnel setting.
In the present embodiment, set up power down sign setting program in low voltage detecting module, described generation power down is meant that the operating voltage of judging USB Key is lower than a certain default threshold value (threshold voltage=0.7~0.8U O).This moment, MCU can produce an interruption, and power down sign setting program is provided with the power down sign.The low-voltage trace routine is provided to determine whether power down of USB Key by judging this power down sign.
Described threshold value is set by the developer, and it is set to 80% of rated operational voltage value usually.
Fig. 3 is the curve map of capacitor discharge in the present embodiment.In the present embodiment, if power-down conditions takes place, then by capacitor discharge, according to formula u o = U O e - t τ , τ=RC can calculate required electric capacity and resistance value.
In above-mentioned formula, described resistance R is the equivalent resistance of circuit, described U OBe system's operate as normal rated voltage.Generally, voltage still can guarantee more than 70% that ratings system normally moves, because the running time of finishing last packet is about 4s, so the required electric capacity of present embodiment must guarantee that reducing to 80% of rated operational voltage value from voltage is 0.7U until capacitor discharge voltage ODuring this period of time greater than 4ms, from figure, t1 to time of t2 greater than 4ms, could guarantee to finish operation to last packet.The equivalent resistance of learning circuit by actual measurement is 250 Ω, according to calculating, can select the electric capacity of 120 μ F for use.
Step 209 operating voltage is lower than 0.8U O, power down takes place in USB Key, and this moment, MCU was set to the state of quitting work.
Step 210 finishes.
Step 211 voltage is higher than 0.8U O, MCU does not produce interruption, and USB Key does not have power down, continues to carry out rewriting operation.
In the process of carry out rewriting, if power down takes place USB Key, and do not finish operation as yet to last packet, capacitor discharge is then kept the operate as normal value of USB Key voltage, until end-of-job.
Step 212 judges whether to finish the rewriting operation to a piece, if finish then execution in step 213, otherwise execution in step 211.
Step 213 has been finished the operation to a piece at this moment, judges whether whole rewriting operations, if all finish, then execution in step 203, otherwise execution in step 204.
More than a kind of portable set based on the non-volatile memories structure provided by the present invention is described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (4)

1. realize it is characterized in that the method for power down protection based on the portable set of non-volatile memories for one kind:
(1) suitable storage capacitor and the voltage detection module of the inner increase capacity of portable set;
(2) the non-volatile memories structure is carried out data write with data erase before, portable set carries out voltage detecting, if find electric voltage exception, then shut-down operation;
(3) as if portable set power down when data write with data erase, then electric capacity provides the operate as normal required voltage to system, makes system finish operation this time.
2. the method that realizes power down protection based on the portable set of non-volatile memories according to claim 1, it is characterized in that: described voltage detecting by low voltage detecting module portable set carry out that data write or data erase operation before carry out the low-voltage autotest, carrying out low-voltage detects, if find electric voltage exception, then shut-down operation; If voltage is normal, then continue executable operations.
3. the portable set based on non-volatile memories according to claim 2 is realized the method for power down protection, it is characterized in that: the value basis of described storage capacitor u c = U O e - t τ , τ=RC calculates, and R is the equivalent resistance of circuit, U OBe system's operate as normal rated voltage, but the minimum value of electric capacity is that the minimum voltage value that the threshold value of default is reduced to system's operate as normal writes the time required with data erase operation greater than finishing a secondary data during this period of time for making the capacitance discharges time from the operating voltage of portable set.
4. the method that realizes power down protection based on the portable set of non-volatile memories according to claim 2; it is characterized in that: described low-voltage autotest finds that the mode of electric voltage exception is: set up power down sign setting program in low voltage detecting module; when operating voltage is lower than default threshold value; MCU produces an interruption; power down sign setting program is provided with the power down sign, and the low-voltage trace routine is determined whether power down of portable set by judging this power down sign.
CNB2006101147865A 2006-11-23 2006-11-23 Portable equipment based on non-volatile memory and method of realizing power failure protection Expired - Fee Related CN100428203C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101147865A CN100428203C (en) 2006-11-23 2006-11-23 Portable equipment based on non-volatile memory and method of realizing power failure protection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101147865A CN100428203C (en) 2006-11-23 2006-11-23 Portable equipment based on non-volatile memory and method of realizing power failure protection

Publications (2)

Publication Number Publication Date
CN1949197A CN1949197A (en) 2007-04-18
CN100428203C true CN100428203C (en) 2008-10-22

Family

ID=38018718

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101147865A Expired - Fee Related CN100428203C (en) 2006-11-23 2006-11-23 Portable equipment based on non-volatile memory and method of realizing power failure protection

Country Status (1)

Country Link
CN (1) CN100428203C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI678622B (en) * 2018-06-15 2019-12-01 慧榮科技股份有限公司 Development system and productization method for data storage device

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645014A (en) * 2008-08-09 2010-02-10 海信(北京)电器有限公司 Method for simulating data storage of EEPROM by using built-in FLASH program storing device of single-chip
CN101626159B (en) * 2009-01-14 2012-01-25 华为终端有限公司 Method for preventing repeated restart of terminal device and device thereof
CN101996144B (en) * 2009-08-20 2013-07-17 联芯科技有限公司 Flash control method and device
CN102298951A (en) * 2010-06-25 2011-12-28 鸿富锦精密工业(深圳)有限公司 Control device and electronic equipment comprising control device
CN105229555A (en) * 2013-05-31 2016-01-06 惠普发展公司,有限责任合伙企业 The operation of mass-memory unit
CN105512056A (en) * 2014-09-24 2016-04-20 中兴通讯股份有限公司 Method and device for data storage, and terminal
CN105631965B (en) * 2014-10-30 2018-03-16 中车大连电力牵引研发中心有限公司 Vehicle-mounted WTB message accountings instrument
US9697657B2 (en) 2014-12-24 2017-07-04 Intel Corporation Techniques for access control using wearable devices
CN104598844A (en) * 2014-12-31 2015-05-06 湖南国科微电子有限公司 Power failure protection method and device for preventing corruption of system files of solid-state disk
WO2017035759A1 (en) * 2015-08-31 2017-03-09 深圳市瑞耐斯技术有限公司 Method and system of rapid data backup on a solid state drive upon abnormal power off
CN105117352B (en) * 2015-09-18 2018-12-11 深圳怡化电脑股份有限公司 A kind of method and device saving ATM machine withdrawal data
CN106326036A (en) * 2016-08-17 2017-01-11 浪潮(北京)电子信息产业有限公司 COW (Copy On Write) snapshoot data brushing and writing method based on linux system and system thereof
CN106502929B (en) * 2016-10-20 2019-06-04 郑州云海信息技术有限公司 A kind of target device, a kind of processing method and processing device of internal storage data
CN107346164A (en) * 2017-06-02 2017-11-14 江苏万邦微电子有限公司 A kind of power-supply management system
CN109062825A (en) * 2018-07-09 2018-12-21 深圳忆联信息系统有限公司 A kind of guard method of solid state hard disk powered-off fault and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1226334A (en) * 1996-06-07 1999-08-18 内部技术公司 Electrically erasable and programmable no-volatile memory protected against power failure
EP1107120A1 (en) * 1999-11-30 2001-06-13 Koninklijke Philips Electronics N.V. Apparatus provided with power supply device and start-up/restart method for apparatus exposed to micro-outages of power supply
CN1650271A (en) * 2002-04-29 2005-08-03 汤姆森特许公司 System for maintaining EEPROM enable during de-energized state

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1226334A (en) * 1996-06-07 1999-08-18 内部技术公司 Electrically erasable and programmable no-volatile memory protected against power failure
EP1107120A1 (en) * 1999-11-30 2001-06-13 Koninklijke Philips Electronics N.V. Apparatus provided with power supply device and start-up/restart method for apparatus exposed to micro-outages of power supply
CN1650271A (en) * 2002-04-29 2005-08-03 汤姆森特许公司 System for maintaining EEPROM enable during de-energized state

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI678622B (en) * 2018-06-15 2019-12-01 慧榮科技股份有限公司 Development system and productization method for data storage device
US11461516B2 (en) 2018-06-15 2022-10-04 Silicon Motion, Inc. Development system and productization method for data storage device

Also Published As

Publication number Publication date
CN1949197A (en) 2007-04-18

Similar Documents

Publication Publication Date Title
CN100428203C (en) Portable equipment based on non-volatile memory and method of realizing power failure protection
CN100590606C (en) Data completeness protection method of flash storage
CN102890657A (en) Method for reducing data read-write errors of EEPROM (electrically erasable programmable read-only memory)
US20110122691A1 (en) Power management of memory systems
US7786695B2 (en) Configurable battery management system with embedded SRAM in chip architecture
CN102004706B (en) Flash erasing power-fail protection method based on FTL(Flash Translation Layer)
US10649896B2 (en) Storage device and data processing system including the same
CN103823769A (en) Computer system and data recovery method
CN103995578A (en) Member driving device possessing green energy data persisting mode
CN107329905A (en) Data storage device and flash memory control method
CN110333770A (en) Storage management method, memory storage apparatus and memorizer control circuit unit
CN103019177A (en) Single event effect monitoring system of space general-purpose memory
CN102736013B (en) A kind of idle condition method of testing of SoC chip, system and proving installation
CN101996144B (en) Flash control method and device
CN103729143A (en) Data safety method for electric energy data storage of multi-path electricity meter
CN110058973A (en) The test macro of data memory device and the test method of data memory device
CN109901664A (en) Method, apparatus, system, equipment and the readable storage medium storing program for executing of clock signal are provided
CN117632272A (en) Method and device for waking up storage device, terminal device and storage medium
CN101320389B (en) File management method and apparatus
CN101436097B (en) Electronic device and wake-up method thereof
CN108984347A (en) A kind of embedded device rebooting status recording method based on linux system
CN103176813A (en) Method for dormancy mechanism and computer system thereof
CN112748271B (en) Electric energy meter and electric quantity metering method thereof
Liu et al. Light Flash Write for Efficient Firmware Update on Energy-harvesting IoT Devices
CN103489485A (en) Flash memory quality detection method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: FEITIAN TECHNOLOGIES CO., LTD.

Free format text: FORMER NAME: BEIJING FEITIAN CHENGXIN TECHNOLOGY CO., LTD.

CP03 Change of name, title or address

Address after: 100085 Beijing city Haidian District Xueqing Road No. 9 Ebizal building B block 17 layer

Patentee after: Feitian Technologies Co.,Ltd.

Address before: 100083, Haidian District, Xueyuan Road, No. 40 research, 7 floor, 5 floor, Beijing

Patentee before: FEITIAN TECHNOLOGIES Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081022