0% found this document useful (0 votes)
57 views18 pages

Communication Protocols For Embedded Systems: Astrit ADEMAJ

The document discusses various communication protocols for embedded systems. It defines protocols as sets of formal rules for exchanging data and describes requirements like agreed coding, timing, and naming. It also outlines properties of message-based and shared memory-based data exchange. Common protocols discussed include time-triggered and event-triggered, with time-triggered requiring pre-defined schedules. Additional protocols covered are token passing, master-slave polling, TDMA, CSMA/CD, and CSMA/CA.

Uploaded by

Nguyen Quoc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views18 pages

Communication Protocols For Embedded Systems: Astrit ADEMAJ

The document discusses various communication protocols for embedded systems. It defines protocols as sets of formal rules for exchanging data and describes requirements like agreed coding, timing, and naming. It also outlines properties of message-based and shared memory-based data exchange. Common protocols discussed include time-triggered and event-triggered, with time-triggered requiring pre-defined schedules. Additional protocols covered are token passing, master-slave polling, TDMA, CSMA/CD, and CSMA/CA.

Uploaded by

Nguyen Quoc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Communication Protocols

for Embedded Systems


Astrit ADEMAJ

Overview
Definition of a protocol
Protocol properties
Basic Principles
Embedded system communication protocols
Summary

1
What is a communication protocol?
A set of formal rules describing how to exchange data.

Low-level protocols define the electrical and physical standards to


be observed, bit- and byte-ordering and the transmission and error
detection and correction of the bit stream.

High-level protocols deal with the data formatting, including the


syntax of messages, the terminal to computer dialogue, character
sets, sequencing of messages etc.

Requirements for Communication


Agreed code space:
How is the data encoded?
Agreed time space:
When is the data valid?
Agreed name space:
What does the transmitted data mean?

2
Overview
Definition of a protocol
Protocol properties
Basic Principles
Embedded system communication protocols
Summary

Properties of Data Exchange


Message-based data exchange
Data flow
Sender Receiver
Control flow (controlling the f
information exchange
between sender and receiver)

Shared memory-based data exchange


No control flow over shared memory
Memory

Sender Receiver

3
State / Event Messages
State messages: periodic exchange of state information
State Information := < Name, Value, tobs >
Time - triggered communication

Event messages: sporadic exchange of event information


Event Information := < Name, Value, tevent >
Event - triggered communication

State Information Event Information


At sender: At sender:
At-least-once transmission Exactly-once transmission
Non-consuming sending, one Consuming sending
can send the same status data
many times.
At receiver: At receiver:
Update in place Queuing
Non-consuming read (one can Consumed upon read
read the last valid message)

No state synchronization required


History state required=>queuing
Idempotent
8

4
Communication Parameters
Message delay
Latency - time interval between the start of message transmission at the
sender node and the time of reception of the message at the receiver node
dmax maximum delay;
dmin minimum delay)
Jitter = dmax dmax
Bandwidth
Net bandwidth vs. total bandwidth
Fault handling
Message retransmission
Forward error correction
Message redundancy

Control Flow: Push and Pull Style


Push style communication:

Pull style communication:

10

5
The PAR Principle
(Positive Acknowledge or Retry)

Sender initiates communication (Push principle)


Sender waits for receivers answer or timeout
Communication errors are detected by the sender
Time redundancy is used to correct an error (increased latency
and traffic in the presence of errors)
Problems:
Jitter
Thrashing (throughput decreases above particular load)
PAR principle used in TCP

11

Message-based Clock Synchronization


Simple Method message transmission time are known:
A sends message containing its local time
Receiver B can correct with term (dmin+dmax)/2
Jitter affects precision
Round-Trip Method - message transmission time are not known:
B requests timestamp message from A
B measures duration t until reception of answer
B corrects with term t/2
dmin and dmax must not be known
Jitter affects precision
12

6
Clock Synchronization with Shared
Memory

Shared Memory contains a real-time image of a clock


Sender must guarantee that timestamp is not older than
duration d
d affects precision

13

Time-Triggered vs. Event-Triggered


Time-triggered communication protocols
sending and receiving actions are driven by the time
exchange of state messages
All communicating partner need to have a priory knowledge of the
message send/receive time instants
Event-triggered communication protocols
sending and receiving actions are driven by an event
exchange of event messages
No a priory knowledge of the message send/receive time instants is
needed

14

7
Time-Triggered Communication
Sender: Push style
Receiver: Pull style
Control flow is interrupted by memory element
Temporal Firewall
Communication between memory element occur at
predefined instants

15

Time-Triggered Communication Schedule


1 2 3 4
A Send Receive Receive
B Receive Send Receive Send
C Receive Receive Send Receive
D Receive Receive Receive

16

8
Overview
Definition of a protocol
Protocol properties
Basic Principles
Embedded system communication protocols
Summary

17

Token Principle
token is passed from one station to another according to a set of rules
Only the station in possession of the token is allowed to transmit data
Token ring is a logical ring topology, but can physically implemented as bus,
star, or ring
Recovery from lost/duplicate tokens?
Token hold time
Token rotation time
IEEE 802.5 (IBM token ring), FDDI (Fiber Distributed Data Interface)

T
Master 1 Master 2 Master 3

18

9
Master/Slave Principle
Polling
Master sends request message
Slave answers on request
Usually cyclic polling (e.g. ASi, LIN bus)

Multiple masters as token ring


(e.g., Profibus)
T
Master 1 Master 2 Master 3

S1 S2 S3 S4

19

TDMA Principle
(Time Division Multiple Access)
The time is the token
Requires common time base and predefined schedule in all nodes
Common time base via distributed reference clocks (TTP/C)
Common time base via master reference clock (TTP/A)

1 2 3 4

A Send Receive Receive


B Receive Send Receive Send
C Receive Receive Send Receive
D Receive Receive Receive

20

10
CSMA/CD Principle (Push)
(Carrier Sense Multiple Access/Collision Detection)

Listen before transmit. If channel is sensed busy, defer


transmission
Collisions may still exist, since two stations may sense the
channel idle at the same time
Verify transmission by read back
If collision, back off and retransmit later
CSMA/CD principle used in 10Mbps Ethernet (IEEE 802.3), Fast
Ethernet (100Mbps), Gigabit Ethernet (1,000 Mbps)

21

CSMA/CA Principle (Push)


There are two states on the communication channel
dominant and recessive
Listen before transmit. If channel is sensed busy, defer
transmission
Node first sends an ID and verifies bit by bit by read back
Node stops transmission if a bit of the ID is overwritten by other
node
ID with dominant Bits at
beginning have higher priority
Requires Bit time > 2 LineDelay
E.g. Bus length 40 m, propagation delay 200 nsec

22

11
CSMA/CA Principle (Push)
(Carrier Sense Multiple Access/Collision Avoidance)

23

Minislotting
Minislotting requires that each node waits for a certain period after sending a
message before it sends another message.
Media access is controlled by three intervals:
TG: Terminal Gap controlling the access to the bus,
different for every node,
longer than the propagation delay of the channel
TI: Transmit Interval
Disabling the host from monopolizing the bus
same for all nodes
SG: Synchronization Gap
same for all nodes
Control the sequence of entrance in the waiting room
SG > max (TGi),
TI > SG

24

12
Overview
Definition of a protocol
Protocol properties
Basic Principles
Embedded system communication protocols
Summary

25

TTP/C
Synchronous system
Common communication schedule - TDMA
Known upper bound on the transmission time of a message
Aerospace industry
Bus and/or star topology
Fault tolerant
two communication channels
fault tolerant midpoint (clock synchronization)
Using a priori knowledge (guardian)

26

13
TTP/A
Time-Triggered
TDMA
Master /Slave
Bus topology
A priori knowledge

27

CAN protocol
Event -Triggered
Automotive industry
Bandwidth up to 1 Mbit/sec
Bus topology
Different variants
Full CAN
CAN kingdom

28

14
Arinc 629
Aerospace industry (Boeing 777)
Syncronization Gap (SG)
Terminal Gap (TG) 4-128 sec
Transmitt interval (TI) 0.5 64 msec
Bandwidth: 2 Mbit/sec

TG1 TI
P1 SG M1

TG2 TG2 TI
P2
SG M2
Real Time

29

FlexRay
Combination of TDMA and mini-slotting
Communication bandwidth is divided into two segments:
Static segment (TDMA)
State messages
Dynamic segment (mini-slotting)
Event messages
Automotive Industry
Bandwidth up to 10 Mbit/s
Bus or star topology

30

15
Time-Triggered Ethernet
Integration of time-triggered and
event triggered traffic into a same
communication infrastructure
TT traffic (periodic with 16
Host Standard different periods)
Ethernet
Computer Controller ET traffic standard Ethernet,
TCP(IP, UDP, )
Host Standard
Ethernet
Computer Controller
Star topology
Bandwidth:100 Mbit/s, 1 Gbit/s

31

Principle of Operation
TT Ethernet switch - transmits TT msg. with a constant delay
Transmission of ET msg. is preempted,
if during the transmission a TT msg. arrives at a switch port, ET
msg. is stored in the buffer of the switch, and retransmitted as
soon as the transmission of the TT msg. is finished
If during the transmission of TT msg. an ET msg. arrives in a port
of the switch, the ET msg. is stored in the buffer of the switch and
transmitted after the transmission of TT msg. is finished

32

16
Overview
Definition of a protocol
Protocol properties
Basic Principles
Embedded system communication protocols
Summary

33

Conclusion
Communication needs a set of rules describing how to
transmit data
Push style communication in combination with
retransmission mechanism leads to high jitter
Polling, Token ring and TDMA are deterministic
Usually tradeoff: Average performance <->
Determinism/Worst case performance

34

17
Questions?

35

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy