Communication Protocols For Embedded Systems: Astrit ADEMAJ
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.
2
Overview
Definition of a protocol
Protocol properties
Basic Principles
Embedded system communication protocols
Summary
Sender Receiver
3
State / Event Messages
State messages: periodic exchange of state information
State Information := < Name, Value, tobs >
Time - triggered communication
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
10
5
The PAR Principle
(Positive Acknowledge or Retry)
11
6
Clock Synchronization with Shared
Memory
13
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
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)
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
20
10
CSMA/CD Principle (Push)
(Carrier Sense Multiple Access/Collision Detection)
21
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