DE102017216991A1 - Communication module and device for data transmission - Google Patents
Communication module and device for data transmission Download PDFInfo
- Publication number
- DE102017216991A1 DE102017216991A1 DE102017216991.5A DE102017216991A DE102017216991A1 DE 102017216991 A1 DE102017216991 A1 DE 102017216991A1 DE 102017216991 A DE102017216991 A DE 102017216991A DE 102017216991 A1 DE102017216991 A1 DE 102017216991A1
- Authority
- DE
- Germany
- Prior art keywords
- communication module
- line
- data
- communication
- messages
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 212
- 230000005540 biological transmission Effects 0.000 title claims description 29
- 239000000872 buffer Substances 0.000 claims description 84
- 238000000034 method Methods 0.000 claims description 5
- 235000015429 Mirabilis expansa Nutrition 0.000 abstract 1
- 244000294411 Mirabilis expansa Species 0.000 abstract 1
- 235000013536 miso Nutrition 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 8
- 230000002093 peripheral effect Effects 0.000 description 8
- 230000002123 temporal effect Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000001934 delay Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 230000029305 taxis Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/403—Bus networks with centralised control, e.g. polling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4291—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Multi Processors (AREA)
- Information Transfer Systems (AREA)
Abstract
Kommunikationsbaustein (21) der dazu ausgebildet ist als Slave betrieben zu werden und mit einem zweiten Kommunikationsbaustein (22) verbunden zu werden, der dazu ausgebildet ist als Master betrieben zu werden, wobei der erste Kommunikationsbaustein (21) eine erste Leitung (CLK) zum Empfangen eines Taktsignals von dem zweiten Kommunikationsbaustein (22), eine zweite Leitung (MOSI) zum Empfangen von Daten, eine dritte Leitung (MISO) zum Senden von Daten und eine vierte Leitung (CS) aufweist, über welche der erste Kommunikationsbaustein (21) durch den zweiten Kommunikationsbaustein (22) aktiviert werden kann. Der Kommunikationsbaustein (21) weist weiterhin wenigstens eines auf von einer fünften Leitung (BUSY) zum Ausgeben eines ersten Signals welches Informationen darüber enthält, ob der erste Kommunikationsbaustein (21) dazu bereit ist Daten zu empfangen, und einer sechsten Leitung (IRQ) zum Ausgeben eines zweiten Signals welches Informationen darüber enthält, ob der erste Kommunikationsbaustein (21) Daten senden möchte.Communication module (21) which is designed to be operated as a slave and to be connected to a second communication module (22), which is designed to be operated as a master, wherein the first communication module (21) a first line (CLK) for receiving a clock signal from the second communication module (22), a second line (MOSI) for receiving data, a third line (MISO) for transmitting data and a fourth line (CS) via which the first communication module (21) through the second communication block (22) can be activated. The communication module (21) further comprises at least one of a fifth line (BUSY) for outputting a first signal containing information on whether the first communication device (21) is ready to receive data and a sixth line (IRQ) for outputting a second signal containing information about whether the first communication module (21) wants to send data.
Description
Die Erfindung betrifft einen Kommunikationsbaustein und eine Vorrichtung zur Datenübertragung, insbesondere einen Kommunikationsbaustein für eine Serial Peripheral Interface-Schnittstelle (SPI-Schnittstelle).The invention relates to a communication module and a device for data transmission, in particular a communication module for a serial peripheral interface interface (SPI interface).
Das Serial Peripheral Interface (SPI) ist ein Bus-System mit einem Standard für einen synchronen seriellen Datenbus (Synchronous Serial Port), mit dem digitale Schaltungen nach dem Master-Slave-Prinzip miteinander verbunden werden können. Eine SPI ermöglicht den seriellen (ein Bit nach dem anderen) Austausch von Daten zwischen zwei Bausteinen, von denen einer als Master und der andere als Slave bezeichnet wird. Eine SPI kann im Vollduplex-Modus betrieben werden, das heißt, dass Daten gleichzeitig in beiden Richtungen übertragen werden können. Beispielsweise können Steuereinheiten mit Peripheriegeräten oder mit Mikrocontrollern mittels SPI miteinander verbunden werden.The Serial Peripheral Interface (SPI) is a standard synchronous serial port bus system that allows master-slave digital circuits to be interconnected. An SPI enables serial (one bit at a time) exchange of data between two devices, one of which is called a master and the other a slave. An SPI can operate in full-duplex mode, meaning that data can be transmitted simultaneously in both directions. For example, controllers can be interconnected with peripherals or with microcontrollers using SPI.
SPI-Kommunikationsbausteine unterstützen verschiedene Funktionen, wie beispielsweise die Konfiguration von Kommunikationsparametern, das Schreiben und Lesen aus- und eingehender Daten, etc. Ein SPI-Slave sollte dabei generell eine hohe Zeitgenauigkeit aufweisen bei möglichst hoher Verfügbarkeit und möglichst geringem Software-Overhead. Dabei ist es jedoch insbesondere Software mäßig problematisch, dass die Zeitpunkte, zu welchen eine Kommunikation stattfinden soll durch den Master bestimmt werden. Der Slave muss somit die zu sendenden Daten zum gewünschten Zeitpunkt bereitstellen und zu empfangende Daten zum gewünschten Zeitpunkt beim Master abholen. Das zeitgenaue Bereitstellen der Daten im Slave ist dabei bei herkömmlichen Software-getriebenen SPI-Kommunikationsbausteinen verhältnismäßig aufwendig. Die meisten Bausteine sind ein Kompromiss zwischen Verfügbarkeit, Komplexität, Interrupt-Last und Ressourcenverbrauch (z.B. CPU-Laufzeit, Verhalten in Phasen geringer Leistung, etc.).SPI communication blocks support various functions, such as the configuration of communication parameters, the writing and reading of incoming and outgoing data, etc. An SPI slave should generally have a high time accuracy with the highest possible availability and the lowest possible software overhead. In this case, however, it is particularly problematic for software in particular that the times at which a communication should take place are determined by the master. The slave must thus provide the data to be sent at the desired time and pick up data to be received at the desired time at the master. The timely provision of data in the slave is relatively expensive in conventional software-driven SPI communication modules. Most devices are a compromise between availability, complexity, interrupt load, and resource consumption (e.g., CPU runtime, low-power behavior, etc.).
Aufgabe der Erfindung ist es, einen verbesserten Kommunikationsbaustein, insbesondere einen Slave, und eine verbesserte Vorrichtung zur Datenkommunikation bereitzustellen, welche eine hohe Performance sowie eine geringe Komplexität und geringe Laufzeiten eines erforderlichen Software-Treibers aufweisen, so dass der Master als herkömmlicher (SPI-)Master umgesetzt werden kann.The object of the invention is to provide an improved communication module, in particular a slave, and an improved device for data communication, which have a high performance as well as a low complexity and short run times of a required software driver, so that the master as a conventional (SPI) Master can be implemented.
Diese Aufgabe wird gelöst durch einen Kommunikationsbaustein gemäß Anspruch 1, einen Kommunikationsbaustein gemäß Anspruch 13 beziehungsweise eine Vorrichtung zur Datenübertragung gemäß Anspruch 14.This object is achieved by a communication module according to
Der erfindungsgemäße Kommunikationsbaustein ist dazu ausgebildet als Slave betrieben zu werden und mit einem zweiten Kommunikationsbaustein verbunden zu werden. Der zweite Kommunikationsbaustein ist dazu ausgebildet als Master betrieben zu werden. Der erste Kommunikationsbaustein weist eine erste Leitung zum Empfangen eines Taktsignals von dem zweiten Kommunikationsbaustein, eine zweite Leitung zum Empfangen von Daten, eine dritte Leitung zum Senden von Daten und eine vierte Leitung auf, über welche der erste Kommunikationsbaustein durch den zweiten Kommunikationsbaustein aktiviert werden kann. Der erste Kommunikationsbaustein weist weiterhin entweder eine fünfte Leitung zum Ausgeben eines ersten Signals welches Informationen darüber enthält, ob der erste Kommunikationsbaustein dazu bereit ist Daten zu empfangen, oder eine sechste Leitung, zum Ausgeben eines zweiten Signals welches Informationen darüber enthält, ob der erste Kommunikationsbaustein Daten senden möchte, oder beides auf.The communication module according to the invention is designed to be operated as a slave and to be connected to a second communication module. The second communication module is designed to be operated as a master. The first communication module has a first line for receiving a clock signal from the second communication block, a second line for receiving data, a third line for transmitting data and a fourth line via which the first communication block can be activated by the second communication block. The first communication device further comprises either a fifth line for outputting a first signal containing information as to whether the first communication device is ready to receive data or a sixth line for outputting a second signal containing information as to whether the first communication device is data want to send, or both.
Über die fünfte und sechste Leitung kann eine Flusskontrolle der Daten erfolgen. Der zweite Kommunikationsbaustein ist zu jedem Zeitpunkt darüber informiert, ob der erste Kommunikationsbaustein Daten empfangen kann und/oder Daten senden möchte. Kann der erste Kommunikationsbaustein zu einem Zeitpunkt keine Daten empfangen, kann der zweite Kommunikationsbaustein beispielsweise davon absehen Daten zu senden und vielmehr zu warten, bis der erste Kommunikationsbaustein wieder bereit dazu ist, Daten zu empfangen. Dadurch können ungewollte Fehlersituationen vermieden werden.Via the fifth and sixth line, a flow control of the data can take place. The second communication module is informed at any time whether the first communication module can receive data and / or send data. If the first communication module can not receive any data at a time, the second communication module may, for example, refrain from sending data and instead wait until the first communication module is again ready to receive data. As a result, unwanted error situations can be avoided.
Der erste Kommunikationsbaustein kann dazu ausgebildet sein, mit dem zweiten Kommunikationsbaustein über einen SPI-Bus verbunden zu werden. Die erste, zweite, dritte und vierte Leitung sind typischerweise in einem SPI-Bus bereits vorhanden. Die fünfte und sechste Leitung stellen eine Ergänzung dieser Leitungen dar.The first communication module can be designed to be connected to the second communication module via an SPI bus. The first, second, third and fourth lines are typically already present in an SPI bus. The fifth and sixth lines are a supplement to these lines.
Der erste Kommunikationsbaustein kann weiterhin wenigstens einen Eingangspuffer aufweisen, der dazu ausgebildet ist, Nachrichten zu speichern, welche vom zweiten Kommunikationsbaustein empfangen werden. Empfangene Nachrichten werden somit nicht direkt weiter verarbeitet, sondern zunächst zwischengespeichert. Die Daten können zu einem beliebigen späteren Zeitpunkt aus dem Eingangspuffer ausgelesen und verarbeitet werden.The first communication module may further comprise at least one input buffer, which is configured to store messages which are received by the second communication module. Received messages are thus not further processed directly, but initially cached. The data can be read out of the input buffer at any later time and processed.
Der erste Kommunikationsbaustein kann weiterhin wenigstens einen Ausgangspuffer aufweisen, der dazu ausgebildet ist, Nachrichten zu speichern, die an den zweiten Kommunikationsbaustein übertragen werden sollen. Nachrichten können zu jedem beliebigen Zeitpunkt im Ausgangspuffer abgelegt werden. Wird dann eine Kommunikation durch den zweiten Kommunikationsbaustein angestoßen, kann dieser die Daten dann aus dem Ausgangspuffer auslesen.The first communication module may further comprise at least one output buffer, which is configured to store messages that are to be transmitted to the second communication module. Messages can be stored in the output buffer at any time. Will then be a communication through the triggered second communication block, this can then read the data from the output buffer.
Der erste Kommunikationsbaustein kann dazu ausgebildet sein mit einem Mikrocontroller verbunden zu werden, wobei der Mikrocontroller dazu ausgebildet sein kann, Nachrichten aus dem Eingangspuffer auszulesen und zu verarbeiten und Nachrichten in den Ausgangspuffer zur Übertragung an den zweiten Kommunikationsbaustein abzulegen. Der erste Kommunikationsbaustein dient somit lediglich als Interface. Die Verarbeitung und Bereitstellung der Daten erfolgt im Mikrocontroller.The first communication module may be configured to be connected to a microcontroller, wherein the microcontroller may be configured to read messages from the input buffer and to process and store messages in the output buffer for transmission to the second communication module. The first communication module thus serves only as an interface. The processing and provision of the data takes place in the microcontroller.
Das erste Signal der fünften Leitung kann einen ersten Zustand annehmen, wenn der erste Kommunikationsbaustein keine neuen Nachrichten empfangen kann und kann einen zweiten Zustand annehmen, wenn der erste Kommunikationsbaustein neue Nachrichten empfangen kann. Der Zustand des Signals gibt somit auf einfache Art und Weise den Zustand des ersten Kommunikationsbausteins wider.The first signal of the fifth line may assume a first state if the first communication block can not receive new messages and may assume a second state if the first communication block can receive new messages. The state of the signal thus simply reflects the state of the first communication module.
Das zweite Signal der sechsten Leitung kann einen ersten Zustand annehmen, wenn der erste Kommunikationsbaustein neue Nachrichten senden möchte und kann einen zweiten Zustand annehmen, wenn der erste Kommunikationsbaustein keine neuen Nachrichten zu senden hat. Der Zustand des Signals gibt somit auf einfache Art und Weise den Zustand des ersten Kommunikationsbausteins wider.The second signal of the sixth line may assume a first state if the first communication block wants to send new messages and may assume a second state if the first communication block does not have to send new messages. The state of the signal thus simply reflects the state of the first communication module.
Der erste Kommunikationsbaustein kann dazu ausgebildet sein, Nachrichten an den zweiten Kommunikationsbaustein zu senden, welche neben Nutzdaten auch eine Prüfsumme aufweisen, und Nachrichten von dem zweiten Kommunikationsbaustein zu empfangen, welche neben Nutzdaten auch eine Prüfsumme aufweisen. Dadurch kann auf einfache Art und Weise anhand der Prüfsumme die Integrität einer Nachricht überprüft werden.The first communication module may be configured to send messages to the second communication module, which in addition to user data also have a checksum, and to receive messages from the second communication module, which in addition to payload data also have a checksum. As a result, the integrity of a message can be checked in a simple manner on the basis of the checksum.
Der erste Kommunikationsbaustein kann weiterhin wenigstens eines aufweisen von wenigstens einem ersten Schieberegister, das derart vor dem Eingangspuffer angeordnet ist, dass Nachrichten die vom zweiten Kommunikationsbaustein empfangen werden zunächst im ersten Schieberegister gespeichert werden und von dort in den Eingangspuffer übernommen werden, und wenigstens einem zweiten Schieberegister, das derart hinter dem Ausgangspuffer angeordnet ist, dass Nachrichten die an den zweiten Kommunikationsbaustein gesendet werden sollen, vom Ausgangspuffer in das zweite Schieberegister übernommen werden und von dort an das zweite Kommunikationsgerät übertragen werden. Dadurch wird noch ein weiterer Puffer vor bzw. nach dem jeweiligen Eingangs- bzw. Ausgangspuffer bereitgestellt.The first communication module may further comprise at least one of at least a first shift register, which is arranged in front of the input buffer such that messages received by the second communication module are first stored in the first shift register and transferred from there to the input buffer, and at least one second shift register , which is arranged behind the output buffer so that messages to be sent to the second communication module are taken from the output buffer in the second shift register and are transmitted from there to the second communication device. As a result, a further buffer is provided before or after the respective input or output buffer.
Der Kommunikationsbaustein kann alternativ oder zusätzlich auch wenigstens ein Schieberegister aufweisen, wobei wenigstens eines der Schieberegister dazu ausgebildet ist, sowohl Nachrichten die vom zweiten Kommunikationsbaustein empfangen werden zunächst zu speichern bevor diese von dort in den Eingangspuffer übernommen werden, als auch Nachrichten die an den zweiten Kommunikationsbaustein gesendet werden sollen, vom Ausgangspuffer zu übernehmen bevor diese von dort an das zweite Kommunikationsgerät übertragen werden.The communication module may alternatively or additionally also have at least one shift register, wherein at least one of the shift registers is configured to store both messages received by the second communication module before they are transferred from there into the input buffer, as well as messages to the second communication module should be sent from the output buffer before they are transferred from there to the second communication device.
Die Schieberegister können durch das Taktsignal oder durch einen aus dem Taktsignal generierten Takt getrieben werden.The shift registers may be driven by the clock signal or by a clock generated from the clock signal.
Eine Nachricht die an den zweiten Kommunikationsbaustein übertragen werden soll kann zu einem ersten Zeitpunkt in dem Ausgangspuffer gespeichert werden. Dabei kann ein erster Zeitstempel zusammen mit der Nachricht im Ausgangspuffer abgelegt werden, wobei der erste Zeitstempel Informationen zum ersten Zeitpunkt enthält. Die Nachricht kann dann zu einem zweiten Zeitpunkt an den zweiten Kommunikationsbaustein übertragen werden. Der erste Kommunikationsbaustein kann dabei dazu ausgebildet sein, wenn die Nachricht an den zweiten Kommunikationsbaustein übertragen wird, den ersten Zeitstempel durch erste Daten zu ersetzen, wobei die ersten Daten Informationen zu einer Zeitdauer (delta) aufweisen die zwischen dem ersten Zeitpunkt und dem zweiten Zeitpunkt vergangen ist.A message that is to be transmitted to the second communication module can be stored in the output buffer at a first time. In this case, a first time stamp can be stored together with the message in the output buffer, the first time stamp containing information for the first time. The message can then be transmitted to the second communication module at a second time. The first communication module can be designed to replace the first time stamp with first data if the message is transmitted to the second communication module, the first data having information on a time duration (delta) which has elapsed between the first time and the second time is.
Ein zweiter Kommunikationsbaustein ist dazu ausgebildet, als Master betrieben zu werden und mit wenigstens einem ersten Kommunikationsbaustein verbunden zu werden. Der erste Kommunikationsbaustein ist dazu ausgebildet, als Slave betrieben zu werden. Der zweite Kommunikationsbaustein weist eine erste Leitung zum Ausgeben eines Taktsignals an den wenigstens einen ersten Kommunikationsbaustein, eine zweite Leitung zum Senden von Daten, eine dritte Leitung zum Empfangen von Daten und eine vierte Leitung über welche der zweite Kommunikationsbaustein den wenigstens einen ersten Kommunikationsbaustein aktivieren kann. Der zweite Kommunikationsbaustein weist entweder eine fünfte Leitung zum Empfangen eines ersten Signals von dem wenigstens einen ersten Kommunikationsbaustein, wobei das erste Signal Informationen darüber enthält, ob der wenigstens eine erste Kommunikationsbaustein dazu bereit ist Daten zu empfangen, oder eine sechste Leitung zum Empfangen eines zweiten Signals von dem wenigstens einen ersten Kommunikationsbaustein, wobei das zweite Signal Informationen darüber enthält, ob der wenigstens eine erste Kommunikationsbaustein Daten senden möchte, oder beides auf.A second communication module is designed to be operated as a master and to be connected to at least one first communication module. The first communication module is designed to be operated as a slave. The second communication module has a first line for outputting a clock signal to the at least one first communication module, a second line for transmitting data, a third line for receiving data and a fourth line via which the second communication module can activate the at least one first communication module. The second communication device either has a fifth line for receiving a first signal from the at least one first communication device, the first signal containing information as to whether the at least one first communication device is ready to receive data, or a sixth line for receiving a second signal from the at least one first communication device, wherein the second signal contains information about whether the at least one first communication device wants to send data, or both.
Eine Vorrichtung zur Datenübertragung weist wenigstens einen ersten Kommunikationsbaustein und einen zweiten Kommunikationsbaustein auf, wobei der wenigstens eine erste Kommunikationsbaustein dazu ausgebildet ist als Slave betrieben zu werden und der zweite Kommunikationsbaustein dazu ausgebildet ist als Master betrieben zu werden. Der wenigstens eine erste Kommunikationsbaustein und der zweite Kommunikationsbaustein sind über einen Datenbus miteinander verbunden. Der Datenbus weist eine erste Leitung zum Übertragen eines Taktsignals von dem zweiten Kommunikationsbaustein an den ersten Kommunikationsbaustein, eine zweite Leitung zum Übertragen von Daten vom zweiten Kommunikationsbaustein an den wenigstens einen ersten Kommunikationsbaustein, eine dritte Leitung zum Übertragen von Daten von dem wenigstens einen ersten Kommunikationsbaustein an den zweiten Kommunikationsbaustein und eine vierte Leitung auf über welche der wenigstens eine erste Kommunikationsbaustein durch den zweiten Kommunikationsbaustein aktiviert werden kann. Die Vorrichtung weist weiterhin entweder eine fünfte Leitung zum Übertragen eines ersten Signals an den zweiten Kommunikationsbaustein welches Informationen darüber enthält, ob der wenigstens eine erste Kommunikationsbaustein dazu bereit ist Daten zu empfangen, oder eine sechste Leitung zum Übertragen eines zweiten Signals an den zweiten Kommunikationsbaustein welches Informationen darüber enthält, ob der wenigstens eine erste Kommunikationsbaustein Daten senden möchte, oder beides auf. A device for data transmission has at least a first communication module and a second communication module, wherein the at least one first communication module is designed to be operated as a slave and the second communication module is designed to be operated as a master. The at least one first communication module and the second communication module are connected to each other via a data bus. The data bus has a first line for transmitting a clock signal from the second communication module to the first communication module, a second line for transmitting data from the second communication module to the at least one first communication module, a third line for transmitting data from the at least one first communication module the second communication module and a fourth line over which the at least one first communication module can be activated by the second communication module. The device further comprises either a fifth line for transmitting a first signal to the second communication module containing information on whether the at least one first communication block is ready to receive data, or a sixth line for transmitting a second signal to the second communication block which information about whether the at least one first communication module wants to send data, or both.
Die Vorrichtung kann in einem Fahrzeug angeordnet sein.The device may be arranged in a vehicle.
Die Erfindung wird nachfolgend anhand der in den Figuren der Zeichnung dargestellten Ausführungsbeispiele näher erläutert. Es zeigt:
-
1 in einer schematischen Darstellung beispielhaft das Prinzip eines Serial Peripheral Interface, -
2 beispielhaft in einem Blockdiagramm einen Kommunikationsbaustein, -
3 beispielhaft in zeitlichen Diagrammen Signale in einer Datenkommunikation, -
4 beispielhaft in zeitlichen Diagrammen Signale in einer Datenkommunikation unter Verwendung von Puffern, -
5 beispielhaft in einem Blockdiagramm eine Schnittstelle zwischen einem Mikrocontroller und einem Kommunikationsbaustein, -
6 , aufweisend die6A und6B , eingehende und ausgehende SPI-Daten, -
7 beispielhaft in einem Blockdiagramm einen Kommunikationsbaustein mit Puffern und Schieberegistern, -
8 beispielhaft in zeitlichen Diagrammen eine zeitliche Zuordnung eines Übertragungszeitpunkts und eines Verarbeitungszeitpunkts, -
9 beispielhaft ausgehende SPI-Daten mit einem Zeitstempel, und -
10 beispielhaft in zeitlichen Diagrammen eine zeitliche Zuordnung eines Beauftragungszeitpunktes und eines Übertragungszeitpunktes.
-
1 in a schematic representation by way of example the principle of a serial peripheral interface, -
2 by way of example in a block diagram a communication module, -
3 exemplary in time diagrams signals in a data communication, -
4 by way of example in chronological diagrams signals in a data communication using buffers, -
5 exemplified in a block diagram an interface between a microcontroller and a communication module, -
6 Having the6A and6B , incoming and outgoing SPI data, -
7 by way of example in a block diagram a communication module with buffers and shift registers, -
8th by way of example in time diagrams a temporal assignment of a transmission time and a processing time, -
9 exemplary outgoing SPI data with a timestamp, and -
10 For example, in temporal diagrams a temporal assignment of a commissioning time and a transmission time.
Ein SPI-Kommunikationsbaustein, unabhängig davon ob dieser als Master oder als Slave fungiert, weist drei Leitungen auf, an welchen jeder Teilnehmer (Master und ein oder mehrere Slaves) angeschlossen sind. Dies sind eine Takt-Leitung CLK, auch als Clock oder Serial Clock bezeichnet, wobei der Takt vom Master ausgegeben wird, und zwei Leitungen zum Übertragen von Daten. Eine so genannte MOSI-Leitung (Master Output, Slave Input), zum Übertragen von Daten vom Master
Ein SPI-Kommunikationsbaustein weist weiterhin eine oder mehrere logisch-0 aktive Chip-Select-Leitungen (CS-Leitung) auf (oft auch als Slave Select SS oder Slave Transmit Enable STE bezeichnet) . In der Regel weist jeder Slave nur eine CS-Leitung auf. Ein Master kann eine oder mehrere CS-Leitungen aufweisen. Beispielsweise kann der Master für jeden Slave mit dem er verbunden ist eine eigene CS-Leitung aufweisen. Diese Leitungen CS werden vom Master
Es können theoretisch beliebig viele Teilnehmer an einen SPI-Bus angeschlossen werden. Dabei ist jedoch immer genau ein Master
Es existiert kein festgelegtes Protokoll zur Datenübertragung für SPI, jedoch haben sich allgemein vier verschiedene Modi durchgesetzt. Diese werden durch die Parameter Clock Polarität (CPOL) und Clock Phase (CPHA) festgelegt. Bei CPOL = 0 ist der Clock Idle Low, bei CPOL = 1 ist der Clock Idle High. CPHA gibt an, bei der wievielten Flanke des Taktsignals die Daten übernommen werden sollen. Bei CPHA = 0 werden sie bei der ersten Flanke übernommen nachdem CS auf Low gezogen wurde, und bei CPHA = 1 bei der zweiten Flanke. Somit werden die Daten bei CPOL = 0 und CPHA = 0 mit der ersten Flanke übernommen, welche nur eine steigende Flanke sein kann. Bei CPHA = 1 wäre es die zweite Flanke, also eine fallende Flanke. Bei CPOL = 1 ist dies genau andersherum, also bei CPHA = 0 eine fallende Flanke und bei CPHA = 1 eine steigende Flanke.There is no established protocol for data transmission for SPI, but generally four different modes have prevailed. These are defined by the parameters Clock Polarity (CPOL) and Clock Phase (CPHA). At CPOL = 0 the clock idle is low, at CPOL = 1 the clock idle is high. CPHA indicates at which time edge of the clock signal the data should be taken over. At CPHA = 0, they are taken on the first edge after CS has been pulled low, and at CPHA = 1 on the second edge. Thus, the data at CPOL = 0 and CPHA = 0 are taken over with the first edge, which can only be a rising edge. With CPHA = 1, it would be the second edge, ie a falling edge. With CPOL = 1, this is exactly the other way around, ie with CPHA = 0 a falling edge and with CPHA = 1 a rising edge.
Der Slave
Mit jeder Taktperiode wird ein Bit übertragen. Beim üblichen Bytetransfer sind also acht Taktperioden für eine vollständige Übertragung nötig. Es können auch mehrere Wörter hintereinander übertragen werden. Dabei ist nicht festgelegt, ob nach jedem Wort die CS-Leitung kurz auf High gezogen werden muss oder nicht. Eine Übertragung ist beendet, wenn die CS-Leitung endgültig wieder auf High gesetzt wird.With each clock period, one bit is transmitted. In the usual byte transfer so eight clock periods are required for a complete transfer. You can also transfer several words in succession. It is not determined whether after each word the CS line must be briefly pulled high or not. A transfer is complete when the CS line is finally reset to high.
Der Slave
Dies ist jedoch nur ein Beispiel, grundsätzlich besteht auch die Möglichkeit, dass der Slave
Das Taktsignal weist einen High-Zustand auf, solange der Slave
Während der Slave
Wenn die Länge der Nachrichten begrenzt ist (z.B. X = 20), jedoch Daten in einer Menge übertragen werden sollen welche die Länge einer Nachricht übersteigen, kann die Gesamtmenge an Daten auf mehrere Nachrichten aufgeteilt werden. Ist die Menge der zu übertragenden Daten kleiner als die Länge der Nachrichten, kann der nicht benötigte Teil der in einer Nachricht übertragenen Daten einfach ignoriert werden. Die Größe der einzelnen Datentransfers ist von Anwendung zu Anwendung meist sehr unterschiedlich. Die Stückelung der Datentransfers, also die Größe der einzelnen Nachrichten und somit die Anzahl der für einen Datentransfer benötigten Nachrichten kann je nach Anforderungen der Anwendung gewählt werden.If the length of the messages is limited (eg X = 20), but data should be transmitted in an amount which is the length of a message exceed, the total amount of data can be split across multiple messages. If the amount of data to be transmitted is smaller than the length of the messages, the unneeded portion of the data transmitted in a message can simply be ignored. The size of the individual data transfers varies from application to application. The denomination of the data transfers, ie the size of the individual messages and thus the number of messages required for a data transfer can be selected according to the requirements of the application.
Dabei ist es, wie oben bereits erläutert, beispielsweise möglich eine feste Größe für Nachrichten festzulegen, welche dann nicht mehr verändert werden kann. Es ist jedoch auch möglich, dass die Größe der Nachrichten beispielsweise vor jedem Datentransfer neu festgelegt ist.It is, as already explained above, for example, set a fixed size for messages, which then can not be changed. However, it is also possible that the size of the messages, for example, before each data transfer is redefined.
Der Slave
Der Slave
Wie in
Der Slave
Wird also durch den Master
Dabei kann es vorkommen, dass zu Beginn einer Datenkommunikation keine Nachrichten im Ausgangspuffer
Der Slave
Die fünfte Leitung BUSY und die sechste Leitung IRQ können beide jeweils zwei Zustände annehmen. Ein erster Zustand ist ein aktiver Zustand „aktiv“ und ein zweiter Zustand ist ein inaktiver Zustand „nicht aktiv“. Ist die fünfte Leitung BUSY im Zustand „aktiv“, bedeutet dies, dass der Slave
Ist die sechste Leitung IRQ „aktiv“, bedeutet dies, dass Nachrichten vorhanden sind welche an den Master
Zur Verwaltung der fünften und sechsten Leitung BUSY, IRQ ist ein Eingreifen des Mikrocontrollers
Dabei kann sich der Zustand der fünften Leitung BUSY nur während einer laufenden Datenübertragung von „nicht aktiv“ zu „aktiv“ ändern, da der Master
Wird der Zustand der Leitung BUSY als „nicht aktiv“ erkannt, kann unabhängig vom derzeitigen Zustand des Mikrocontrollers
Grundsätzlich ist es möglich, dass der Master
Der Slave
Die Fehlerprüfung kann beispielsweise auch das Prüfen einer Prüfsumme PS(Checksum) der vom Master
Eine vom Master
Wird die Prüfsumme PS einer Nachricht als nicht korrekt erkannt, kann die Nachricht beispielsweise verworfen werden. Das heißt, die Nachricht kann beispielsweise nicht in die Eingangspuffer
Der Slave
Ein zweites Schieberegister
In
Um die Daten vom ersten Schieberegister
Es kann beispielsweise vorgesehen sein, dass das System in einen Low-Power Modus oder Ruhezustand wechselt, in dem kein externer Takt zur Verfügung steht. Im Low-Power Modus kann der Slave
Der Mikrocontroller
Indem die Nachrichten in einem Eingangspuffer
Die sich möglicherweise ergebende zeitliche Verzögerung ist beispielhaft in
In ähnlicher Weise kann sich bei der Datenübertragung vom Slave
Nicht nur ein Kommunikationsbaustein
Eine Vorrichtung zum Übertragen von Daten weist einen ersten Kommunikationsbaustein
BezugszeichenlisteLIST OF REFERENCE NUMBERS
- 1111
- Slaveslave
- 1212
- Mastermaster
- 2121
- erstes Kommunikationsgerät/Slavefirst communication device / slave
- 2222
- zweites Kommunikationsgerät/Mastersecond communication device / master
- 3030
- Mikrocontrollermicrocontroller
- 4141
- Eingangspufferinput buffer
- 4242
- Ausgangspufferoutput buffer
- 4343
- Information ob Puffer gefüllt istInformation on whether buffer is filled
- 4444
- Information ob Puffer leer istInformation if buffer is empty
- 4545
- Information über Begin einer ÜbertragungInformation about the beginning of a transmission
- 4646
- Information über Ende einer ÜbertragungInformation about the end of a transmission
- 50, 5150, 51
- Schieberegistershift register
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE102017216991.5A DE102017216991B4 (en) | 2017-09-26 | 2017-09-26 | Communication module and device for data transmission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE102017216991.5A DE102017216991B4 (en) | 2017-09-26 | 2017-09-26 | Communication module and device for data transmission |
Publications (2)
Publication Number | Publication Date |
---|---|
DE102017216991A1 true DE102017216991A1 (en) | 2019-03-28 |
DE102017216991B4 DE102017216991B4 (en) | 2024-03-07 |
Family
ID=65638453
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE102017216991.5A Active DE102017216991B4 (en) | 2017-09-26 | 2017-09-26 | Communication module and device for data transmission |
Country Status (1)
Country | Link |
---|---|
DE (1) | DE102017216991B4 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060143348A1 (en) * | 2004-12-29 | 2006-06-29 | Wilson Matthew T | System, method, and apparatus for extended serial peripheral interface |
-
2017
- 2017-09-26 DE DE102017216991.5A patent/DE102017216991B4/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060143348A1 (en) * | 2004-12-29 | 2006-06-29 | Wilson Matthew T | System, method, and apparatus for extended serial peripheral interface |
Non-Patent Citations (2)
Title |
---|
„Serial Peripheral Interface Bus". In: Wikipedia, Die freie Enzyklopädie. Bearbeitungsstand: 4. August 2017, 09:08 UTC. URL: https://en.wikipedia.org/w/index.php?title=Serial_Peripheral_Interface_Bus&oldid=793841576 [abgerufen am 18.06.2018] * |
STMicroelectronics : STM32F7 - SPI. Serial Peripheral Interface, 10. August 2017. Genf Schweiz 2017. Seiten 1 – 28 - Firmenschrift. https://web.archive.org/web/20170810015159/http://www.st.com/content/ccc/resource/training/technical/product_training/group0/3e/ee/cd/b7/84/4b/45/ee/STM32F7_Peripheral_SPI/files/STM32F7_Peripheral_SPI.pdf/_jcr_content/translations/en.STM32F7_Peripheral_SPI.pdf [abgerufen am 18.06.2018] * |
Also Published As
Publication number | Publication date |
---|---|
DE102017216991B4 (en) | 2024-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE3300261C2 (en) | ||
DE3300260C2 (en) | ||
DE3300262C2 (en) | ||
DE69634358T2 (en) | DELAY REDUCTION IN THE TRANSMISSION OF BUFFERED DATA BETWEEN TWO ASYNCHRONOUS BUSES | |
DE102010049534B4 (en) | Coupling units, system with a coupling unit and method for use in a system with a coupling unit | |
DE3004827C2 (en) | Data processing system | |
DE4307449C2 (en) | Method and circuit for resynchronizing a synchronous serial interface | |
DE102013113262B4 (en) | trigger routing unit | |
WO2006111499A1 (en) | Method and device for synchronising two bus systems, and arrangement consisting of two bus systems | |
DE102008055892A1 (en) | Storing sections of a data transfer descriptor in a cached and uncached address space | |
DE102005048581B4 (en) | Subscriber interface between a FlexRay communication module and a FlexRay subscriber and method for transmitting messages via such an interface | |
DE102013210077A1 (en) | Method for providing a generic interface and microcontroller with generic interface | |
DE112018002334T5 (en) | DEVICES AND METHOD FOR TRANSMITTING EVENTS WITH A SAME-SHAPED LATENCY ON SERIAL COMMUNICATION LINKS | |
DE112015006192T5 (en) | Communication device, communication method and program | |
DE102013210182A1 (en) | Method for providing a generic interface and microcontroller with generic interface | |
DE102018001574B4 (en) | Master-slave bus system and method for operating a bus system | |
EP1639758B1 (en) | Method and device for the exchange of data via a bus system | |
DE112019005021T5 (en) | DEVICES, SYSTEMS AND PROCEDURES FOR SYNCHRONIZING EVENT WINDOWS IN RADIO NETWORKS | |
DE102009001898A1 (en) | Circuit arrangements and methods for controlling a data exchange in a circuit arrangement | |
DE102011004358B3 (en) | Method for transmitting data over a synchronous serial data bus | |
EP1370952B1 (en) | Communication method for establishing event channels in a timed communication system | |
EP3072250B1 (en) | Communication device, communication system and method for the synchronised sending of messages | |
DE102017216991B4 (en) | Communication module and device for data transmission | |
EP2801915B1 (en) | Adaptive interface for coupling of fpga modules | |
EP1308846B1 (en) | Data Transfer Device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
R012 | Request for examination validly filed | ||
R079 | Amendment of ipc main class |
Free format text: PREVIOUS MAIN CLASS: H04L0012403000 Ipc: G06F0013400000 |
|
R016 | Response to examination communication | ||
R081 | Change of applicant/patentee |
Owner name: CONTINENTAL AUTOMOTIVE TECHNOLOGIES GMBH, DE Free format text: FORMER OWNER: CONTINENTAL AUTOMOTIVE GMBH, 30165 HANNOVER, DE |
|
R018 | Grant decision by examination section/examining division | ||
R081 | Change of applicant/patentee |
Owner name: CONTINENTAL AUTOMOTIVE TECHNOLOGIES GMBH, DE Free format text: FORMER OWNER: CONTINENTAL AUTOMOTIVE TECHNOLOGIES GMBH, 30165 HANNOVER, DE |