EP1423788A2 - Method for operating a circuit arrangement containing a microcontroller and an eeprom - Google Patents

Method for operating a circuit arrangement containing a microcontroller and an eeprom

Info

Publication number
EP1423788A2
EP1423788A2 EP02760126A EP02760126A EP1423788A2 EP 1423788 A2 EP1423788 A2 EP 1423788A2 EP 02760126 A EP02760126 A EP 02760126A EP 02760126 A EP02760126 A EP 02760126A EP 1423788 A2 EP1423788 A2 EP 1423788A2
Authority
EP
European Patent Office
Prior art keywords
memory
memory area
data record
pointer
eeprom
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.)
Withdrawn
Application number
EP02760126A
Other languages
German (de)
French (fr)
Inventor
Alexander Steinert
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.)
Paragon AG
Original Assignee
Paragon AG
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 Paragon AG filed Critical Paragon AG
Publication of EP1423788A2 publication Critical patent/EP1423788A2/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • 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/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • G11C16/105Circuits or methods for updating contents of nonvolatile memory, especially with 'security' features to ensure reliable replacement, i.e. preventing that old data is lost before new data is reliably written
    • 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/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators

Definitions

  • the invention is based on a method for operating a circuit arrangement which contains a microcontroller and an EEPROM, according to the preamble of the independent claim. From DE-A 197 16 520 a generic method has become known in which operating variables of electric motors are recorded. The operating hours in particular are provided for storage. A PROM, an EPROM or an EEPROM can be provided as the long-term memory.
  • the data records to be stored are stored by irreversibly programming the PROM memory cells.
  • An EPROM can continue to be used by deleting the memory content at the end of a usage cycle. Since both types of memory only allow a data record to be stored in the same memory cell once during a usage cycle, numerous memory cells must be reserved for an operating hours counter.
  • the most flexible solution is an EEPROM, whose memory cells can be written to and erased electrically.
  • EEPROM can temporarily go into an undefined operating state if the operating voltage collapses. The result is an incorrectly stored data record.
  • the invention is based on the object of specifying a method for operating a circuit arrangement which contains a microcontroller and an EEPROM in which the EEPROM contains reliable data records.
  • the method according to the invention first provides that a first and at least a second memory area are provided in the EEPROM for storing at least one data record. Furthermore, a third memory area is created that contains a pointer that points to the valid memory area. In a first step, the microcontroller saves a data record in the invalid memory area and changes the pointer in a second step, so that the invalid becomes the valid memory area. The two steps are repeated cyclically.
  • a major advantage of the method according to the invention is that in every operating state a valid data record is stored in at least one of the at least two memory areas.
  • a malfunction in the operating sequence in particular switching off the voltage supply during a write operation, which can result in a storage operation of a data record failing in one memory area, has no effect on the correctly stored data record in the other memory area.
  • the data record last saved in the other memory area can therefore be accessed at any time.
  • a particularly advantageous development provides for the integration of a reset arrangement in the method according to the invention.
  • a detected fault in the program sequence or commissioning of the circuit arrangement triggers a reset.
  • the microcontroller reads the pointer in a first start step after a reset and reads the data record from the valid memory area to which the pointer points in a second start step.
  • the method according to the invention is particularly suitable for circuit arrangements whose operating voltage can be switched on or off by a user at any time. Since the pointer always points to a stored data record after a reset, which was saved in a normal operating state, the further method steps can always be based on a correct data record.
  • the pointer is implemented as a bit pointer. Using the least significant bit of a possibly longer data record, for example a byte, the bit pointer points to the respectively valid memory area.
  • the measure has the advantage that an error occurring during the change in the memory content of the pointer, for example due to a voltage drop, merely leads to the pointer instead of the one correct data record in one memory area being directed to the likewise correct data record in the other memory area shows.
  • Another advantageous measure provides a timer that controls the cyclical repetition of the first and second steps.
  • the timer can be included in the microcontroller. Depending on clock cycles, preferably of. are given to a quartz generator, the timer initiates the first step in which a data record is stored in the currently still invalid memory area. In the second step, the pointer is changed so that the pointer points from the invalid to the now valid memory area.
  • Another advantageous embodiment provides that the data records to be stored are incremented or decremented from cycle to cycle.
  • an operating time counter can be implemented in the simplest way.
  • the measure of the operating time can be specified with the clock frequency in connection with the timer.
  • the method according to the invention ensures that a faulty storage process does not lead to a loss of operating time, since the correct data record previously stored in the other memory area is used in the event of a reset.
  • the method according to the invention is particularly suitable for use for devices in a motor vehicle. Because of the limited electrical energy available when the motor vehicle is switched off, it is advantageous if the circuit arrangement can be switched off completely. An error that may occur when saving a data record during the switch-off process then has no further effects, since the data record that was last saved correctly is used when restarting. An application in a motor vehicle is given in an air quality sensor that The quality of the outside air is recorded and the control signals are sent to an air conditioning system. The operating time counter can be used to make both short-term and long-term corrections to the sensor signal.
  • FIG. 1 shows a block diagram of a circuit arrangement in which an inventive method according to FIG. 2 runs.
  • the circuit arrangement contains a microcontroller 10, an EEPROM 11 and a reset arrangement 12. Both the reset arrangement 12 and the EEPROM 11 are connected to a power supply line 13 which can be connected to an energy source 15 via a switch 14.
  • the reset arrangement 12 outputs a reset signal 16 to a processor core 17.
  • a clock signal 18, which is provided by a clock generator 19, and a timer signal 20, which is provided by a timer 21, are also fed to the processor core 17.
  • the microcontroller 10 contains a reset memory 22, a data record memory 23, a pointer memory 24, a data record offset memory 25 and a pointer offset memory 26.
  • the microcontroller 10 communicates with the EEPROM 11 via a bidirectional data bus 27 and via an address bus 28.
  • the EEPROM 11 contains a first, second, third and fourth memory area 29, 30, 31, 32.
  • the first memory area 29 contains a first, second and third data record memory DAl, DA2, DA3.
  • the second memory area 30 also contains a first, second and third data record memory DB1, DB2, DB3.
  • the third memory area 31 contains a first, second and third pointer P1, P2, P3.
  • the fourth memory area 32 contains a first and second data offset memory OA, OB and a pointer offset memory OP.
  • FIG. 2 shows a method according to the invention which, after a start S, provides a reset process in a first start step 50.
  • a second start step 51 the reading of the pointer P1, P2, P3 is provided.
  • a third start step 52 a data record is read out of either the first or second memory area 29, 30, depending on which memory area 29, 30 the pointer P1, P2, P3 points to as the valid memory area 29, 30.
  • a data record is stored in a data record memory DA1, DA2, DA3 or DB1, DB2, DB3 which lies in the first or second memory area 29, 30 marked as invalid.
  • the pointer P1, P2, P3 is changed so that it points to the now valid first or second memory area 29, 30.
  • the power supply line 13 is connected via the switch 14 to the energy source 15, for example a battery.
  • the reset signal 16 causes the microcontroller 10 to restart an execution program.
  • the information required for a reset is stored in the reset memory 23.
  • the reset memory 23 is preferably contained in a ROM, the content of which is determined by the manufacturer.
  • the ROM can be contained in the microcontroller 10.
  • the first start step 50 is carried out, which corresponds to the Resetvo gang.
  • the microcontroller 10 is connected to the EEPROM 11 via the data bus 27 and the address bus 28.
  • EEPROM Electrical Erasable and Programmable Memory
  • the term "EEPROM” is used here for a type of memory that does not lose its content after the operating voltage is switched off and whose memory cells can be written to multiple times.
  • the EEPROM can be contained in the microcontroller 10, which in this case can already be referred to as a microprocessor.
  • the pointer P1, P2, P3 is accommodated in the third memory area 31 of the EEPROM 11.
  • the pointer P1, P2, P3 is a data record from which it emerges whether the first or second memory area 29, 30 of the EEPROM 11 is valid or is invalid.
  • the pointer P1, P2, P3 is preferably implemented as a bit pointer, so that only one bit is required which has the state 0 or 1. When the bit pointer is implemented with, for example, one byte, the information is preferably encoded in the least significant bit.
  • the first, second and third pointers P1, P2, P3 are shown in the exemplary embodiment shown. Which of the three pointers P1, P2, P3 contains the current information results from the data record stored in the pointer offset memory OP, which is accommodated in the fourth memory area 32 of the EEPROM 11.
  • the microcontroller 10 reaches the applicable pointer P1, P2, P3 by reading the offset address stored in the pointer offset memory OP, which preferably relates to a microcontroller 10 that is known to the microcontroller Base address is to be added.
  • further pointers can be contained, which differ only in the address in the EEPROM 11.
  • the main reason for the provision of the different pointer Pl, P2, P3 is the limited number of technical reasons, to write data to the EEPROM 11 in the same location '. Therefore, the offset in the pointer offset memory OP is changed to a different value after a predetermined number of storage processes, which leads to the next pointer P1, P2, P3.
  • the pointer P1, P2, P3 "migrates" to a certain extent through the EEPROM 11.
  • the information about how many storage processes have occurred since the EEPROM 11 was put into operation can be stored in a memory cell of the EEPROM 11, not shown in any more detail.
  • the information about the " number of storage processes that have already taken place can be determined from the data record stored in the data record memory DA1, DA2, DA3 or DB1, DB2, DB3.
  • This configuration is possible, for example, as part of an operating time counter that can be implemented as follows:
  • the timing is determined by the microcontroller 10 by means of the clock generator 19, which is preferably a quartz generator, and by means of the timer 21.
  • a time cycle of 10 seconds for example, enables a maximum time of approximately 46603 hours with a counter that has three byte binary memory cells.
  • the operating time counter is preferably accommodated in the data record memory DA1, DA2, DA3 or DB1, DB2, DB3 of the EEPROM 11. Data loss that can occur due to an incorrect storage process must be avoided under all circumstances.
  • the division into the first and the at least one further memory area 29, 30 is therefore provided.
  • the first memory area contains the first, second and third data record memories DA1, DA2, DA3 and the second memory area contains the first, second and third data record memories DB1, DB2, DB3.
  • the first data offset memory OA contains the offset for the data set memory DAI, DA2, DA3 in the first memory area 29 and the 'second data offset memory OB contains the offset for the data set memory DBl, DB2, DB3 30 in the second storage area, the record memory DAI, DA2, DA3 and DB1, DB2, DB3 "wander" through the EEPROM 11 to a certain extent.
  • the processor core 17 adds a unit, for example a one, to a data record reflecting the time and stores the new data record defined in this way in either the first data record memory DA1 or the first data record memory DB1 depending on which memory area 29, 30 is marked as invalid by the pointer P1.
  • the pointer P1, P2, P3 the following also exclusively refers to the pointer P1.
  • the processor core 17 can obtain the data record reflecting the operating time, for example from the data record memory DA1 or Read DB1, which is located in the memory area 29, 30 marked as valid by the pointer P1.
  • a RAM memory 23 is preferably created in the microcontroller 10 for this data set.
  • the pointer memory 24, the data record offset memory 25 and the pointer offset memory 26 are preferably provided as RAM memories.
  • the first step 53 provided according to the invention in which a data record is stored in the first data record memory DA1, DB1 of the memory area 29, 30 marked as invalid, is followed by a second step 54 provided according to the invention, in which the pointer P1 is changed to a value which corresponds to the another memory area 29, 30, in which a data record was last saved, is declared the valid memory area 29, 30.
  • the exemplary embodiment with only two memory areas 29, 30 has the advantage that the pointer P1, P2, P3 can be implemented as a bit pointer, which in the simplest case only has to have a memory bit that assumes the value 0 or 1.
  • first and second steps 53, 54 are processed cyclically. If at any point in time, for example by opening switch 14, an incorrect value has been stored in data record memory DA1, DB1, the data record stored in the previous cycle is still available in the corresponding other data record memory DA1, DB1 because the bit pointer Pl still points to the old valid data record memory DA1, DB1.
  • the reset circuit 12 becomes active and generates the reset signal 16.
  • the pointer P1 is read out in the first start step already described and in the second start step 51 the data record is read out of the first data record memory DA1, DB1 of the valid memory area 29, 30 and used as the basis for the further program run. Possibly. the pointer offset memory OP must also be read out, provided that a plurality of pointers P1, P2, P3 are provided due to the limited number of write cycles of the EEPROM 11.
  • the offset for the data record memory may also be read out from the first or second data offset memory OA, OB, if 11 data record memories DA2, DA3 instead of just one data record memory DA1, DB1 in the first or second memory area 29, 30 due to the limited number of memory cycles of the EEPROM are present in the first memory area 29 and correspondingly further data record memories DB2, DB3 in the second memory area 30.
  • the microcontroller 10 determines the valid data offset memory OA, OB based on the content of the pointer P1, P2, P3.
  • the method according to the invention is particularly suitable for use for devices which are installed in a motor vehicle.
  • the method according to the invention enables despite the complete switch-off option and the data errors that may occur as a result of this during a switch-off process in the EEPROM 11 during the switch-off process a safe operation of the circuit arrangement.
  • a preferred use in a motor vehicle is in an air quality sensor, which can use an operating time counter to correct the signals with regard to short-term and with regard to long-term changes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (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 relates to a method for operating a circuit arrangement containing a microcontroller (10) and an EEPROM (11). A first memory area (39) having at least one data set memory (DA1, DA2, DA3) and at least one second memory area (30) also having at least one data set memory (DB1, DB2, DB3) are provided in the EEPROM (11). A pointer (P1, P2, P3) located in a third memory area (31) refers to the respectively valid memory area (29, 30). In one step (53), the microcontroller (10) stores a data set in the invalid memory area (29, 30) and, in a subsequent step (54), changes the pointer (P1, P2, P3) so that the invalid memory area (29, 30) becomes the valid memory area (30, 29). Both steps (53, 54) are cyclically repeated. In the event of a fault during a storage process, a correct data set is available at all times in the memory area (29, 30) indicated as being valid.

Description

Verfahren zum Betreiben einer Schaltungsanorcinung, die einen MikrocontroUer und ein EEPROM enthältMethod for operating a circuit arrangement which contains a microcontroller and an EEPROM
Stand der TechnikState of the art
Die Erfindung geht aus von einem Verfahren zum Betreiben einer Schaltungsanordnung, die einen MikrocontroUer und ein EEPROM enthält, nach der Gattung des unabhängigen Anspruchs. Aus der DE-A 197 16 520 ist ein gattungsgemäßes Verfahren bekannt geworden, bei dem Betriebsgrößen von Elektromotoren erfasst werden. Zur Speicherung vorgesehen sind insbesondere die Betriebsstunden. Als Langzeitspeicher kann ein PROM, ein EPROM oder ein EEPROM vorgesehen sein.The invention is based on a method for operating a circuit arrangement which contains a microcontroller and an EEPROM, according to the preamble of the independent claim. From DE-A 197 16 520 a generic method has become known in which operating variables of electric motors are recorded. The operating hours in particular are provided for storage. A PROM, an EPROM or an EEPROM can be provided as the long-term memory.
Bei einem PROM werden die abzulegenden Datensätze durch irreversibles Programmieren der PROM-Speicherzellen gespeichert. Ein EPROM kann durch das Löschen des Speicherinhalts am Ende eines Nutzungszyklus weiter verwendet werden. Da beide Speichertypen die Speicherung eines Datensatzes in derselben Speicherzelle während eines Nutzungszyklus nur einmal zulassen, sind für einen Betriebsstundenzähler zahlreiche Speicherzellen zu reservieren.In the case of a PROM, the data records to be stored are stored by irreversibly programming the PROM memory cells. An EPROM can continue to be used by deleting the memory content at the end of a usage cycle. Since both types of memory only allow a data record to be stored in the same memory cell once during a usage cycle, numerous memory cells must be reserved for an operating hours counter.
Die flexibelste Lösung sieht ein EEPROM vor, dessen Speicherzellen elektrisch beschreib- und löschbar sind. Den Vorteilen des Einsatzes eines EEPROMs stehen aber auch Nachteile gegenüber. Das EEPROM kann vorübergehend in einen Undefinierten Betriebszustand gelangen, wenn während eines Spei- chervorgangs die Betriebsspannung zusammenbricht. Die Folge ist ein fehlerhaft hinterlegter Datensatz .The most flexible solution is an EEPROM, whose memory cells can be written to and erased electrically. However, there are also disadvantages to the advantages of using an EEPROM. The EEPROM can temporarily go into an undefined operating state if the operating voltage collapses. The result is an incorrectly stored data record.
Der Erfindung liegt die Aufgabe zugrunde, ein Verfahren zum Betreiben einer Schaltungsanordnung anzugeben, die einen MikrocontroUer und ein EEPROM enthält, bei dem das EEPROM zuverlässige Datensätze enthält.The invention is based on the object of specifying a method for operating a circuit arrangement which contains a microcontroller and an EEPROM in which the EEPROM contains reliable data records.
Die Aufgabe wird durch die im unabhängigen Anspruch angegebenen Merkmale gelöst.The object is achieved by the features specified in the independent claim.
Vorteile der ErfindungAdvantages of the invention
Das erfindungsgemäße Verfahren sieht zunächst vor, dass im EEPROM ein erster und zumindest ein zweiter Speicherbereich zur Speicherung zumindest eines Datensatzes vorgesehen werden. Weiterhin wird ein dritter Speicherbereich angelegt, der einen Pointer enthält, welcher auf den gültigen Speicherbereich zeigt. Der MikrocontroUer speichert in einem ersten Schritt einen Datensatz in den ungültigen Speicherbereich und ändert in einem zweiten Schritt den Pointer, so dass der ungültige zum gültigen Speicherbereich wird. Die beiden Schritte werden zyklisch wiederholt.The method according to the invention first provides that a first and at least a second memory area are provided in the EEPROM for storing at least one data record. Furthermore, a third memory area is created that contains a pointer that points to the valid memory area. In a first step, the microcontroller saves a data record in the invalid memory area and changes the pointer in a second step, so that the invalid becomes the valid memory area. The two steps are repeated cyclically.
Ein wesentlicher Vorteil des erfindungsgemäßen Verfahrens liegt darin, dass in jedem Betriebszustand ein gültiger Datensatz zumindest in einem der wenigstens zwei Speicherbereichen abgelegt ist. Eine Störung im Betriebsablauf, insbesondere ein Abschalten der SpannungsVersorgung während eines Schreibvorgangs, die zur Folge haben kann, dass ein Speichervorgang eines Datensatzes in einen Speicherbereich fehlschlägt, hat keine Auswirkungen auf den korrekt abgelegten Datensatz im anderen Speicherbereich. Es kann daher jederzeit auf den zuletzt abgespeicherten Datensatz im anderen Speicherbereich zurückgegriffen werden. Eine besonders vorteilhafte Weiterbildung sieht die Einbindung einer Resetanordnung in das erfindungsgemäße Verfahren vor. Eine erkannte Störung im Programmablauf oder eine Inbetriebnahme der Schaltungsanordnung löst einen Reset aus. Erfindungsgemäß ist vorgesehen, dass der MikrocontroUer nach einem Reset in einem ersten Startschritt den Pointer ausliest und in einem zweiten Startschritt den Datensatz aus dem gültigen Speicherbereich ausliest, auf den der Pointer zeigt.A major advantage of the method according to the invention is that in every operating state a valid data record is stored in at least one of the at least two memory areas. A malfunction in the operating sequence, in particular switching off the voltage supply during a write operation, which can result in a storage operation of a data record failing in one memory area, has no effect on the correctly stored data record in the other memory area. The data record last saved in the other memory area can therefore be accessed at any time. A particularly advantageous development provides for the integration of a reset arrangement in the method according to the invention. A detected fault in the program sequence or commissioning of the circuit arrangement triggers a reset. According to the invention it is provided that the microcontroller reads the pointer in a first start step after a reset and reads the data record from the valid memory area to which the pointer points in a second start step.
Das erfindungsgemäße Verfahren eignet sich insbesondere für Schaltungsanordnungen, deren Betriebsspannung von einem Benutzer jederzeit ein- bzw. abgeschaltet werden kann. Da der Pointer nach einem Reset stets auf einen gespeicherten Datensatz zeigt, der in einem normalen Betriebszustand abgespeichert wurde, kann den weiteren Verfahrensschritten immer ein korrekter Datensatz zugrunde gelegt werden.The method according to the invention is particularly suitable for circuit arrangements whose operating voltage can be switched on or off by a user at any time. Since the pointer always points to a stored data record after a reset, which was saved in a normal operating state, the further method steps can always be based on a correct data record.
Eine vorteilhafte Ausgestaltung sieht vor, dass der Pointer als Bitpointer realisiert ist. Der Bitpointer zeigt anhand des niederwertigsten Bits eines ggf. längeren Datensatzes, beispielsweise eines Bytes, auf den jeweils gültigen Speicherbereich. Die Maßnahme weist den Vorteil auf, dass ein während des Änderns des Speicherinhalts des Pointers auftretender Fehler, beispielsweise durch einen Spannungseinbruch, lediglich dazu führt, dass der Pointer anstelle auf den einen korrekten Datensatz in einem Speicherbereich auf den e- benfalls korrekten Datensatz im anderen Speicherbereich zeigt.An advantageous embodiment provides that the pointer is implemented as a bit pointer. Using the least significant bit of a possibly longer data record, for example a byte, the bit pointer points to the respectively valid memory area. The measure has the advantage that an error occurring during the change in the memory content of the pointer, for example due to a voltage drop, merely leads to the pointer instead of the one correct data record in one memory area being directed to the likewise correct data record in the other memory area shows.
Aufgrund der sequentiellen Arbeitsweise des Mikrocontrollers kann ausgeschlossen werden, dass mehr als ein Speichervorgang fehlerhaft durchgeführt wird. Ein im zumindest vorangegangenen Zyklus hinterlegter korrekter Datensatz steht daher in jedem Fall nach einem Reset zur Verfügung. Eine andere vorteilhafte Maßnahme sieht einen Timer vor, der die zyklische Wiederholung des ersten und zweiten Schritts steuert. Der Timer kann im MikrocontroUer enthalten sein. In Abhängigkeit von Taktzyklen, die vorzugsweise von. einem Quarzgenerator vorgegebenen werden, veranlasst der Timer den ersten Schritt, in welchem ein Datensatz in den derzeit noch ungültigen Speicherbereich gespeichert wird. Im zweiten Schritt wird der Pointer geändert, so dass der Pointer vom ungültigen auf den nunmehr gültigen Speicherbereich zeigt. Die Maßnahme weist den Vorteil auf, dass unabhängig vom Programmablauf im MikrocontroUer nach vorgegebenen Zeiten das erfindungsgemäße Verfahren mit den beiden Schritten stattfindet.Due to the sequential operation of the microcontroller, it can be ruled out that more than one storage process will be performed incorrectly. A correct data record stored in the at least previous cycle is therefore always available after a reset. Another advantageous measure provides a timer that controls the cyclical repetition of the first and second steps. The timer can be included in the microcontroller. Depending on clock cycles, preferably of. are given to a quartz generator, the timer initiates the first step in which a data record is stored in the currently still invalid memory area. In the second step, the pointer is changed so that the pointer points from the invalid to the now valid memory area. The measure has the advantage that the method according to the invention takes place with the two steps after predetermined times, regardless of the program sequence in the microcontroller.
Eine andere vorteilhafte Ausgestaltung sieht vor, dass die zu speichernden Datensätze von Zyklus zu Zyklus inkremen- tiert oder dekrementiert werden. Mit dieser Maßnahme ist auf einfachste Weise ein Betriebszeitzähler realisierbar. Das Maß für die Betriebszeit kann mit der Taktfrequenz in Verbindung mit dem Timer vorgegeben werden. Das erfindungsgemäße Verfahren stellt sicher, dass bei einem fehlerhaften Speichervorgang nicht zum Verlust der Betriebszeit führt, da bei einem Reset auf den zuvor im anderen Speicherbereich gespeicherten korrekten Datensatz zurückgegriffen wird.Another advantageous embodiment provides that the data records to be stored are incremented or decremented from cycle to cycle. With this measure, an operating time counter can be implemented in the simplest way. The measure of the operating time can be specified with the clock frequency in connection with the timer. The method according to the invention ensures that a faulty storage process does not lead to a loss of operating time, since the correct data record previously stored in the other memory area is used in the event of a reset.
Das erfindungsgemäße Verfahren eignet sich insbesondere zur Verwendung für Vorrichtungen in einem Kraftfahrzeug. Aufgrund der nur begrenzt zur Verfügung stehenden elektrischen Energie im abgeschalteten Zustand des Kraftfahrzeugs ist es vorteilhaft, wenn die Schaltungsanordnung vollständig abgeschaltet werden kann. Ein ggf. auftretender Fehler beim Speichern eines Datensatzes während des Abschaltvorgangs hat dann keine weiteren Auswirkungen, da bei der Wiederinbetriebnahme auf den zuletzt korrekt gespeicherten Datensatz zurückgegriffen wird. Eine Einsatzmöglichkeit in einem Kraftfahrzeug ist bei einem Luftgütesensor gegeben, der die Qualität der Aussenluft erfasst und der Steuersignale an eine Klimaanlage abgibt. Anhand des Betriebszeitzählers können sowohl Kurzzeit- als auch Langzeitkorrekturen des Sensorsignals vorgenommen werden.The method according to the invention is particularly suitable for use for devices in a motor vehicle. Because of the limited electrical energy available when the motor vehicle is switched off, it is advantageous if the circuit arrangement can be switched off completely. An error that may occur when saving a data record during the switch-off process then has no further effects, since the data record that was last saved correctly is used when restarting. An application in a motor vehicle is given in an air quality sensor that The quality of the outside air is recorded and the control signals are sent to an air conditioning system. The operating time counter can be used to make both short-term and long-term corrections to the sensor signal.
Weitere vorteilhafte Ausgestaltungen des erfindungsgemäßen Verfahrens ergeben sich aus weiteren abhängigen Ansprüchen und aus der folgenden Beschreibung.Further advantageous embodiments of the method according to the invention result from further dependent claims and from the following description.
Figur 1 zeigt ein Blockschaltbild einer Schaltungsanordnung, in der ein erfindungsgemäßes Verfahren gemäß Figur 2 abläuft .FIG. 1 shows a block diagram of a circuit arrangement in which an inventive method according to FIG. 2 runs.
Die Schaltungsanordnung enthält einen MikrocontroUer 10, ein EEPROM 11 und eine Resetanordnung 12. Sowohl die Reseta- nordnung 12 als auch das EEPROM 11 sind mit einer Stromversorgungsleitung 13 verbunden, die über einen Schalter 14 mit einer Energiequelle 15 verbindbar ist.The circuit arrangement contains a microcontroller 10, an EEPROM 11 and a reset arrangement 12. Both the reset arrangement 12 and the EEPROM 11 are connected to a power supply line 13 which can be connected to an energy source 15 via a switch 14.
Die Resetanordnung 12 gibt ein Resetsignal 16 an einen Prozessorkern 17 ab. Dem Prozessorkern 17 werden weiterhin zugeführt ein Taktsignal 18, das von einem Taktgenerator 19 bereitgestellt ist, sowie ein Timersignal 20, das ein Timer 21 bereitstellt.The reset arrangement 12 outputs a reset signal 16 to a processor core 17. A clock signal 18, which is provided by a clock generator 19, and a timer signal 20, which is provided by a timer 21, are also fed to the processor core 17.
Der MikrocontroUer 10 enthält einen Resetspeicher 22, einen Datensatzspeicher 23, einen Pointerspeicher 24, einen Datensatzoffsetspeicher 25 sowie einen Pointeroffsetspeicher 26.The microcontroller 10 contains a reset memory 22, a data record memory 23, a pointer memory 24, a data record offset memory 25 and a pointer offset memory 26.
Der MikrocontroUer 10 kommuniziert mit dem EEPROM 11 über einen bidirektionalen Datenbus 27 sowie über einen Adressbus 28.The microcontroller 10 communicates with the EEPROM 11 via a bidirectional data bus 27 and via an address bus 28.
Das EEPROM 11 enthält einen ersten, zweiten, dritten und vierten Speicherbereich 29, 30, 31, 32. Der erste Speicherbereich 29 enthält einen ersten, zweiten und dritten Daten- satzspeicher DAl, DA2 , DA3. Der zweite Speicherbereich 30 enthält ebenfalls einen ersten, zweiten und dritten Datensatzspeicher DBl, DB2, DB3. Der dritte Speicherbereich 31 enthält einen ersten, zweiten und dritten Pointer Pl , P2 , P3. Der vierte Speicherbereich 32 enthält einen ersten und zweiten Datenoffsetspeicher OA, OB sowie einen Pointeroff- setspeicher OP.The EEPROM 11 contains a first, second, third and fourth memory area 29, 30, 31, 32. The first memory area 29 contains a first, second and third data record memory DAl, DA2, DA3. The second memory area 30 also contains a first, second and third data record memory DB1, DB2, DB3. The third memory area 31 contains a first, second and third pointer P1, P2, P3. The fourth memory area 32 contains a first and second data offset memory OA, OB and a pointer offset memory OP.
Figur 2 zeigt ein erfindungsgemäßes Verfahren, das nach einem Start S in einem ersten Startschritt 50 einen Resetvor- gang vorsieht. In einem zweiten Startschritt 51 ist ein Auslesen des Pointers Pl, P2 , P3 vorgesehen. In einem dritten Startschritt 52 wird ein Datensatz entweder aus dem ersten oder zweiten Speicherbereich 29, 30 ausgelesen, je nachdem auf welchen Speicherbereich 29, 30 der Pointer Pl, P2 , P3 als dem gültigen Speicherbereich 29, 30 zeigt.FIG. 2 shows a method according to the invention which, after a start S, provides a reset process in a first start step 50. In a second start step 51, the reading of the pointer P1, P2, P3 is provided. In a third start step 52, a data record is read out of either the first or second memory area 29, 30, depending on which memory area 29, 30 the pointer P1, P2, P3 points to as the valid memory area 29, 30.
In einem ersten Schritt 53 wird ein Datensatz in einen Datensatzspeicher DAl, DA2, DA3 bzw. DBl, DB2 , DB3 gespeichert, der in dem als ungültig gekennzeichneten ersten bzw. zweiten Speicherbereich 29, 30 liegt. In einem zweiten Schritt 54 wird der Pointer Pl, P2 , P3 geändert, so dass er auf den nunmehr gültigen ersten oder zweiten Speicherbereich 29, 30 zeigt.In a first step 53, a data record is stored in a data record memory DA1, DA2, DA3 or DB1, DB2, DB3 which lies in the first or second memory area 29, 30 marked as invalid. In a second step 54, the pointer P1, P2, P3 is changed so that it points to the now valid first or second memory area 29, 30.
Das erfindungsgemäße Verfahren zum Betreiben der Schaltungsanordnung arbeitet folgerdermaßen:The method according to the invention for operating the circuit arrangement works as follows:
Zunächst wird die Stromversorgungsleitung 13 über den Schalter 14 mit der Energiequelle 15, beispielsweise eine Batterie, verbunden. Die Resetanordnung 12, die im Mikrocontrol- ler 10 enthalten sein kann, stellt das Resetsignal 16 bereit. Das Resetsignal 16 veranlasst den MikrocontroUer 10 zu einem Neustart eines AblaufProgramms . Die für einen Reset benötigte Information, im allgemeinen eine Startadresse, ist im Resetspeicher 23 gespeichert. Der Resetspeicher 23 ist vorzugsweise in einem ROM enthalten, dessen Inhalt herstel- lerseitig festgelegt ist. Das ROM kann im MikrocontroUer 10 enthalten sein.First, the power supply line 13 is connected via the switch 14 to the energy source 15, for example a battery. The reset arrangement 12, which can be contained in the microcontroller 10, provides the reset signal 16. The reset signal 16 causes the microcontroller 10 to restart an execution program. The information required for a reset, generally a start address, is stored in the reset memory 23. The reset memory 23 is preferably contained in a ROM, the content of which is determined by the manufacturer. The ROM can be contained in the microcontroller 10.
Nach dem Start S, der durch Betätigen des Schalters 14 eingeleitet wird, wird der erste Startschritt 50 durchgeführt, der dem Resetvo gang entspricht.After the start S, which is initiated by actuating the switch 14, the first start step 50 is carried out, which corresponds to the Resetvo gang.
Der MikrocontroUer 10 steht über den Datenbus 27 und den Adressbus 28 mit dem EEPROM 11 in Verbindung. Der Begriff "EEPROM" (Electrical Erasable and Programmable Memory) wird hier verwendet für einen Speichertyp, der nach dem Abschalten der Betriebsspannung seinen Inhalt nicht verliert und dessen Speicherzellen mehrfach beschreibbar sind. Das EEPROM kann im MikrocontroUer 10 enthalten sein, der in diesem Fall bereits als Mikroprozessor bezeichnet werden kann.The microcontroller 10 is connected to the EEPROM 11 via the data bus 27 and the address bus 28. The term "EEPROM" (Electrical Erasable and Programmable Memory) is used here for a type of memory that does not lose its content after the operating voltage is switched off and whose memory cells can be written to multiple times. The EEPROM can be contained in the microcontroller 10, which in this case can already be referred to as a microprocessor.
Im dritten Speicherbereich 31 des EEPROMs 11 ist der Pointer Pl, P2 , P3 untergebracht. Der Pointer Pl, P2 , P3 ist ein Datensatz, aus dem hervorgeht, ob der erste oder zweite Speicherbereich 29, 30 des EEPROMs 11 gültig ist bzw. ungültig ist. Vorzugsweise wird der Pointer Pl, P2 , P3 als Bitpointer realisiert, so dass nur ein Bit benötigt wird, das den Zustand 0 oder 1 aufweist. Bei der Realisierung des Bitpoin- ters mit beispielsweise einem Byte, wird die Information vorzugsweise im niederwertigsten Bit kodiert.The pointer P1, P2, P3 is accommodated in the third memory area 31 of the EEPROM 11. The pointer P1, P2, P3 is a data record from which it emerges whether the first or second memory area 29, 30 of the EEPROM 11 is valid or is invalid. The pointer P1, P2, P3 is preferably implemented as a bit pointer, so that only one bit is required which has the state 0 or 1. When the bit pointer is implemented with, for example, one byte, the information is preferably encoded in the least significant bit.
Anstelle eines Pointers sind im gezeigten Ausführungsbei- spiel der erste, zweite und dritte Pointer Pl, P2 , P3 gezeigt. Welcher der drei Pointer Pl, P2 , P3 die aktuelle Information enthält, ergibt sich aus dem im Pointeroffsetspeicher OP gespeicherten Datensatz, der im vierten Speicherbereich 32 des EEPROMs 11 untergebracht ist. Der Mikrocontrol- ler 10 erreicht den geltenden Pointer Pl, P2 , P3 durch lesen der im Pointeroffsetspeicher OP hinterlegten Offsetadresse, die vorzugsweise zu einer dem MikrocontroUer 10 bekannten Basisadresse zu addieren ist. Anstelle der drei gezeigten Pointer Pl, P2 , P3 können noch weitere Pointer enthalten sein, die sich lediglich durch die Adresse im EEPROM 11 unterscheiden.Instead of a pointer, the first, second and third pointers P1, P2, P3 are shown in the exemplary embodiment shown. Which of the three pointers P1, P2, P3 contains the current information results from the data record stored in the pointer offset memory OP, which is accommodated in the fourth memory area 32 of the EEPROM 11. The microcontroller 10 reaches the applicable pointer P1, P2, P3 by reading the offset address stored in the pointer offset memory OP, which preferably relates to a microcontroller 10 that is known to the microcontroller Base address is to be added. Instead of the three pointers P1, P2, P3 shown, further pointers can be contained, which differ only in the address in the EEPROM 11.
Der wesentliche Grund für das Vorsehen der unterschiedlichen Pointer Pl, P2 , P3 liegt' in der aus technischen Gründen begrenzten Anzahl, Daten in das EEPROM 11 in dieselbe Speicherstelle schreiben zu können. Deshalb wird der Offset im Pointeroffsetspeicher OP nach einer vorgegebenen Anzahl von Speichervorgängen geändert auf einen anderen Wert, der auf den nächsten Pointer Pl , P2 , P3 führt . Der Pointer Pl , P2 , P3 "wandert" gewissermaßen durch das EEPROM 11. Die Information darüber, wieviel Speichervorgänge seit Inbetriebnahme des EEPROMs 11 aufgetreten sind, kann in einer nicht näher gezeigten Speicherzelle des EEPROMs 11 hinterlegt sein.The main reason for the provision of the different pointer Pl, P2, P3 is the limited number of technical reasons, to write data to the EEPROM 11 in the same location '. Therefore, the offset in the pointer offset memory OP is changed to a different value after a predetermined number of storage processes, which leads to the next pointer P1, P2, P3. The pointer P1, P2, P3 "migrates" to a certain extent through the EEPROM 11. The information about how many storage processes have occurred since the EEPROM 11 was put into operation can be stored in a memory cell of the EEPROM 11, not shown in any more detail.
Vorteilhafterweise kann die Information über die" Anzahl der bereits erfolgten Speichervorgängen aus dem im Datensatz- Speicher DAl, DA2 , DA3 bzw. DBl, DB2 , DB3 gespeicherten Datensatz ermittelt werden. Diese Ausgestaltung ist beispielsweise im Rahmen eines Betriebszeitzählers möglich, der folgendermaßen realisierbar ist:Advantageously, the information about the " number of storage processes that have already taken place can be determined from the data record stored in the data record memory DA1, DA2, DA3 or DB1, DB2, DB3. This configuration is possible, for example, as part of an operating time counter that can be implemented as follows:
Der Zeittakt wird vom MikrocontroUer 10 mittels des Taktgenerators 19, der vorzugsweise ein Quarzgenerator ist, und mittels des Timers 21 festgelegt. Ein Zeittakt von beispielsweise 10 Sekunden ermöglicht mit einem Zähler, der drei Byte binäre Speicherzellen aufweist, eine maximale Zeitvorgabe von etwa 46603 Stunden. Der Betriebszeitzähler wird vorzugsweise im Datensatzspeicher DAl, DA2 , DA3 bzw. DBl, DB2, DB3 des EEPROMs 11 untergebracht. Ein Datenverlust, der durch einen fehlerhaften Speichervorgang auftreten kann, ist unter allen Umständen zu vermeiden. Erfindungsgemäß ist deshalb die Aufteilung auf den ersten und den wenigstens einen weiteren Speicherbereich 29, 30 vorgesehen. Der erste Speicherbereich enthält den ersten, zweiten und dritten Datensatzspeicher DAl, DA2 , DA3 und der zweite Speicherbereich enthält den ersten, zweiten und dritten Daten- satzspeicher DBl, DB2 , DB3.The timing is determined by the microcontroller 10 by means of the clock generator 19, which is preferably a quartz generator, and by means of the timer 21. A time cycle of 10 seconds, for example, enables a maximum time of approximately 46603 hours with a counter that has three byte binary memory cells. The operating time counter is preferably accommodated in the data record memory DA1, DA2, DA3 or DB1, DB2, DB3 of the EEPROM 11. Data loss that can occur due to an incorrect storage process must be avoided under all circumstances. According to the invention, the division into the first and the at least one further memory area 29, 30 is therefore provided. The first memory area contains the first, second and third data record memories DA1, DA2, DA3 and the second memory area contains the first, second and third data record memories DB1, DB2, DB3.
Der Grund dafür, dass anstelle jeweils eines Datensatzspeichers mehrere Datensatzspeicher DAl, DA2 , DA3 bzw. DBl, DB2 , DB3 vorgesehen sind, liegt wieder darin, dass die maximale Anzahl von Schreibvorgängen in dieselbe Speicherzelle des EEPROMS 11 begrenzt ist. Nach einer vorgegebenen Anzahl von Speichervorgängen kann deshalb mit dieser Maßnahme auf einen anderen Datensatzspeicher gewechselt werden werden. Ebenso wie beim Pointer Pl, P2 , P3 ist auch hier, vorzugsweise ausgehend von einer Basisadresse, ein Offset zu addieren, der vorzugsweise in den Datenoffsetspeichern OA, OB hinterlegt ist. Der erste Datenoffsetspeicher OA enthält den Offset für die Datensatzspeicher DAl, DA2 , DA3 im ersten Speicherbereich 29 und der' zweite Datenoffsetspeicher OB enthält den Offset für die Datensatzspeicher DBl, DB2 , DB3 im zweiten Speicherbereich 30. Die Datensatzspeicher DAl, DA2 , DA3 bzw. DBl, DB2, DB3 "wandern" gewissermaßen durch das EEPROM 11.The reason that instead of one data record memory in each case several data record memories DA1, DA2, DA3 or DB1, DB2, DB3 is provided is that the maximum number of write operations into the same memory cell of the EEPROM 11 is limited. After a predetermined number of storage processes, this measure can therefore be used to switch to another data record store. As with the pointer P1, P2, P3, an offset must also be added here, preferably starting from a base address, which is preferably stored in the data offset memories OA, OB. The first data offset memory OA contains the offset for the data set memory DAI, DA2, DA3 in the first memory area 29 and the 'second data offset memory OB contains the offset for the data set memory DBl, DB2, DB3 30 in the second storage area, the record memory DAI, DA2, DA3 and DB1, DB2, DB3 "wander" through the EEPROM 11 to a certain extent.
Zur weiteren Erläuterung wird lediglich Bezug genommen auf den ersten Datensatzspeicher DAl im ersten Speicherbereich 29 und den ersten Datensatzspeicher DBl im zweiten Speicherbereich 30. Nach Ablauf der vom Timer 21 vorgegebenen Zeit addiert der Prozessorkern 17 zu einem die Zeit widerspiegelnden Datensatz eine Einheit, beispielsweise eine Eins und speichert den derart festgelegten neuen Datensatz in entweder den ersten Datensatzspeicher DAl oder den ersten Datensatzspeicher DBl in Abhängigkeit davon, welcher Speicherbereich 29, 30 vom Pointer Pl als ungültig gekennzeichnet ist. Hinsichtlich der Pointer Pl, P2 , P3 wird im Folgenden ebenfalls ausschließlich Bezug genommen auf den Pointer Pl . Den die Betriebszeit widerspiegelnde Datensatz kann der Prozessorkern 17 beispielsweise aus dem Datensatzspeicher DAl bzw. DBl lesen, der sich in dem vom Pointer Pl als gültig gekennzeichneten Speicherbereich 29, 30 befindet. Vorzugsweise ist im MikrocontroUer 10 für diesen Datensatz ein RAM - Speicher 23 angelegt. Ebenso sind vorzugsweise der Pointerspei- cher 24, der Datensatzoffsetspeicher 25 sowie der Pointeroffsetspeicher 26 als RAM - Speicher vorhanden.For further explanation, reference is only made to the first data record memory DA1 in the first memory area 29 and the first data record memory DB1 in the second memory area 30. After the time specified by the timer 21 has elapsed, the processor core 17 adds a unit, for example a one, to a data record reflecting the time and stores the new data record defined in this way in either the first data record memory DA1 or the first data record memory DB1 depending on which memory area 29, 30 is marked as invalid by the pointer P1. With regard to the pointer P1, P2, P3, the following also exclusively refers to the pointer P1. The processor core 17 can obtain the data record reflecting the operating time, for example from the data record memory DA1 or Read DB1, which is located in the memory area 29, 30 marked as valid by the pointer P1. A RAM memory 23 is preferably created in the microcontroller 10 for this data set. Likewise, the pointer memory 24, the data record offset memory 25 and the pointer offset memory 26 are preferably provided as RAM memories.
Dem erfindungsgemäß vorgesehenen ersten Schritt 53, in dem ein Datensatz in den ersten Datensatzspeicher DAl, DBl des als ungültig gekennzeichneten Speicherbereichs 29, 30 gespeichert wird, folgt ein erfindungsgemäß vorgesehener zweiter Schritt 54, in dem der Pointer Pl geändert wird auf einen Wert, der den anderen Speicherbereich 29, 30, in den zuletzt ein Datensatz gespeichert wurde, zum gültigen Speicherbereich 29, 30 erklärt.The first step 53 provided according to the invention, in which a data record is stored in the first data record memory DA1, DB1 of the memory area 29, 30 marked as invalid, is followed by a second step 54 provided according to the invention, in which the pointer P1 is changed to a value which corresponds to the another memory area 29, 30, in which a data record was last saved, is declared the valid memory area 29, 30.
Anstelle der im Ausführungsbeispiel gezeigten zwei Speicherbereichen 29, 30 können weitere Speicherbereiche vorhanden sein. Das Ausführungsbeispiel mit lediglich zwei Speicherbereichen 29, 30 weist den Vorteil auf, dass der Pointer Pl, P2, P3 als Bitpointer realisierbar ist, der im einfachsten Fall lediglich ein Speicherbit aufweisen muss, das den Wert 0 oder 1 annimmt .Instead of the two memory areas 29, 30 shown in the exemplary embodiment, further memory areas can be present. The exemplary embodiment with only two memory areas 29, 30 has the advantage that the pointer P1, P2, P3 can be implemented as a bit pointer, which in the simplest case only has to have a memory bit that assumes the value 0 or 1.
Im weiteren Verlauf werden der erste und zweite Schritt 53, 54 zyklisch abgearbeitet. Sollte nun zu irgendeinem Zeitpunkt, beispielsweise durch Öffnen des Schalters 14, ein fehlerhafter Wert im Datensatzspeicher DAl, DBl hinterlegt worden sein, so steht in jedem Fall der im zurückliegenden Zyklus abgelegte Datensatz im entsprechend anderen Datensatzspeicher DAl, DBl noch zur Verfügung, weil der Bitpointer Pl noch auf den alten gültigen Datensatzspeicher DAl, DBl zeigt.In the further course, the first and second steps 53, 54 are processed cyclically. If at any point in time, for example by opening switch 14, an incorrect value has been stored in data record memory DA1, DB1, the data record stored in the previous cycle is still available in the corresponding other data record memory DA1, DB1 because the bit pointer Pl still points to the old valid data record memory DA1, DB1.
Falls es zu einem fehlerhaften Speichervorgang im Pointer Pl kommen sollte, so hat dies keine Auswirkungen auf die Daten in den Datensatzspeichern DAl, DBl. Im Falle eines Betriebs- zeitzählers tritt in 50% der Fehlerfälle ein Zeitfehler von einem Zyklus auf. Im beschriebenen Ausführungsbeispiel würde der Fehler nur 10 Sekunden betragen.If there is an incorrect storage process in the pointer P1, this has no effect on the data in the data record memories DAl, DBl. In the case of an operating time counter, a time error of one cycle occurs in 50% of the error cases. In the exemplary embodiment described, the error would only be 10 seconds.
Nach jedem Abschalten der Betriebsspannung auf der Stromversorgungsleitung 13 entweder durch den Schalter 14 oder durch ein anderes Ereignis wird die Resetschaltung 12 aktiv und erzeugt das Resetsignal 16. Bei einem Initialisieren des Mikrocontrollers 10 wird im bereits beschriebenen ersten Startschritt der Pointer Pl ausgelesen und im zweiten Startschritt 51 der Datensatz aus dem ersten DatensatzSpeicher DAl, DBl des gültigen Speicherbereichs 29, 30 ausgelesen und dem weiteren Programmlauf zugrunde gelegt. Ggf. ist zusätzlich der Pointeroffsetspeicher OP auszulesen, sofern mehrere Pointer Pl, P2 , P3 aufgrund der begrenzten Schreibzyklenzahl des EEPROMs 11 vorgesehen sind. Ebenso ist ggf. zusätzlich der Offset für den Datensatzspeicher aus dem ersten oder zweiten Datenoffsetspeicher OA, OB auszulesen, sofern anstelle lediglich eines Datensatzspeichers DAl, DBl im ersten bzw. zweiten Speicherbereich 29, 30 aufgrund der begrenzten Speicherzyklenzahl des EEPROMs 11 weitere Datensatzspeicher DA2 , DA3 im ersten Speicherbereich 29 und entsprechend weitere Datensatzspeicher DB2 , DB3 im zweiten Speicherbereich 30 vorhanden sind. Den gültigen Datenoffsetspeicher OA, OB ermittelt der MikrocontroUer 10 anhand des Inhalts des Pointers Pl, P2 , P3.Each time the operating voltage on the power supply line 13 is switched off, either by the switch 14 or by another event, the reset circuit 12 becomes active and generates the reset signal 16. When the microcontroller 10 is initialized, the pointer P1 is read out in the first start step already described and in the second start step 51 the data record is read out of the first data record memory DA1, DB1 of the valid memory area 29, 30 and used as the basis for the further program run. Possibly. the pointer offset memory OP must also be read out, provided that a plurality of pointers P1, P2, P3 are provided due to the limited number of write cycles of the EEPROM 11. Likewise, the offset for the data record memory may also be read out from the first or second data offset memory OA, OB, if 11 data record memories DA2, DA3 instead of just one data record memory DA1, DB1 in the first or second memory area 29, 30 due to the limited number of memory cycles of the EEPROM are present in the first memory area 29 and correspondingly further data record memories DB2, DB3 in the second memory area 30. The microcontroller 10 determines the valid data offset memory OA, OB based on the content of the pointer P1, P2, P3.
Das erfindungsgemäße Verfahren ist insbesondere geeignet zur Verwendung für Vorrichtungen, die in einem Kraftfahrzeug eingebaut sind. In dieser Verwendung besteht zumindest im abgestellten Zustand des Kraftfahrzeugs nur eine begrenzte Energiemenge zum Betreiben der Schaltungsanordnung zur Verfügung, so dass eine Möglichkeit zur vollständigen Abschaltung der Schaltungsanordnung mittels des Schalters 14 zweckmäßig ist. Das erfindungsgemäße Verfahren ermöglicht trotz der vollständigen Abschaltungsmöglichkeit und den dadurch möglicherweise auftretenden Datenfehler bei einem Speichervorgang im EEPROM 11 während des Abschaltvorgangs dennoch ein sicheres Betreiben der Schaltungsanordnung. Eine bevorzugte Verwendung in einem Kraftfahrzeug ist bei einem Luftgütesensor gegeben, der einen Betriebszeitzähler zur Korrektur der Signale hinsichtlich Kurzzeit und hinsichtlich Lang- zeitänderungen verwenden kann. The method according to the invention is particularly suitable for use for devices which are installed in a motor vehicle. In this use, there is only a limited amount of energy available to operate the circuit arrangement, at least when the motor vehicle is switched off, so that a possibility of completely switching off the circuit arrangement by means of the switch 14 is expedient. The method according to the invention enables despite the complete switch-off option and the data errors that may occur as a result of this during a switch-off process in the EEPROM 11 during the switch-off process a safe operation of the circuit arrangement. A preferred use in a motor vehicle is in an air quality sensor, which can use an operating time counter to correct the signals with regard to short-term and with regard to long-term changes.

Claims

Ansprüche Expectations
1. Verfahren zum Betreiben einer Schaltungsanordnung, die einen MikrocontroUer (10) und ein EEPROM (11) enthält, dadurch gekennzeichnet, dass im EEPROM (11) ein erster Speicherbereich (29) mit einem Datensatzspeicher (DAl, DA2, DA3) und zumindest ein zweiter Speicherbereich (30) mit einem Date'nsatzspeicher (DBl, DB2 , DB3) vorgesehen werden,' dass ein dritter Speicherbereich (31) vorgesehen wird, der zumindest einen Pointer (Pl, P2 , P3) enthält, welcher auf den gültigen Speicherbereich (29, 30) zeigt, dass der MikrocontroUer (10) in einem Schritt (53) einen Datensatz in den Datensatzspeicher (DAl, DA2 , DA3 bzw. DBl, DB2, DB3) des ungültigen Speicherbereichs (29, 30) speichert und in einem nachfolgenden Schritt (54) den Pointer (Pl, P2 , P3 ) ändert, so dass der ungültige zum gültigen Speicherbereich (29, 30) wird und dass die beiden Schritte (53, 54) zyklisch wiederholt werden.1. A method for operating a circuit arrangement which contains a microcontroller (10) and an EEPROM (11), characterized in that in the EEPROM (11) a first memory area (29) with a data record memory (DA1, DA2, DA3) and at least one second memory area (30) 'are provided nsatzspeicher (DBl, DB2, DB3),' with a date that a third memory area (31) is provided, which includes at least one pointer (Pl, P2, P3) mounted on the valid memory area ( 29, 30) shows that the microcontroller (10) saves a data record in the data record memory (DA1, DA2, DA3 or DB1, DB2, DB3) of the invalid memory area (29, 30) in a step (53) and in a subsequent one Step (54) changes the pointer (P1, P2, P3) so that the invalid becomes the valid memory area (29, 30) and that the two steps (53, 54) are repeated cyclically.
2. Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass der MikrocontroUer (10) vor den beiden Schritten (53, 54) in einem ersten Startschritt (50) nach einem von der Resetanordnung (12) ausgelösten Reset (16) den Pointer (Pl, P2 , P3) ausliest und in einem zweiten Startschritt (51) den Datensatz aus dem gültigen Speicherbereich (29,2. The method according to claim 1, characterized in that the microcontroller (10) before the two steps (53, 54) in a first start step (50) after a reset (16) triggered by the reset arrangement (12) the pointer (Pl, P2, P3) and in a second start step (51) reads the data record from the valid memory area (29,
30) ausliest. 30) reads.
3. Verfahren nach Anspruch 1 oder 2, dadurch gekennzeichnet, dass der Pointer (Pl, P2 , P3 ) als Bitpointer realisiert ist.3. The method according to claim 1 or 2, characterized in that the pointer (P1, P2, P3) is implemented as a bit pointer.
4. Verfahren nach Anspruch 1 und 3, dadurch gekennzeichnet, dass im zweiten Schritt (54) eine Inkrementierung des Bitpointers (Pl, P2 , P3) vorgesehen ist.4. The method according to claim 1 and 3, characterized in that an incrementation of the bit pointer (P1, P2, P3) is provided in the second step (54).
5. Verfahren nach einem der vorhergehenden Ansprüche, dadurch gekennzeichnet, dass ein Timer (21) vorgesehen ist, der die beiden Schritte (53, 54) zeitlich festlegt.5. The method according to any one of the preceding claims, characterized in that a timer (21) is provided which times the two steps (53, 54).
6. Verfahren nach einem der vorhergehenden Ansprüche", dadurch gekennzeichnet, dass der Datensatz zwischen den beiden Schritten (53, 54) inkrementiert wird.6. The method according to any one of the preceding claims " , characterized in that the data set is incremented between the two steps (53, 54).
7. Verfahren nach einem der vorhergehenden Ansprüche, dadurch gekennzeichnet, dass der Datensatzspeicher (DAl, DA2 , DA3) im ersten Speicherbereich (29) und der Datensatzspeicher (DBl, DB2 , DB3) im zweiten Speicherbereich (30) jeweils einen Speicherplatz von drei Bytes aufweist.7. The method according to any one of the preceding claims, characterized in that the data record memory (DA1, DA2, DA3) in the first memory area (29) and the data record memory (DB1, DB2, DB3) in the second memory area (30) each have a memory space of three bytes having.
8. Verfahren nach einem der vorhergehenden Ansprüche, dadurch gekennzeichnet, dass der Datensatz einem Betriebszeitzähler entspricht.8. The method according to any one of the preceding claims, characterized in that the data record corresponds to an operating time counter.
9. Verwendung des Verf hrens nach einem der vorhergehenden Ansprüche für Vorrichtungen in einem Kraftfahrzeug.9. Use of the method according to one of the preceding claims for devices in a motor vehicle.
10. Verwendung nach Anspruch 9 in einem Luftgütesensor. 10. Use according to claim 9 in an air quality sensor.
EP02760126A 2001-09-04 2002-08-21 Method for operating a circuit arrangement containing a microcontroller and an eeprom Withdrawn EP1423788A2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
DE10143142 2001-09-04
DE10143142A DE10143142A1 (en) 2001-09-04 2001-09-04 Microprocessor-controlled operation of vehicular EEPROM memory, employs two memory areas with data pointers and cyclic validation strategy
PCT/DE2002/003051 WO2003025748A2 (en) 2001-09-04 2002-08-21 Method for operating a circuit arrangement containing a microcontroller and an eeprom

Publications (1)

Publication Number Publication Date
EP1423788A2 true EP1423788A2 (en) 2004-06-02

Family

ID=7697555

Family Applications (1)

Application Number Title Priority Date Filing Date
EP02760126A Withdrawn EP1423788A2 (en) 2001-09-04 2002-08-21 Method for operating a circuit arrangement containing a microcontroller and an eeprom

Country Status (6)

Country Link
US (1) US20040237628A1 (en)
EP (1) EP1423788A2 (en)
JP (1) JP2005502972A (en)
KR (1) KR20040051585A (en)
DE (1) DE10143142A1 (en)
WO (1) WO2003025748A2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10144617A1 (en) * 2001-09-11 2003-01-30 Bosch Gmbh Robert Operating memory circuit with microcontroller and EEPROM used e.g. with vehicle air quality sensor, stores data for given number of operations, then continues in a further data memory
JP2005338926A (en) * 2004-05-24 2005-12-08 Toshiba Corp Portable electronic device
DE102005059319A1 (en) 2005-12-09 2007-06-14 Robert Bosch Gmbh File device operating method, involves storing data, which is stored on segment, and providing data for data conditions, where portion of data is converted, and converted data is stored on another segment during operation of device
JP5264459B2 (en) * 2008-12-17 2013-08-14 パナソニック株式会社 Semiconductor memory device
US10426720B2 (en) 2013-12-23 2019-10-01 Colgate-Palmolive Company Film compositions for oral use
CN110021327B (en) * 2018-01-10 2021-01-12 力旺电子股份有限公司 Non-volatile memory composed of differential memory cells

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2666425A1 (en) * 1990-08-31 1992-03-06 Gemplus Card Int METHOD AND DEVICE FOR UPDATING INFORMATION IN A MEMORY AND THEIR USE IN MEMORY CARDS.
US5870520A (en) * 1992-12-23 1999-02-09 Packard Bell Nec Flash disaster recovery ROM and utility to reprogram multiple ROMS
GB9307623D0 (en) * 1993-04-13 1993-06-02 Jonhig Ltd Data writing to eeprom
GB2290890B (en) * 1994-06-29 1999-03-24 Mitsubishi Electric Corp Information processing system
KR100265375B1 (en) * 1996-04-18 2000-09-15 윤종용 Method for displaying using time of tv
DE19716520B4 (en) * 1997-04-19 2007-04-19 Robert Bosch Gmbh Formed as a circuit device for detecting operating variables of electric motors and electric motor
US6021508A (en) * 1997-07-11 2000-02-01 International Business Machines Corporation Parallel file system and method for independent metadata loggin
US5999712A (en) * 1997-10-21 1999-12-07 Sun Microsystems, Inc. Determining cluster membership in a distributed computer system
US6449734B1 (en) * 1998-04-17 2002-09-10 Microsoft Corporation Method and system for discarding locally committed transactions to ensure consistency in a server cluster
DE19839680B4 (en) * 1998-09-01 2005-04-14 Robert Bosch Gmbh Method and device for modifying the memory contents of control units
US6105099A (en) * 1998-11-30 2000-08-15 International Business Machines Corporation Method for synchronizing use of dual and solo locking for two competing processors responsive to membership changes
US7774469B2 (en) * 1999-03-26 2010-08-10 Massa Michael T Consistent cluster operational data in a server cluster using a quorum of replicas
US6453426B1 (en) * 1999-03-26 2002-09-17 Microsoft Corporation Separately storing core boot data and cluster configuration data in a server cluster
US6785678B2 (en) * 2000-12-21 2004-08-31 Emc Corporation Method of improving the availability of a computer clustering system through the use of a network medium link state function
US7016946B2 (en) * 2001-07-05 2006-03-21 Sun Microsystems, Inc. Method and system for establishing a quorum for a geographically distributed cluster of computers
WO2005086756A2 (en) * 2004-03-09 2005-09-22 Scaleout Software, Inc. Scalable, software based quorum architecture
US20050283641A1 (en) * 2004-05-21 2005-12-22 International Business Machines Corporation Apparatus, system, and method for verified fencing of a rogue node within a cluster
US20060100981A1 (en) * 2004-11-04 2006-05-11 International Business Machines Corporation Apparatus and method for quorum-based power-down of unresponsive servers in a computer cluster
GB0501697D0 (en) * 2005-01-27 2005-03-02 Ibm Controlling service failover in clustered storage apparatus networks
US7631016B2 (en) * 2005-05-04 2009-12-08 Oracle International Corporation Providing the latest version of a data item from an N-replica set

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of WO03025748A2 *

Also Published As

Publication number Publication date
KR20040051585A (en) 2004-06-18
US20040237628A1 (en) 2004-12-02
WO2003025748A2 (en) 2003-03-27
DE10143142A1 (en) 2003-01-30
JP2005502972A (en) 2005-01-27
WO2003025748A3 (en) 2004-01-29

Similar Documents

Publication Publication Date Title
DE4012109C2 (en) Device for monitoring the function of an electrical / electronic switching device, its connected consumer, a control and its connecting line
EP0067364B1 (en) Method and arrangement for a non-volatile storage of the counting state of an electronic counter
DE1524239A1 (en) Method for localizing a fault in a system with at least two computing devices working in parallel
DE3345863A1 (en) Monitoring circuit for computers
DE3734088C2 (en) Interruption circuit
DE2646162B2 (en) Circuit arrangement for replacing incorrect information in memory locations of a non-changeable memory
DE2716775C2 (en)
DE3823038C2 (en) Procedure for monitoring the state of charge of a battery
EP0224707B1 (en) Circuit arrangement for the self-control of a plurality of analogous electrical signals
EP1423788A2 (en) Method for operating a circuit arrangement containing a microcontroller and an eeprom
DE4404131A1 (en) Battery-free data buffering
DE3247910A1 (en) Circuit arrangement for data storage in motor vehicles
WO2006103226A1 (en) Method for storing individual data items of a low-voltage switch
WO2003025754A2 (en) Method for operating a circuit arrangement containing a microcontroller and an eeprom
DE19726299A1 (en) Multiplex transmission system for electrical equipment in vehicle
DE2607893A1 (en) STORAGE DEVICE
EP1134632B1 (en) Device for recognizing function units
EP1461701B1 (en) Program-controlled unit with monitoring device
DE19820173C1 (en) Power switch electronic release
DE2602459B2 (en) Processor-controlled arrangement for processing data
EP0715313A2 (en) Method of programming an electrically erasable read-only memory in an elecronic computer device and control device using the method
EP0268597B1 (en) Data storage process
DE2442988A1 (en) CALCULATING MACHINE
DE102011121879A1 (en) Control device for controlling drive device of propulsion system, has a parse device that parses the read parameter to a parameter used for providing another predetermined software version by which the drive device is operated
EP2246757A1 (en) Method for addressing variables in a distributed automation system

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 20040218

AK Designated contracting states

Kind code of ref document: A2

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR IE IT LI LU MC NL PT SE SK TR

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN

18D Application deemed to be withdrawn

Effective date: 20060118