DE102015200808A1 - A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product - Google Patents

A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product Download PDF

Info

Publication number
DE102015200808A1
DE102015200808A1 DE102015200808.8A DE102015200808A DE102015200808A1 DE 102015200808 A1 DE102015200808 A1 DE 102015200808A1 DE 102015200808 A DE102015200808 A DE 102015200808A DE 102015200808 A1 DE102015200808 A1 DE 102015200808A1
Authority
DE
Germany
Prior art keywords
memory
sector
state
data
sectors
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
DE102015200808.8A
Other languages
German (de)
Inventor
Dilip Srinivasan
Naveen Govindan
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.)
Continental Automotive GmbH
Original Assignee
Continental Automotive GmbH
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 Continental Automotive GmbH filed Critical Continental Automotive GmbH
Priority to DE102015200808.8A priority Critical patent/DE102015200808A1/en
Publication of DE102015200808A1 publication Critical patent/DE102015200808A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/20Initialising; Data preset; Chip identification

Abstract

The invention relates to a method for handling power interruptions of an erasable nonvolatile data memory, the data memory comprising individually erasable memory sectors (A, B, C) containing a plurality of memory units which can be individually written, the method being thereby characterized in that, after switching on the power supply of the data memory of at least three consecutive memory sectors (A, B, C), a comparison of status indicators (Ready, Swap, Erased, SwapBeforeEraseFull, Full) with defined status indicators takes place and depending on a constellation of the status indicators, at least three of them Memory sectors, this determined constellation associated actions are made. Furthermore, the invention relates to a corresponding electronic system and a computer program product.

Description

  • The present invention relates to a method according to the preamble of claim 1, a corresponding electronic system and a corresponding computer program product.
  • In electronic control units, especially in motor vehicles, it is transitioned to avoid external EEPROM memory (electrically erasable read only memory) in order to reduce the cost and space requirements. Instead, controller-only integrated sector-erasable flash EEPROMs (electrically erasable programmable read only memory) often adapted to behave as ordinary EEPROM memories are often used in a controller microcontroller. This adaptation is called EEPROM emulation.
  • Flash memories are organized in memory sectors and these in turn in smaller memory units (e.g., bytes, words, etc.), one sector being e.g. can consist of 256 memory units with 512 bytes each. The memories have the property that the smaller memory units can be individually addressed when writing to the flash memory, but the erasure can only take place for an entire sector and thus only for all the memory units covered by it. Writing to memory usually takes longer than reading, and an erase operation of a sector is comparatively more time consuming, e.g. several milliseconds. With conventional EEPROM memories, the memory access (read and write) and the deletion can be at the lowest level. Every time new data is stored in the individual memory cells, a deletion of already existing data must be performed for flash memories and conventional EEPROM memories. Since only a sector-by-sector erasure is possible with flash memories, there is at the same time a substantial limitation of this type of memory compared to conventional EEPROMs, namely that the lifetime or the number of executable erasures is lower, which has to be considered for applications with frequent memory processes. In order to still be able to use flash EEPROMs, an emulation of the conventional EEPROM is usually carried out in a flash memory, for which purpose at least one emulation abstraction level between application software and flash driver software is provided. For example, a sector of the emulated EEPROM flash memory from which data has been altered during processing is written to another sector of that memory, for which correspondingly more storage volume must be provided compared to the conventional EEPROM, whereby the lifetime can be increased accordingly , While one sector is described with data, the next sector to be described is prepared. Afterwards the previously active sector is deleted.
  • The power supply of a flash memory, the microcontroller or a comprehensive this electronic control unit can be interrupted during operation due to various causes suddenly. The contents of the flash memory may assume undefined states in such cases. For a system operated by the underlying control unit, for example a motor vehicle, however, data integrity is often a safety-relevant prerequisite.
  • The DE 10 2008 002 494 A1 describes a related method for updating a flash memory with an original data record storage area described with a plurality of data records and a record instance storage area in which a current version or instance of the at least one data record is storable.
  • From the DE 103 49 595 B3 also discloses a related method of writing memory sectors in individually erasable memory blocks containing a plurality of memory sectors.
  • In particular, in the case of a power cutoff during a switching operation from a filled and erased process sector to a next sector of a flash memory, this at least partially erased sector may not accept memory requests for contents thereof, even the content of the sector may be erased having.
  • The object of the invention is to provide a method by means of which sudden interruptions of the power supply for emulated EEPROM implementations can be treated, which is resource-friendly and allows the shortest possible start time.
  • This object is achieved by a method according to claim 1, an electronic system according to claim 8 and a computer program product according to claim 9.
  • The invention describes a method for handling power interruptions of an erasable nonvolatile data memory, wherein the data memory comprises individually erasable memory sectors containing a plurality of memory units which may be individually written, the A method characterized in that after switching on the power supply of the data memory of at least three consecutive memory sectors, a comparison of state indicators with defined state indicators is performed and depending on a constellation of the state indicators of at least three memory sectors, this constellation detected associated actions are made.
  • Advantageously, after a sudden interruption of the power supply, the memory sector can be identified very quickly, on which memory accesses of, for example, an application software or an emulation level should or can take place, whereby the downtime of an underlying electronic system can be reduced and erroneous memory accesses can be avoided. Handling scenarios of power interruptions is an important prerequisite for providing reliable EEPROM emulation. In other words, the invention advantageously provides a deterministic, robust and reliable EEPROM emulation that enables detection and correction of undefined flash memory states. Successive memory sectors, taking into account the sector size, are preferably consecutive sectors in their physical address of the data memory. This allows fast processing. Alternatively, memory sectors in this regard may also be sequential in a linearly mapped virtual memory area, wherein the information of the sequence of sequencing should also be retained in the event of a power interruption.
  • Preferably, prior to the comparison of the status indicators with the defined status indicators, a search is made for at least one data sector which has a status indicator that indicates an undeleted state of the data sector. The three consecutive memory sectors whose constellation is detected are preferably formed by the data sector, which has a status indicator which indicates an undeleted state of the data sector, as well as at least two further data sectors, in particular indirectly or directly adjacent. A choice of a procedure for finding the output data sector is preferably carried out according to a shortest search time.
  • According to a preferred embodiment of the invention, the status indicators or the header information of these at least three sectors are checked for plausibility before the comparison of the status indicators with the defined status indicators. Data sectors with undefined or faulty states can thus be corrected. A plausibility check of all or at least a plurality of the sectors of the data memory can take place, for example, as a separate procedure or as part of the search of the data sector, which serves as a starting point for determining the constellation of the at least three consecutive memory sectors.
  • Particularly preferably at least four state indicators are provided during operation of the data memory. Preferably, exactly five state indicators are provided. Preferably, the state indicators distinguish memory sectors that are in an erased state indicating completion of a copy operation that is ready to describe data that is filled and that is currently under copying or writing. A detection and correction of damaged data sectors and thus preserving the data integrity of Flash data storage can thus be realized by means of a very small use of resources.
  • According to an advantageous development, at least one status indicator is provided, which indicates completion of a copy operation of a content from one memory sector to another memory sector.
  • With a constellation of the memory sectors in the order of consecutive sectors:
    Memory sector in a deleted state,
    Memory sector in the completion of a copying state indicating state and
    Memory sector in a deleted state,
    For example, the memory sector having the state indicating completion of copying is preferably cleared.
  • The content of a sector in an undefined state is expediently deleted. Advantageously, therefore, a faulty behavior of the data sector, as a result of an interrupted deletion process before the interruption of the power supply, in particular for subsequent memory operations prevented.
  • The inventive method is preferably carried out during an initialization phase of the data memory and / or an underlying electronic system.
  • The invention further relates to an electronic system comprising an erasable nonvolatile data memory, the data memory comprising individually erasable memory sectors containing a multiplicity of memory units which can be individually described, and means for writing data into the data memory, the system being designed to carry out the method according to the invention.
  • In addition, the invention relates to a computer program product which is set up to perform the method according to the invention when executed on an electronic system.
  • The status indicators are preferably stored in a header of a respective sector.
  • Each memory sector of the data memory preferably comprises the header and the information (data) to be stored as such. As a result, an efficient utilization of the memory resources for the information to be stored is advantageously achieved.
  • Further preferred embodiments will become apparent from the following description of exemplary embodiments with reference to figures.
  • In a schematic representation show:
  • 1 an inventive data structure of a sector of a flash memory,
  • 2 an exemplary sequence of a change process between sectors,
  • 3 an exemplary flowchart as part of an initialization sequence of the flash memory and
  • 4 , Scenarios of states of sectors during an initialization sequence.
  • The 1 shows a schematic diagram of an exemplary data structure Data_Record the sectors of a flash memory. This includes the identifier Id, by means of which each data structure can be uniquely identified, the data to be stored Data [] and other elements, such as ensuring data integrity by adhering to predetermined bit boundaries (eg 64-bit) of the data sets Align_Byte [] and / or at least a checksum value Checksum to ensure data integrity.
  • The procedure during a change to be described sectors of a flash memory in the stepwise time t is described below with reference to 2 explained. In order to store data in a sector of a flash memory, it must be in an erased state, the potential depending on the particular implementation. The sector to be described first is prepared in such a way that data can be stored therein. For this purpose, the header information of the sector A is updated. This condition is in 2 represented by Ready. All other memory accesses of the application software take place in this sector. Data can be in step 2.1 are stored in sector A until it has no more free space, that is filled. The detection of the filled state of sector A is effected, for example, via its final absolute memory address. When the sector A is filled, the next sector B is prepared on which the memory accesses of the application software take place after the change process.
  • In particular, as described in the introduction to the introduction, to allow a very homogeneous wear of the flash memory, there is then a change ("swap") from sector A to sector B, wherein the last data of the current sector A in the state ready in the the next available deleted sector B to be copied, which state gets assigned swap 2.2 , The filled sector A is correspondingly assigned state Full 2.3 , The phase of detecting and copying the content of the sector in the state Full into the sector in the swap state can be comparatively time-consuming, which is why state swap is represented over several steps. After copying, sector B gets state SwapBeforeEraseFull 2.4 and sector A in the state Full becomes in step 2.5 cleared and thus receives state Erase. Finally, sector B gets state ready, indicating that it is for access. This will stop the switch operation and the emulator will accept new memory accesses from the application software. During a change of sectors, no access of an application software to the flash memory is implemented by the emulator. Individual steps of the change process can be made in a different order or can be provided more intermediate steps.
  • 3 shows in the form of a flow chart part of the initialization sequence of the flash memory, for example after a disconnection or interruption of the power supply, the emulation software after the start 3.1 the state information of the headers of at least three sectors by comparison 3.2 With values - eg erased, full, swap, SwapBeforeEraseFull - one or more defined value ranges checked for plausibility. If the value corresponds to one of the predefined states - Erased, Ready, Swab or SwabBeforeEraseFull - the verification of this sector can be completed. If the content does not match one of the predefined states, for example because of an undefined state as a result of a power outage, the corresponding sector in 3.3 cleared and gets the state Erased. If an error occurs during this deletion, which is in 3.5 is checked, the output of an error takes place 3.5 and the review of this sector will be completed 3.6 otherwise the verification of this sector will be terminated without issuing an error. A sector which causes an error in deletion may be assigned a corresponding state indicating a defect. The deletion of the sector can alternatively be linked to the condition that the sector is not already deleted, which can be determined by means of a memory content check. The check may initially be self-contained for all or a variety of sectors or in conjunction with a search for a data sector whose header indicates an undeleted state: Full, SwapBeforeEraseFull, Ready, Swap. After such a header has been found, it can be determined, in particular depending on the respective state, which adjacent data sectors are used for a consideration of a constellation of three consecutive data sectors. Consecutive is not to be understood in the sense of a physically addressed stringing together but may, for example, also refer to their virtual memory addressing. Following the sequence described in the description of 3 are from the description too 2 the possible scenarios of the constellations of the states of sectors in 4 shown.
  • The individual scenarios are dependent on the time of interruption of the power supply during a change process. For each of these scenarios, associated actions are performed:
    S1: sector A = ready
    Sector B = erased
    Sector C = erased
  • The emulation software is initialized in such a way that the memory accesses of the application software are directed to sector A in the ready state.
    S2: sector A = ready
    Sector B = swap
    Sector C = erased
  • Sector B in state swap is deleted and the change process is restarted.
    S3: sector A = full
    Sector B = swap
    Sector C = erased
  • Sector B in state swap is deleted and the change process is restarted.
    S4: sector A = full
    Sector B = SwapBeforeEraseFull
    Sector C = erased
  • The sector A in the state Full is cleared and the sector in the state SwapBeforeEraseFull receives the state Ready, since in this case the memory content of the sector in the state Full has already been completely copied to the next sector before the interruption.
    S5: sector A = erased
    Sector B = SwapBeforeEraseFull
    Sector C = erased
  • Sector B, which was in the state SwapBeforeEraseFull before the interruption, is cleared and receives the state Erase.
  • The scenario shown in S5 corresponds to the particularly critical case that an interruption of the power supply in the course of a deletion operation during a change process of the sectors, ie the transition from step 2.4 in step 2.5 from 2 , entry. Prior to deleting the sector in the state Full, the state SwapBeforeEraseFull of the next sector is provided in particular because in case of interruption of the power supply during a deletion of a sector in the state Full, memory accesses of the application software after restarting the flash memory to the sector not could be done even though the memory content of the sector as such had a cleared state. In particular, this occurs when the header information of a sector that can not be independently erased by the erase process is erased before that sector is completely erased. When a delete command is triggered, the entire sector is deleted and also deletes the header of the sector (eg 0xFF). Upon restart, this header information would erroneously indicate a cleared state of the entire sector. In order to ensure that sector A does not cause errors in memory operations due to an interrupted erase operation prior to the interruption of the power supply, it is erased and becomes erased even if its contents indicate an empty sector. As a result, an erroneous behavior of the sector, due to an interrupted deletion process before the interruption of the power supply, be excluded for subsequent memory operations.
  • Thus, by comparing header information from only 3 consecutive sectors, the sector to which the writing and reading memory accesses of an application software can be made can be identified.
  • Preferably, a count is provided separately for each sector for detecting the number of deletions of the respective sector, which is taken into account in the sense that a uniform wear of the sectors takes place.
  • QUOTES INCLUDE IN THE DESCRIPTION
  • This list of the documents listed by the applicant has been generated automatically and is included solely for the better information of the reader. The list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions.
  • Cited patent literature
    • DE 102008002494 A1 [0005]
    • DE 10349595 B3 [0006]

Claims (9)

  1. A method for handling power interruptions of an erasable nonvolatile data memory, the data memory comprising individually erasable memory sectors (A, B, C) containing a plurality of memory units which can be individually written, characterized in that after turning on the power supply of the Data memory of at least three consecutive memory sectors (A, B, C) is a comparison of state indicators (Ready, Swap, Erased, SwapBeforeEraseFull, Full) with defined state indicators and made depending on a constellation of the state indicators of at least three memory sectors, this constellation detected actions become.
  2. A method according to claim 1, characterized in that prior to the comparison of the state indicators with the defined state indicators, a search is carried out for at least one data sector, which has a status indicator which indicates a non-erased state (Ready, Swap, SwapBeforeEraseFull, Full) of the data sector.
  3. A method according to claim 2, characterized in that the three consecutive memory sectors whose constellation is detected are formed by the data sector having a status indicator indicating an undeleted state of the data sector and at least two further data sectors.
  4. A method according to claim 1 to 3, characterized in that the state indicators (Ready, Swap, Erased, SwapBeforeEraseFull, Full) of these at least three sectors before the comparison of the state indicators (Ready, Swap, Erased, SwapBeforeEraseFull, Full) with the defined state indicators for plausibility be checked.
  5. Method according to one of Claims 1 to 4, characterized in that at least one status indicator (SwapBeforeEraseFull) is provided, which indicates completion of a copy operation of a content from one memory sector (A, B, C) to another memory sector (A, B, C). displays.
  6. A method according to claim 5, characterized in that in a constellation (E-SBWF-E) of the memory sectors in the order of successive sectors: memory sector in an erased state, memory sector in the completion of a copy operation state (SwapBeforeEraseFull) and memory sector in a cleared state (erased), the memory sector is cleared which has the completion completion of a copy operation state (SwapBeforeEraseFull).
  7. Method according to one of claims 1 to 6, characterized in that the content of a sector located in an undefined state is deleted.
  8. An electronic system comprising an erasable non-volatile data memory, the data memory comprising individually erasable memory sectors (A, B, C) containing a plurality of memory units which can be individually written and means for writing data to the data memory, characterized the system is designed to carry out a method according to one of claims 1 to 7.
  9. A computer program product configured to perform a method according to any one of claims 1 to 8 when executed on an electronic system.
DE102015200808.8A 2015-01-20 2015-01-20 A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product Pending DE102015200808A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102015200808.8A DE102015200808A1 (en) 2015-01-20 2015-01-20 A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102015200808.8A DE102015200808A1 (en) 2015-01-20 2015-01-20 A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product

Publications (1)

Publication Number Publication Date
DE102015200808A1 true DE102015200808A1 (en) 2016-07-21

Family

ID=56293751

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102015200808.8A Pending DE102015200808A1 (en) 2015-01-20 2015-01-20 A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product

Country Status (1)

Country Link
DE (1) DE102015200808A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10349595B3 (en) 2003-10-24 2004-12-09 Hyperstone Ag Writing sectors of block-deletable memory, writes to alternative memory block sectors in sequence, storing their positions in sector table
US6834331B1 (en) * 2000-10-24 2004-12-21 Starfish Software, Inc. System and method for improving flash memory data integrity
US20050144368A1 (en) * 2003-12-30 2005-06-30 Samsung Electronics Co., Ltd. Address mapping method and mapping information managing method for flash memory, and flash memory using the same
US7478270B2 (en) * 2004-02-23 2009-01-13 Sony Corporation Information processing device and information processing method for data recovery after failure
DE102008002494A1 (en) 2008-06-18 2009-12-24 Robert Bosch Gmbh Method for actualizing flash memory for emulation of electrically EPROMs, for saving serial electrically EPROMs, in dashboard of vehicle, involves verifying actual version of data set to violation of defined rule

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6834331B1 (en) * 2000-10-24 2004-12-21 Starfish Software, Inc. System and method for improving flash memory data integrity
DE10349595B3 (en) 2003-10-24 2004-12-09 Hyperstone Ag Writing sectors of block-deletable memory, writes to alternative memory block sectors in sequence, storing their positions in sector table
US20050144368A1 (en) * 2003-12-30 2005-06-30 Samsung Electronics Co., Ltd. Address mapping method and mapping information managing method for flash memory, and flash memory using the same
US7478270B2 (en) * 2004-02-23 2009-01-13 Sony Corporation Information processing device and information processing method for data recovery after failure
DE102008002494A1 (en) 2008-06-18 2009-12-24 Robert Bosch Gmbh Method for actualizing flash memory for emulation of electrically EPROMs, for saving serial electrically EPROMs, in dashboard of vehicle, involves verifying actual version of data set to violation of defined rule

Similar Documents

Publication Publication Date Title
TWI546666B (en) Data storage device and flash memory control method
US8453021B2 (en) Wear leveling in solid-state device
KR101110785B1 (en) Flash memory with programmable endurance
US6601132B2 (en) Nonvolatile memory and method of writing data thereto
US7454670B2 (en) Data management apparatus and method of flash memory
US10642729B2 (en) Data storage device and operating method thereof wherein update to physical-to-logical mapping of destination block is restarted when closing active block
US8271719B2 (en) Non-volatile memory controller device and method therefor
US20080104361A1 (en) Storage Device, Memory Managing Apparatus, Memory Managing Method, and Program
JP2004342112A (en) Device and method for responding to data retention loss in nonvolatile memory unit using error-checking and correction techniques
US7543104B2 (en) Non-volatile semiconductor device for use in memory card and memory system
US10262741B2 (en) Read and write control circuit and method of flash chip, and AMOLED application circuit
US20140258792A1 (en) Symmetrical Data Replication For Failure Management In Non-Volatile Memory Systems
CN107045423B (en) Memory device and data access method thereof
US6646917B1 (en) Storage device managing nonvolatile memory by converting logical address to physical address of nonvolatile memory
EP2267725A1 (en) Memory device for managing the recovery of a non volatile memory
CN105225695A (en) The method for deleting of flash memory and flash memory
JP5541194B2 (en) Control device for reading and writing data to flash memory
JP4661369B2 (en) Memory controller
US7313648B2 (en) Corruption tolerant method and system for deploying and modifying data in flash memory
US8438327B2 (en) Recovery scheme for an emulated memory system
DE102015200808A1 (en) A method for handling power interruptions of a sector-by-sector erasable nonvolatile data memory, electronic system and computer program product
US20110082995A1 (en) Information processing apparatus
JP2003036209A (en) Nonvolatile memory and data rewriting method thereof
US10452309B2 (en) Method and device operating a memory device
JP5520880B2 (en) Flash memory device

Legal Events

Date Code Title Description
R163 Identified publications notified