DE102006039461A1 - Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data - Google Patents

Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data Download PDF

Info

Publication number
DE102006039461A1
DE102006039461A1 DE200610039461 DE102006039461A DE102006039461A1 DE 102006039461 A1 DE102006039461 A1 DE 102006039461A1 DE 200610039461 DE200610039461 DE 200610039461 DE 102006039461 A DE102006039461 A DE 102006039461A DE 102006039461 A1 DE102006039461 A1 DE 102006039461A1
Authority
DE
Germany
Prior art keywords
microcontroller
program
data
programming
connection
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
DE200610039461
Other languages
German (de)
Inventor
Franco Ferraro
Kaj Uppenkamp
Walter Rombach
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.)
Endress and Hauser SE and Co KG
Original Assignee
Endress and Hauser SE and Co KG
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 Endress and Hauser SE and Co KG filed Critical Endress and Hauser SE and Co KG
Priority to DE200610039461 priority Critical patent/DE102006039461A1/en
Publication of DE102006039461A1 publication Critical patent/DE102006039461A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Abstract

The method involves evaluating the data obtained by micro-controller (1) by a request program (4) in the program-memory area (3) if a programming instruction is obtained to the micro-controller as data. The bootstrap loader activates, and the bootstrap loader writes the data in the program-memory area. The data reaches the micro-controller over the program connection. An independent claim is also included for a device for the regulation or monitoring of a process variable.

Description

Die Erfindung bezieht sich auf ein Verfahren zur Programmierung eines Mikrocontrollers, wobei der Mikrocontroller einen fest implementierten Bootstrap-Loader in einem Bootstrap-Loader-Speicherbereich aufweist, wobei der Mikrocontroller mindestens eine fest vorgegebene Initiierungsverbindung aufweist, über welche das Ausführen des Bootstrap-Loader aktivierbar ist, wobei der Mikrocontroller mindestens eine fest vorgegebene Programmierverbindung aufweist, über welche der Bootstrap-Loader mindestens vom Bootstrap-Loader zu verarbeitende Daten empfängt, und wobei der Mikrocontroller einen Programm-Speicherbereich für die Speicherung von Programmen aufweist. Weiterhin bezieht sich die Erfindung auf eine Vorrichtung zur Bestimmung und/oder Überwachung mindestens einer Prozessgröße, mit mindestens einer Daten-Schnittstelle zur Ein/Ausgabe von Daten, und mit mindestens einem Mikrocontroller, wobei der Mikrocontroller einen Bootstrap-Loader-Speicherbereich mit einem fest implementierten Bootstrap-Loader aufweist, wobei der Mikrocontroller mindestens eine fest vorgegebene Initiierungsverbindung aufweist, über welche das Ausführen des Bootstrap-Loaders aktivierbar ist, wobei der Mikrocontroller mindestens eine fest vorgegebene Programmierverbindung aufweist, über welche der Bootstrap-Loader mindestens vom Bootstrap-Loader zu verarbeitende Daten empfängt, wobei der Mikrocontroller mindestens einen Programm-Speicherbereich für die Speicherung von Programmen aufweist, wobei der Mikrocontroller mindestens eine Ein/Ausgabeverbindung aufweist, welche zur Ein- und/oder Ausgabe von Daten dient, und wobei die Daten-Schnittstelle mit der Ein-/Ausgabeverbindung verbunden ist.The The invention relates to a method for programming a Microcontroller, wherein the microcontroller has a tightly implemented bootstrap loader in a bootstrap loader memory area, wherein the microcontroller has at least one fixed initiation compound, via which the execution the bootstrap loader is activated, the microcontroller has at least one fixed programming connection, via which the bootstrap loader to be processed by at least the bootstrap loader Receives data, and wherein the microcontroller has a program memory area for storage of programs. Furthermore, the invention relates to a device for determining and / or monitoring at least one Process size, with at least one data interface for the input / output of data, and at least one microcontroller, wherein the microcontroller a bootstrap loader storage area with a tightly implemented one Bootstrap loader, wherein the microcontroller at least has a fixed initiation compound over which the execution the bootstrap loader is activated, the microcontroller has at least one fixed programming connection, via which the bootstrap loader receives at least data to be processed by the bootstrap loader, where the microcontroller at least one program memory area for storage of programs, wherein the microcontroller at least one Has an input / output connection, which for input and / or output serves data, and where the data interface with the input / output connection connected is.

Im Stand der Technik ist eine Vielzahl von Mikrocontrollern bekannt, und auch in der modernen Prozess- und Automatisierungstechnik findet sich eine große Reihe von Messgeräten, welche mit einem Mikrocontroller ausgestattet sind. Eine besondere Thematik liegt in der Programmierung der Mikrocontroller oder im sog. Flashen. D.h. die vom Mikrocontroller auszuführenden Programme müssen in einem Speicherbereich abgelegt werden. Dies kann bei der Fertigung erforderlich sein oder auch bei einem Update der Programme beim bereits gefertigten und ggf. auch schon am Einsatzort installierten Gerät. Hierfür wird ein sog. Bootstrap-Loader (BSL) verwendet, welcher Programmcode in den Programm-Speicherbereich des Mikrocontrollers schreibt. Hierfür weist der Mikrocontroller eigens eine Programmierverbindung und eine Initiierungsverbindung auf, welche beide – oft exklusiv – dem BSL zugeordnet sind. Der BSL kann aktiv werden, wenn der Mikrocontroller beispielsweise nach einem Reset neu mit Spannung versorgt wird oder wenn an der Initiierungsverbindung ein Aktivierungssignal anliegt oder eine Aktivierungssequenz angelegt wird. Erfolgt dieses Signal, so empfängt der BSL über die Programmierverbindung die Daten, Programme oder Programmteile, die entsprechend in den Programm-Speicherbereich zu schreiben sind.in the The prior art discloses a multiplicity of microcontrollers. and also in modern process and automation technology a big one Set of measuring devices, which are equipped with a microcontroller. A special Topic lies in the programming of the microcontroller or in the so-called flashing. That those to be executed by the microcontroller Programs need be stored in a memory area. This can be during production be required or even with an update of the programs already manufactured and possibly already installed on site Device. Therefor a so-called bootstrap loader (BSL) is used, which program code into the program memory area of the microcontroller writes. For this purpose points the microcontroller specifically has a programming connection and an initiation connection on which both - often exclusively - the BSL are assigned. The BSL can become active when the microcontroller For example, after a reset is re-energized or if an activation signal is present at the initiation connection or an activation sequence is created. If this signal occurs, so receives the BSL over the programming connection the data, programs or program parts, which are to be written accordingly in the program memory area.

Ein solcher BSL ist üblicherweise fest im Mikrocontroller vom Hersteller implementiert, d.h. fest vorgegeben. Für diesen implementierten BSL ist jedoch die Aktivierung über die Initiierungsverbindung erforderlich. Um diese Verbindung einzusparen, ist es im Stand der Technik bekannt, einen eigenen BSL zu verwenden, welcher Platz im Programm-Speicherbereich findet. Dieser eigene BSL lässt sich dann beispielsweise auch über die Kommunikationsverbindung des Mikrocontrollers aktivieren. Unter der Kommunikationsverbindung des Mikrocontrollers sei dabei die Datenverbindung verstanden, welche der Mikrocontroller zur Ausübung seiner Programme verwendet, um beispielsweise Messwerte zu empfangen, um Steuersignale oder verarbeitete Werte auszugeben. Diese Variante des Standes der Technik spart somit die Kontaktierung der Initiierungsverbindung ein, aber der zusätzliche BSL reduziert den zur Verfügung stehenden Speicherplatz im Programm-Speicherbereich.One such BSL is common firmly implemented in the microcontroller by the manufacturer, i. fixed. For this However, implemented BSL requires activation via the initiation link. To save this connection, it is known in the art, to use its own BSL, which has room in the program memory area place. This own BSL lets then, for example, over activate the communication link of the microcontroller. Under the communication link of the microcontroller is the case Data connection understood which of the microcontroller to exercise his Programs used, for example, to receive readings Output control signals or processed values. This variant The prior art thus saves the contacting of the initiating compound one, but the extra one BSL reduces the available standing space in the program memory area.

Die Aufgabe der Erfindung besteht somit darin, ein Verfahren zum Flashen eines Mikrocontrollers vorzuschlagen, bei welchem möglichst nur ein geringer Speicherbedarf erforderlich ist und bei dem möglichst wenige Verbindungsleitungen zum Mikrocontroller hergestellt werden müssen. Weiterhin besteht eine Aufgabe der Erfindung darin, eine Messvorrichtung mit einem Mikrocontroller anzugeben, bei welchem der Programmspeicher optimal verwendet wird und bei welchem nur wenige Leitungen hergestellt werden.The The object of the invention is therefore to provide a method for flashing to propose a microcontroller, where possible only a small memory requirement is required and the possible few connecting lines are made to the microcontroller have to. Furthermore, it is an object of the invention is a measuring device specify with a microcontroller in which the program memory is optimally used and in which only a few lines are produced.

Die Erfindung löst die Aufgabe durch ein Verfahren zur Programmierung eines Mikrocontrollers, wobei der Mikrocontroller einen fest implementierten Bootstrap-Loader in einem Bootstrap-Loader-Speicherbereich aufweist, wobei der Mikrocontroller mindestens eine fest vorgegebene Initiierungsverbindung aufweist, über welche das Ausführen des Bootstrap-Loader aktivierbar ist, wobei der Mikrocontroller mindestens eine fest vorgegebene Programmierverbindung aufweist, über welche der Bootstrap-Loader mindestens vom Bootstrap-Loader zu verarbeitende Daten empfängt, und wobei der Mikrocontroller einen Programm-Speicherbereich für die Speicherung von Programmen aufweist. Das erfindungsgemäße Verfahren sieht dabei vor, dass Daten, welche den Mikrocontroller erreichen, von einem Aufruf-Programm im Programm-Speicherbereich ausgewertet werden, dass in dem Fall, dass als Daten den Mikrocontroller ein Programmierbefehl erreicht, das Aufruf-Programm den Bootstrap-Loader aktiviert, und dass der Bootstrap-Loader die Daten in den Programm-Speicherbereich schreibt, die den Mikrocontroller über die Programmierverbindung erreichen.The invention achieves the object by a method for programming a microcontroller, the microcontroller having a permanently implemented bootstrap loader in a bootstrap loader memory area, the microcontroller having at least one fixed initiation connection via which the bootstrap loader can be activated wherein the microcontroller has at least one fixed programming connection via which the bootstrap loader receives data to be processed at least from the bootstrap loader, and wherein the microcontroller has a program memory area for storing programs. The method according to the invention provides that data which reach the microcontroller are evaluated by a call program in the program memory area, that in the event that the data reaches the microcontroller a programming command, the call program activates the bootstrap loader , and that the bootstrap loader the data in writes the program memory area that reach the microcontroller via the programming connection.

Die Erfindung besteht somit darin, dass der Mikrocontroller durch ein Programm überprüft, ob ein Aktivierungssignal den Mikrocontroller erreicht. Dieses Programm befindet sich dabei im Programm-Speicherbereich. Das Aktivierungssignal wird dabei nicht über die Initiierungsverbindung geschickt, sondern beispielsweise über die Programmierverbindung oder die Kommunikationsverbindung, d.h. die Kontaktierung der Initiierungsverbindung ist nicht erforderlich. D.h. der Mikrocontroller überprüft die Daten in Hinsicht auf den Aktivierungsbefehl, welche den Mikrocontroller auf Verbindungen unterschiedlich zur Initiierungsverbindung erreichen. Erfolgt ein solcher Aktivierungsbefehl, d.h. sind Daten oder Programme neu in den Programm-Speicherbereich zu schreiben, so springt das Programm den vom Hersteller des Mikrocontrollers fest implementierten BSL direkt (beispielsweise durch einen „jump"-Befehl) an, d.h. der BSL wird nicht durch das Signal auf der Initiierungsverbindung aktiviert, sondern das Programm im Programm-Speicherbereich startet oder aktiviert den BSL direkt. Dies bringt den Vorteil mit sich, dass kein eigenständiger BSL erforderlich ist, indem der bereits vorhandenen BSL genutzt werden kann. Die vom BSL in den Programm-Speicherbereich zu schreibenden Daten erreichen den BSL in einer alternativen Ausgestaltung über die normale Datenverbindung/Kommunikationsverbindung erreichen.The Invention is thus that the microcontroller by a Program checks if an activation signal reached the microcontroller. This program is included in the program memory area. The activation signal is not on the Initiierungsverbindung sent, but for example on the Programming link or communication link, i. the contact the initiation compound is not required. That the microcontroller checks the data in terms of the activation command, which is the microcontroller reach compounds different from the initiation compound. If such an activation command, i. are data or programs new in the program memory area to write, the program jumps from the manufacturer of the microcontroller permanently implemented BSL (e.g., by a "jump" command), i. the BSL is not affected by the signal on the initiation link activated, but the program in the program memory area starts or activates the BSL directly. This has the advantage of not having a stand-alone BSL required by using the existing BSL can. The data to be written by the BSL to the program memory area reach the BSL in an alternative embodiment over the reach normal data connection / communication connection.

Eine Ausgestaltung des erfindungsgemäßen Verfahrens sieht vor, dass die Daten, welche den Mikrocontroller über die Programmierverbindung erreichen, von dem Aufruf-Programm darauf ausgewertet werden, ob den Mikrocontroller ein Programmierbefehl erreicht. In dieser Ausgestaltung horcht das Programm also, ob auf der Programmierverbindung, über welche den fest implementierten BSL auf die von ihm zu schreibenden Daten erreichen, der Aktivierungsbefehl ergeht.A Embodiment of the method according to the invention provides that the data that the microcontroller over the Get programming connection from the caller program on it be evaluated whether the microcontroller is a programming command reached. In this embodiment, therefore, the program listens for whether the programming connection, over which the fixedly implemented BSL to write to him Reaching data, the activation command is issued.

Die Erfindung löst die Aufgabe weiterhin durch eine Vorrichtung zur Bestimmung und/oder Überwachung mindestens einer Prozessgröße, mit mindestens einer Daten-Schnittstelle zur Ein-/Ausgabe von Daten, und mit mindestens einem Mikrocontroller, wobei der Mikrocontroller einen Bootstrap-Loader-Speicherbereich mit einem fest implementierten Bootstrap-Loader aufweist, wobei der Mikrocontroller mindestens eine fest vorgegebene Initiierungsverbindung aufweist, über welche das Ausführen des Bootstrap-Loaders aktivierbar ist, wobei der Mikrocontroller mindestens eine fest vorgegebene Programmierverbindung aufweist, über welche der Bootstrap- Loader mindestens vom Bootstrap-Loader zu verarbeitende Daten empfängt, wobei der Mikrocontroller mindestens einen Programm-Speicherbereich für die Speicherung von Programmen aufweist, wobei der Mikrocontroller mindestens eine Ein-/Ausgabeverbindung aufweist, welche zur Ein- und/oder Ausgabe von Daten dient, und wobei die Daten-Schnittstelle mit der Ein/Ausgabeverbindung verbunden ist. Die Erfindung sieht dabei vor, dass in dem Programm-Speicherbereich ein Aufruf-Programm bzw. Abfrage-Programm abgelegt ist, wobei das Aufruf-/Abfrage-Programm derartig ausgestaltet ist, dass das Aufruf-Programm die über die Ein-/Ausgabeverbindung eingehenden Daten dahingehend abfragt, ob ein Programmierungsbefehl oder Aktivierungsbefehl ergeht, und dass das Aufruf-Programm in dem Fall, dass ein Programmierungsbefehl ergeht, den Bootstrap-Loader aktiviert. Dieses Aufruf-Programm bzw. Abfrage- bzw. Aufruf-/Abfrage-Programm reagiert somit auf den Aufruf, welcher den fest implementierten BSL eigentlich über die Initiierungsverbindung erreichen würde, und aktiviert dann den BSL, welcher anschließend wiederum die Daten, die ihn über die Programmierverbindung erreichen, in den Programm-Speicherbereich schreibt. Wesentlich ist jedoch, dass der Aktivierungs- oder Programmierungsbefehl gerade auf einer Verbindung unterschiedlich zur Initiierungsverbindung übertragen wird.The Invention solves the task continues by a device for determination and / or monitoring at least one process variable, with at least a data interface for input / output of data, and with at least a microcontroller, the microcontroller having a bootstrap loader memory area having a tightly implemented bootstrap loader, wherein the microcontroller at least one fixed initiation connection has, over which the running the bootstrap loader can be activated, the microcontroller at least one fixed predetermined programming connection, via which the bootstrap loader at least receives data to be processed by the bootstrap loader, the microcontroller at least one program memory area for storing programs wherein the microcontroller has at least one input / output connection which serves for inputting and / or outputting data, and wherein the data interface is connected to the I / O connection is. The invention provides that in the program memory area a call program or query program is stored, the Call / query program is designed such that the call program the above the input / output connection queries incoming data to that effect, whether a programming command or activation command is issued, and that the calling program in the event that a programming command the bootstrap loader is activated. This call program or Query or invocation / query program responds to the call, which actually implements the fixed BSL via the initiation link would reach and then activates the BSL, which then in turn the data, the him over reach the programming link, in the program memory area writes. However, it is essential that the activation or programming command just on a connection different from the initiation connection is transmitted.

Eine Ausgestaltung der erfindungsgemäßen Vorrichtung sieht vor, dass die Ein-/Ausgabeverbindung mindestens die fest vorgegebene Programmierverbindung und eine Kommunikationsverbindung umfasst. In diesem Fall werden von dem Mikrocontroller zwei Verbindungen weggeführt: eine für den Datenverkehr mit dem fest implementierten BSL und eine für die übliche und während des Arbeitens des Mikrocontrollers auftretende Datenkommunikation mit dem Mikrocontroller. Die Programmierverbindung ist speziell für den BSL vorgesehen und die Kommunikationsverbindung dient den Programmen im Programm-Speicherbereich. Beachtlich ist, dass erfindungsgemäß die Initiierungsverbindung nicht nach außen geführt ist.A Embodiment of the device according to the invention provides that the input / output connection at least the fixed Programming connection and a communication connection includes. In this case, two connections will be made by the microcontroller carried away: one for the Traffic with the tightly implemented BSL and one for the usual and while of the microcontroller operating data communication with the microcontroller. The programming connection is special for the BSL provided and the communication link serves the programs in Program storage area. It is remarkable that according to the invention the initiating compound not outward guided is.

Eine Ausgestaltung der erfindungsgemäßen Vorrichtung beinhaltet, dass die Ein-/Ausgabeverbindung nur die fest vorgegebene Programmierverbindung umfasst. In dieser Variante wird effektiv nur eine einzige Verbindung vom Mikrocontroller weggeführt. In einer Ausgestaltung wird dabei die Kommunikationsverbindung mit der Programmierverbindung verbunden, so dass also alle eingehenden und ausgehenden Daten über einen Knotenpunkt laufen.A Embodiment of the device according to the invention implies that the input / output connection only the fixed Includes programming connection. In this variant will be effective only a single connection led away from the microcontroller. In An embodiment is the communication link with connected to the programming connection, so that all incoming and outgoing data about to run a node.

Eine Ausgestaltung der erfindungsgemäßen Vorrichtung sieht vor, dass die Programmier-Schnittstelle über zwei Leitungen mit der Ein/Ausgabeverbindung des Mikrocontrollers verbunden ist. Es ist somit eine Eingangs- und eine Ausgangsleitung (R×D und T×D) vorgesehen.A Embodiment of the device according to the invention provides that the programming interface via two lines with the Input / output connection of the microcontroller is connected. It is Thus, an input and an output line (R × D and T × D) provided.

Eine Ausgestaltung der erfindungsgemäßen Vorrichtung beinhaltet, dass das Aufruf-Programm derartig in dem Programm-Speicherbereich abgelegt ist, dass das Aufruf-Programm unüberschreibbar ist. Erfolgt das Updaten des Programmspeichers nicht ordnungsgemäß, so kann es dazu kommen – da sich das Aufruf-Programm in eben diesem Programmspeicher befindet –, dass das Messgerät bzw. der Mikrokontroller auf die erfindungsgemäße Art nicht mehr updatefähig ist. Ursache dafür kann beispielsweise eine Unterbrechung der Kommunikation, eine Unterspannung oder keine Spannung sein. Dafür ist das Aufruf-Programm an einem fest zugeordneten Speicherplatz abgelegt und wird bei einem Updaten nicht mehr überschrieben. Somit ist bei einem missglückten Updateversuch ein nochmaliger Versuch immer noch möglich.A Embodiment of the device according to the invention implies that the call program is such in the program memory area is stored, that the call program is unrecoverable. He follows updating the program memory is not working properly it come to that - there the caller program is in this same program memory - that the meter or the microcontroller is not updateable in the manner according to the invention. Cause for it For example, an interruption of communication, an undervoltage or be no tension. Therefore is the caller program to a dedicated memory location is stored and will not be overwritten during an update. Thus, at a failed one Update attempt a renewed attempt still possible.

Eine Ausgestaltung der erfindungsgemäßen Vorrichtung sieht vor, dass das Aufruf-Programm derartig in dem Programm-Speicherbereich abgelegt ist, dass ein Überschreiben des Aufruf-Programms die Erfüllung mindestens eines vorgebbaren Kontrollkriteriums voraussetzt. Bei dem Kontrollkriterium handelt es sich beispielsweise um ein Passwort oder um eine sonstige Sicherung, welche nur ganz gezielt das Überschreiben zulässt. Das Aufruf-Programm ist somit durch das Kontrollkriterium vor einem allgemeinen Überschreiben geschützt, insbesondere wird das Überschreiben bei einem Update beispielsweise so verhindert. Dies ist somit eine Alternative zur vorhergehenden Ausgestaltung.A Embodiment of the device according to the invention provides that the call program is such in the program memory area is that overwriting the call program's fulfillment presupposes at least one predetermined control criterion. at the control criterion is, for example, a password or any other backup, which only specifically overwriting allows. The call program is thus ahead of you due to the control criterion general overwriting protected, in particular will be overwriting for example, prevents this from happening during an update. This is one Alternative to the previous embodiment.

Die Erfindung wird anhand der nachfolgenden Zeichnungen näher erläutert.The The invention will be explained in more detail with reference to the following drawings.

Es zeigt:It shows:

1: eine schematische Darstellung eines erfindungsgemäßen Messgerätes, 1 : a schematic representation of a measuring device according to the invention,

2: eine erste Variante der Verbindungen zum Mikrocontroller, und 2 : a first variant of the connections to the microcontroller, and

3: eine zweite Variante für die Verbindungen. 3 : a second variant for the connections.

1 zeigt schematisch ein Messgerät, bei welchem es sich als ein Beispiel um eine sog. Schwinggabel handelt. Die mechanisch schwingfähige Einheit wird zu Schwingungen angeregt, und durch die Wechselwirkung zwischen den Gabelzinken und dem Medium lassen sich aus den Kenngrößen der Schwingungen Prozessgrößen wie Füllstand, Dichte oder Viskosität bestimmen bzw. lassen sich Änderungen davon beobachten. Das Messgerät weist einen Mikrocontroller 1 auf, in welchem die Programme zum Betrieb des Messgerätes, zur Auswertung der Messdaten usw. abgelegt und von welchem diese auch ausgeführt werden. Der Mikrocontroller 1 weist eine Ein/Ausgabeverbindung 5 auf, über welche er kommuniziert und über welche er Daten bzw. Programme erhält. Über zwei Leitungen (R×D und T×D) ist diese Verbindung 5 mit einer Daten-Schnittstelle 6 verbunden, über welche somit Daten vom Messgerät abgegriffen werden können bzw. über welche z.B. vom Bedienpersonal oder von einer übergeordneten Leitwarte aus das Messgerät bzw. der Mikrocontroller 1 programmiert bzw. geflashed werden kann. Bei dem Mikrocontroller handelt es sich beispielsweise um einen MSP 430 der Firma Texas Instruments. 1 schematically shows a measuring device, which is an example of a so-called. Tuning fork. The mechanically oscillatable unit is excited to oscillate, and the interaction between the fork tines and the medium can be used to determine process variables such as fill level, density or viscosity from the characteristics of the oscillations, or changes can be observed. The meter has a microcontroller 1 in which the programs for operating the measuring device, for the evaluation of the measured data, etc. are stored and from which they are also executed. The microcontroller 1 has an I / O connection 5 on which he communicates and through which he receives data or programs. Over two lines (R × D and T × D) is this connection 5 with a data interface 6 connected, via which thus data can be tapped from the meter or via which, for example, the operator or from a parent control room from the meter or the microcontroller 1 can be programmed or flashed. The microcontroller is, for example, an MSP 430 from Texas Instruments.

Der Mikrocontroller 1 weist zumindest zwei Speicherbereiche 2, 3 auf. In einem Bootstrap-Loader-Speicherbereich 2 befindet sich der von der Herstellerfirma fest eingesetzte Bootstrap-Loader (BSL). Dieser BSL lässt sich entweder starten, nachdem der Mikrocontroller 1 neu mit Spannung versorgt wird oder durch einen besonderen Steuerbefehl, wobei der Mikrocontroller 1 bereits mit Spannung betrieben wird und bereits arbeitet. Diese Aktivierung erfolgt (siehe 2) durch eine speziell hierfür vorgesehene Initiierungsverbindung 10. Diese bilden im in 2 gezeigten Fall zwei Leitungen oder Pins, auf welche ein spezielles Signal oder eine spezielle Sequenz gegeben wird, welches den BSL aktiviert, um Daten bzw. Programme von der wiederum speziell für diesen Zweck vorgesehenen Programmierverbindung 11 zu empfangen und diese in den Programm-Speicherbereich 3 zu schreiben. D.h. der fest implementierte BSL verfügt standardmäßig über zwei Verbindungen: eine für die Aktivierung, die andere für die Daten bzw. Programme. Weiter ist in der 1 der zweite, freie Programm-Speicherbereich 3 dargestellt, in welchem die Programme und Daten liegen.The microcontroller 1 has at least two memory areas 2 . 3 on. In a bootstrap loader storage area 2 is the bootstrap loader (BSL) used by the manufacturer. This BSL can be started either after the microcontroller 1 newly powered or by a special control command, the microcontroller 1 already powered and already working. This activation takes place (see 2 ) by a dedicated initiation compound 10 , These form in the 2 In the case shown, two lines or pins, to which a special signal or a special sequence is activated, which activates the BSL in order to access data or programs from the programming connection, which in turn is provided for this purpose 11 to receive and place these in the program memory area 3 to write. This means that the permanently implemented BSL has two connections as standard: one for the activation, the other for the data or programs. Next is in the 1 the second, free program memory area 3 in which the programs and data are located.

Im Stand der Technik bestehen zwei Möglichkeiten für die Programmierung eines Mikrocontrollers 1 bzw. für ein Überschreiben oder Flashen des Programmspeichers. Die eine Möglichkeit verwendet den fest implementierten BSL, wofür jedoch die Initiierungsverbindung 10 und die Programmierverbindung 11 kontaktiert bzw. aus dem den Mikrocontroller 1 umfassenden Messgerät herausgeführt werden müssen. Die andere Möglichkeit verwendet einen eigenen BSL, welcher im Programm-Speicherbereich 3 abgelegt wird und dabei unabhängig vom fest implementierten BSL ist. Diese zweite Möglichkeit macht somit keine Kontaktierung der beiden o.g. Verbindungen erforderlich. Nachteilig ist jedoch, dass der eigene BSL Speicherplatz benötigt.In the prior art, there are two possibilities for programming a microcontroller 1 or for overwriting or flashing the program memory. One option uses the tightly implemented BSL, but for which the initiate connection 10 and the programming connection 11 contacted or from the microcontroller 1 comprehensive meter must be led out. The other option uses its own BSL, which is in the program memory area 3 is stored and is independent of the permanently implemented BSL. This second possibility thus makes no contact between the two above-mentioned connections required. The disadvantage, however, is that your own BSL requires storage space.

Erfindungsgemäß ist ein Aufruf-Programm 4 im Programm-Speicherbereich 3 abgelegt. Dieses Programm 4 überwacht, ob den Mikrocontroller 1 über die Ein-/Ausgabeverbindung 5 ein Programmierbefehl erreicht und aktiviert ggf. den fest implementierten BSL. Die Idee ist somit, dass ohne die Kontaktierung der Initiierungsverbindung 10 der fest implementierte BSL verwendet wird, indem er per Programm angesprungen und dadurch aktiviert wird. Damit ergeben sich die Vorteile, dass die Initiierungsverbindung 10 nicht kontaktiert werden muss und dass gleichzeitig eine Ersparnis an Speicherplatzbelegung erfolgt, da kein eigener BSL erforderlich ist. Die Speichergröße ist vom verwendeten Mitglied der Mikrocontroller-Familie, z.B. der MSP430-Familie abhängig und kann nach heutigem Stand der Technik zwischen 1kB und 120kB betragen. Ein zusätzlicher Bootloader weist beispielsweise ca. 8KB Programm-Code. Für die genannten Füllstandsmessgeräte sind Programmspeichergrößen zwischen 2kB und 32kB üblich.According to the invention is a call program 4 in the program memory area 3 stored. This program 4 monitors whether the microcontroller 1 via the I / O connection 5 a programming command reaches and, if necessary, activates the permanently implemented BSL. The idea is thus that without contacting the initiation compound 10 The festival Implemented BSL is used by being jumped by program and thereby activated. This results in the advantages that the initiation compound 10 does not have to be contacted and that at the same time a saving in space utilization takes place, since no separate BSL is required. The memory size depends on the member of the microcontroller family used, eg the MSP430 family, and according to the current state of the art can be between 1kB and 120kB. An additional boot loader, for example, has about 8KB program code. Program memory sizes between 2kB and 32kB are common for these level gauges.

Die 2 und 3 zeigen jeweils zwei Varianten für die Ausgestaltung der Ein/Ausgabeverbindung 5 des Mikrocontrollers 1.The 2 and 3 show two variants for the design of the input / output connection 5 of the microcontroller 1 ,

In der 2 umfasst die Ein-/Ausgabeverbindung 5 sowohl die Programmierverbindung 11 des fest implementierten BSL, als auch die Kommunikationsverbindung 12, über welche der Mikrocontroller 1 eigentlich kommuniziert und Daten austauscht. Bei der Kommunikationsverbindung 12 handelt es sich dabei beispielsweise um eine UART-Verbindung. Möglich ist auch eine I2C-, eine SPI- oder auch eine HART-Verbindung. In dieser Ausgestaltung wertet das Aufruf-Programm bzw. Abfrage- oder Aufruf/Abfrage-Programm 4 die Daten, die den Mikrocontroller 1 über die Programmierverbindung 11 oder über die Kommunikationsverbindung 12 erreichen, darauf aus, ob ein Programmier- bzw. Aktivierungsbefehl ergeht. In diesem Fall springt das Programm 4 den fest implementierten BSL direkt an, und veranlasst ihn damit, die Programme, die über die Programmierverbindung 11 eingehen, in den Programm-Speicherbereich 3 zu schreiben. Im Vergleich zur hier gezeigten erfindungsgemäßen Ausgestaltung besteht die Ein-/Ausgabeverbindung 5 im Stand der Technik unter Verwendung des fest implementierten BSL aus der Initiierungsverbindung 10, der Programmierverbindung 11 und der Kommunikationsverbindung 12, d.h. im Stand der Technik muss jeder dieser drei Verbindungen durch entsprechende Kontaktierung realisiert werden. In der Erfindung jedoch wird zumindest die Initiierungsverbindung 10 nicht kontaktiert, d.h. auch nicht über die Ein-/Ausgabeverbindung 5 herausgeführt.In the 2 includes the I / O connection 5 both the programming connection 11 the firmly implemented BSL, as well as the communication link 12 over which the microcontroller 1 actually communicates and exchanges data. In the communication connection 12 For example, this is a UART connection. Also possible is an I 2 C, an SPI or a HART connection. In this embodiment evaluates the call program or query or call / query program 4 the data that the microcontroller 1 via the programming connection 11 or via the communication link 12 depending on whether a programming or activation command is issued. In this case, the program jumps 4 the permanently implemented BSL directly, causing it to run the programs through the programming connection 11 enter into the program memory area 3 to write. In comparison to the embodiment according to the invention shown here, the input / output connection 5 in the prior art using the firmly implemented BSL from the initiation link 10 , the programming connection 11 and the communication link 12 ie, in the prior art, each of these three connections must be realized by appropriate contacting. In the invention, however, at least the initiating compound becomes 10 not contacted, ie not on the I / O connection 5 led out.

In der Variante der 3 ist die Kommunikationsverbindung 12 mit der Programmierverbindung 11 direkt verbunden, d.h. die Ein/Ausgabeverbindung 5 weist nur zwei Leitungen auf. Ergeht nun in diesem Fall der Programmierbefehl, so springt das Aufruf-Programm 4 den fest implementierten BSL an und macht die Ein-/Ausgabeverbindung 5 frei für die Kommunikation mit dem vom Hersteller des Mikrocontrollers 1 fest implementierten BSL. In dieser Variante wird also nur eine Verbindung effektiv nach außen geführt, indem zwei der Verbindungen miteinander verbunden werden, die Initiierungsverbindung 10 wird jedoch ebenfalls wie in 2 nicht kontaktiert. Die in 2 und 3 gezeigten Varianten können bei der Programmierung des Mikrocontrollers bei der Fertigung oder im fertigen Produkt für das Flashen verwendet werden.In the variant of 3 is the communication connection 12 with the programming connection 11 directly connected, ie the I / O connection 5 has only two lines. If the programming command is issued in this case, the call program jumps 4 the permanently implemented BSL and makes the I / O connection 5 free for communication with the manufacturer of the microcontroller 1 firmly implemented BSL. In this variant, therefore, only one compound is effectively led outwards by connecting two of the compounds together, the initiation compound 10 However, it is also like in 2 not contacted. In the 2 and 3 variants shown can be used in the programming of the microcontroller during production or in the finished product for flashing.

11
Mikrocontrollermicrocontroller
22
Bootstrap-Loader-SpeicherbereichBootstrap loader storage area
33
Programm-SpeicherbereichProgram storage area
44
Aufruf-ProgrammCalling program
55
Ein-/AusgabeverbindungInput / output connection
66
Daten-SchnittstelleData Interface
77
Leitungmanagement
1010
Initiierungsverbindunginitiating connection
1111
Programmierverbindungprogramming connection
1212
Kommunikationsverbindungcommunication link

Claims (8)

Verfahren zur Programmierung eines Mikrocontrollers (1), wobei der Mikrocontroller (1) einen fest implementierten Bootstrap-Loader in einem Bootstrap-Loader-Speicherbereich (2) aufweist, wobei der Mikrocontroller (1) mindestens eine fest vorgegebene Initiierungsverbindung (10) aufweist, über welche das Ausführen des Bootstrap-Loader aktivierbar ist, wobei der Mikrocontroller (1) mindestens eine fest vorgegebene Programmierverbindung (11) aufweist, über welche der Bootstrap-Loader mindestens vom Bootstrap-Loader zu verarbeitende Daten empfängt, und wobei der Mikrocontroller (1) einen Programm-Speicherbereich (3) für die Speicherung von Programmen aufweist, dadurch gekennzeichnet, dass Daten, welche den Mikrocontroller (1) erreichen, von einem Aufruf-Programm (4) im Programm-Speicherbereich (3) ausgewertet werden, dass in dem Fall, dass als Daten den Mikrocontroller (1) ein Programmierbefehl erreicht, das Aufruf-Programm (4) den Bootstrap-Loader aktiviert, und dass der Bootstrap-Loader die Daten in den Programm-Speicherbereich (3) schreibt, die den Mikrocontroller (1) über die Programmierverbindung (11) erreichen.Method for programming a microcontroller ( 1 ), where the microcontroller ( 1 ) a firmly implemented bootstrap loader in a bootstrap loader storage area ( 2 ), wherein the microcontroller ( 1 ) at least one fixed initiation compound ( 10 ), via which the execution of the bootstrap loader can be activated, wherein the microcontroller ( 1 ) at least one fixed programming connection ( 11 ), via which the bootstrap loader receives at least data to be processed by the bootstrap loader, and wherein the microcontroller ( 1 ) a program memory area ( 3 ) for storing programs, characterized in that data representing the microcontroller ( 1 ), from a call program ( 4 ) in the program memory area ( 3 ) are evaluated, that in the case that as data the microcontroller ( 1 ) reaches a programming command, the call program ( 4 ) activates the bootstrap loader and that the bootstrap loader loads the data into the program memory area ( 3 ) writes that the microcontroller ( 1 ) via the programming connection ( 11 ) to reach. Verfahren nach Anspruch 1, dadurch gekennzeichnet, dass die Daten, welche den Mikrocontroller (1) über die Programmierverbindung (11) erreichen, von dem Aufruf-Programm (4) darauf ausgewertet werden, ob den Mikrocontroller (1) ein Programmierbefehl erreicht.Method according to claim 1, characterized in that the data representing the microcontroller ( 1 ) via the programming connection ( 11 ), from the call program ( 4 ) are evaluated on whether the microcontroller ( 1 ) reaches a programming command. Vorrichtung zur Bestimmung und/oder Überwachung mindestens einer Prozessgröße, mit mindestens einer Daten-Schnittstelle (6) zur Ein-/Ausgabe von Daten, und mit mindestens einem Mikrocontroller (1), wobei der Mikrocontroller (1) einen Bootstrap-Loader-Speicherbereich (2) mit einem fest implementierten Bootstrap-Loader aufweist, wobei der Mikrocontroller (1) mindestens eine fest vorgegebene Initiierungsverbindung (10) aufweist, über welche das Ausführen des Bootstrap-Loaders aktivierbar ist, wobei der Mikrocontroller (1) mindestens eine fest vorgegebene Programmierverbindung (11) aufweist, über welche der Bootstrap-Loader mindestens vom Bootstrap-Loader zu verarbeitende Daten empfängt, wobei der Mikrocontroller (1) mindestens einen Programm-Speicherbereich (3) für die Speicherung von Programmen aufweist, wobei der Mikrocontroller (1) mindestens eine Ein-/Ausgabeverbindung (5) aufweist, welche zur Ein- und/oder Ausgabe von Daten dient, und wobei die Daten-Schnittstelle (6) mit der Ein-/Ausgabeverbindung (5) verbunden ist, dadurch gekennzeichnet, dass in dem Programm-Speicherbereich (3) ein Aufruf-Programm (4) abgelegt ist, wobei das Aufruf-Programm (4) derartig ausgestaltet ist, dass das Aufruf-Programm (4) die über die Ein-/Ausgabeverbindung (5) eingehenden Daten dahingehend abfragt, ob ein Programmierungsbefehl ergeht, und dass das Aufruf-Programm (4) in dem Fall, dass ein Programmierungsbefehl ergeht, den Bootstrap-Loader aktiviert.Device for determining and / or monitoring at least one process variable, having at least one data interface ( 6 ) for input / output of data, and with at least one microcontroller ( 1 ), where the microcontroller ( 1 ) a bootstrap loader storage area ( 2 ) with a firmly implemented bootstrap loader, the microcontroller ( 1 ) at least one fixed initiation compound ( 10 ), via which the execution of the bootstrap loader can be activated, wherein the microcontroller ( 1 ) at least one fixed programming connection ( 11 ), via which the bootstrap loader at least receives data to be processed by the bootstrap loader, wherein the microcontroller ( 1 ) at least one program memory area ( 3 ) for storing programs, wherein the microcontroller ( 1 ) at least one input / output connection ( 5 ), which serves for the input and / or output of data, and wherein the data interface ( 6 ) with the input / output connection ( 5 ), characterized in that in the program memory area ( 3 ) a call program ( 4 ), whereby the call program ( 4 ) is designed such that the call program ( 4 ) via the I / O connection ( 5 ) queries incoming data as to whether a programming command is issued, and that the call program ( 4 ) in the event that a programming command is issued activates the bootstrap loader. Vorrichtung nach Anspruch 3, dadurch gekennzeichnet, dass die Ein-/Ausgabeverbindung (5) mindestens die fest vorgegebene Programmierverbindung (11) und eine Kommunikationsverbindung (12) umfasst.Device according to Claim 3, characterized in that the input / output connection ( 5 ) at least the fixed programming connection ( 11 ) and a communication connection ( 12 ). Vorrichtung nach Anspruch 3, dadurch gekennzeichnet, dass die Ein-/Ausgabeverbindung (5) nur die fest vorgegebene Programmierverbindung (11) umfasst.Device according to Claim 3, characterized in that the input / output connection ( 5 ) only the fixed programming connection ( 11 ). Vorrichtung nach Anspruch 3, dadurch gekennzeichnet, dass die Programmier-Schnittstelle (6) über zwei Leitungen (7) mit der Ein/Ausgabeverbindung (5) des Mikrocontrollers (1) verbunden ist.Apparatus according to claim 3, characterized in that the programming interface ( 6 ) over two lines ( 7 ) with the input / output connection ( 5 ) of the microcontroller ( 1 ) connected is. Vorrichtung nach mindestens einem der Ansprüche 3 bis 6, dadurch gekennzeichnet, dass das Aufruf-Programm (4) derartig in dem Programm-Speicherbereich (3) abgelegt ist, dass das Aufruf-Programm (4) unüberschreibbar ist.Device according to at least one of claims 3 to 6, characterized in that the call program ( 4 ) in the program memory area ( 3 ) that the call program ( 4 ) is irrecoverable. Vorrichtung nach mindestens einem der Ansprüche 3 bis 6, dadurch gekennzeichnet, dass das Aufruf-Programm (4) derartig in dem Programm-Speicherbereich (3) abgelegt ist, dass ein Überschreiben des Aufruf-Programms (4) die Erfüllung mindestens eines vorgebbaren Kontrollkriteriums voraussetzt.Device according to at least one of claims 3 to 6, characterized in that the call program ( 4 ) in the program memory area ( 3 ), that an override of the call program ( 4 ) requires the fulfillment of at least one predefinable control criterion.
DE200610039461 2006-08-23 2006-08-23 Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data Withdrawn DE102006039461A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE200610039461 DE102006039461A1 (en) 2006-08-23 2006-08-23 Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE200610039461 DE102006039461A1 (en) 2006-08-23 2006-08-23 Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data

Publications (1)

Publication Number Publication Date
DE102006039461A1 true DE102006039461A1 (en) 2008-02-28

Family

ID=38973263

Family Applications (1)

Application Number Title Priority Date Filing Date
DE200610039461 Withdrawn DE102006039461A1 (en) 2006-08-23 2006-08-23 Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data

Country Status (1)

Country Link
DE (1) DE102006039461A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5440632A (en) * 1992-12-02 1995-08-08 Scientific-Atlanta, Inc. Reprogrammable subscriber terminal
DE10014561A1 (en) * 2000-03-23 2001-09-27 Mannesmann Vdo Ag Method for re-programming a control device, especially for motor vehicle use, where a command for updating of data or code in memory is received from an external device during system initialization preventing system loading
DE10249177A1 (en) * 2002-10-22 2004-05-13 Leica Microsystems (Schweiz) Ag microscope

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5440632A (en) * 1992-12-02 1995-08-08 Scientific-Atlanta, Inc. Reprogrammable subscriber terminal
DE10014561A1 (en) * 2000-03-23 2001-09-27 Mannesmann Vdo Ag Method for re-programming a control device, especially for motor vehicle use, where a command for updating of data or code in memory is received from an external device during system initialization preventing system loading
DE10249177A1 (en) * 2002-10-22 2004-05-13 Leica Microsystems (Schweiz) Ag microscope

Similar Documents

Publication Publication Date Title
EP1199726B1 (en) Method and apparatus for testing integrated circuits
DE4331703C2 (en) Electronic device
DE10036278A1 (en) Monitoring the routine of an executed program, involves configuring debug logic to run exceptional condition routine if a program sequence is interrupted during the actual program run time
DE2247424A1 (en) CIRCUIT ARRANGEMENT FOR CONTROLLING COMPUTER SYSTEMS
DE102005018910A1 (en) A method of upgrading a microprocessor controlled device with new software code over a communication network
WO2003029906A1 (en) Dynamic access to automation resources
WO2017045840A1 (en) Device for processing data and method for operating a device of this type
EP3080668B1 (en) Method for influencing a control program of a control unit
DE10243856B4 (en) Regulator and method for operating a regulator
EP1037140B1 (en) Method and apparatus providing security during modification of memory contents in control devices
EP2363809A1 (en) Method for optimizing a control program for actuators
DE102006039461A1 (en) Micro-controller programming method involves evaluating data obtained by micro-controller by request program in program-memory area if programming instruction is obtained to micro-controller as data
DE10061001B4 (en) Method and control unit for controlling technical processes in a motor vehicle, and storage element and control program therefor
DE102016106572A1 (en) METHOD FOR OPERATING A CONTROL DEVICE FOR A VEHICLE, CONTROL UNIT, OPERATING SYSTEM, MOTOR VEHICLE
DE10014561A1 (en) Method for re-programming a control device, especially for motor vehicle use, where a command for updating of data or code in memory is received from an external device during system initialization preventing system loading
EP2338111B1 (en) Method and device for testing a computer core in a processor comprising at least two computer cores
DE102015008751A1 (en) NUMERIC CONTROL WITH FUNCTION FOR AUTOMATIC RECONSTRUCTION OF SETTINGS AND FUNCTION TO PREVENT INCORRECT SETTINGS
DE10143142A1 (en) Microprocessor-controlled operation of vehicular EEPROM memory, employs two memory areas with data pointers and cyclic validation strategy
DE102009000874A1 (en) Method for improving analyzability of software error in microcontroller of motor vehicle, involves providing access to conditional information, and providing conditional information for analyzing software error
DE3603240C2 (en)
DE10057782C1 (en) Operating mode switching method for process control switches between solo operating mode and redundant control mode employing back-up central processing unit
DE19629055C2 (en) Method for establishing a start state with regard to an interface by means of two identical command sequences
EP1526419A2 (en) Method for determining and providing runtime information for robot control programs
EP2005297A2 (en) Method and device for operating a motor vehicle, method and device for accessing an assignment rule and computer program product
EP2124309B1 (en) Switching device with extendible technology function and related process

Legal Events

Date Code Title Description
OM8 Search report available as to paragraph 43 lit. 1 sentence 1 patent law
R012 Request for examination validly filed

Effective date: 20130703

R081 Change of applicant/patentee

Owner name: ENDRESS+HAUSER SE+CO. KG, DE

Free format text: FORMER OWNER: ENDRESS + HAUSER GMBH + CO. KG, 79689 MAULBURG, DE

R082 Change of representative

Representative=s name: ANDRES, ANGELIKA, DE

Representative=s name: ANDRES, ANGELIKA, DIPL.-PHYS., DE

R082 Change of representative

Representative=s name: KOSLOWSKI, CHRISTINE, DR., DE

Representative=s name: KOSLOWSKI, CHRISTINE, DIPL.-CHEM. DR. RER. NAT, DE

Representative=s name: ANDRES, ANGELIKA, DIPL.-PHYS., DE

R082 Change of representative

Representative=s name: KOSLOWSKI, CHRISTINE, DR., DE

Representative=s name: KOSLOWSKI, CHRISTINE, DIPL.-CHEM. DR. RER. NAT, DE

R120 Application withdrawn or ip right abandoned