0% found this document useful (0 votes)
63 views37 pages

Introduction To Embedded Systems: Branden Ghena

This document provides an introduction to embedded systems and networking. It discusses various physical layer technologies, network topologies, medium access controls, and network layers. It also covers different wired and wireless network standards and protocols.

Uploaded by

Imen Cho Imen
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)
63 views37 pages

Introduction To Embedded Systems: Branden Ghena

This document provides an introduction to embedded systems and networking. It discusses various physical layer technologies, network topologies, medium access controls, and network layers. It also covers different wired and wireless network standards and protocols.

Uploaded by

Imen Cho Imen
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/ 37

Introduction to

Embedded Systems

Branden Ghena
UC Berkeley
EECS 149/249A
Fall 2017

© 2008-2017: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia.


All rights reserved.

Chapter X: Networking
Networking and Communications

Goal of lecture
• Want you to be aware of communication options and
choices

Outline
• Communications model
• Wired networks
• Wireless networks

EECS 149/249A, UC Berkeley: 2


The Alphabet Soup

• 1588 • GSM • REST


• 6LoWPAN • HART • TDMA
• 802.15.4 • HTTP • TSMP
• 802.1(AS) • IoT • TSN
• 802.11 • IPv6 • TTEthernet
• AVB • LTE • TTP
• BLE • MAC • WAN
• CAN • PAN • WLAN
• CoAP • PTP • WPAN
• CSMA/CA • QoS
EECS 149/249A, UC Berkeley: 3
Communications Layers

EECS 149/249A, UC Berkeley: 4


Physical Layer Technologies

Specifies electrical characteristics


• Voltages
• Frequencies

Specifies how to map signals to data


• Example low voltage = 0 and high voltage = 1
• Example oscillation at a high frequency = 0, low = 1

Specifies network topology as well

EECS 149/249A, UC Berkeley: 5


Network Topology

• Busses
• Shared physical medium
• MAC protocol dominates

• Star networks
• Private medium
• MAC protocol is less important
• Routing protocols become important
• Buffers in routers

Is radio a bus?
EECS 149/249A, UC Berkeley: 6
Medium Access Controls

How do multiple devices share the


same transmission technology?

EECS 149/249A, UC Berkeley: 7


Medium Access Controls

How do multiple devices share the


same transmission technology?

• Don’t worry about it, let collisions happen


• Listen for others and don’t transmit if they are
• Coordinate with others and transmit at different times
• Transmit at different frequencies

EECS 149/249A, UC Berkeley: 8


MAC: Media Access Control Basis of
CSMA/CA vs. Time Slotted Ethernet
and WiFi

Carrier Sense Multiple Access / Collision Avoidance


• Listen for idle channel
• Send
• Wait for ack, retransmit if no ack after some timeout
Basis of TTA,
TTEthernet,
Time Division Multiple Access (TDMA) FlexRay/
• Wait your turn
• Send when it’s your turn
• Add various schemes to recover unused slots
• Maybe add slots for CSMA/CA
EECS 149/249A, UC Berkeley: 9
MAC: Media Access Control
FDMA

Frequency Division Multiple Access


• Protocol supports multiple “channels” each at a
different frequency
• Send on a specific channel to not conflict with others

There are many other methods of sharing as well

EECS 149/249A, UC Berkeley: 10


Network Layer

How do I get a message to the correct


device?

• How devices are named (addressed)?


• How are messages routed?

Example: IP

EECS 149/249A, UC Berkeley: 11


Issues with Routing

• Buffering Reliability
• Buffer overflow can cause packet drops.

• Routing tables Security


• To which port should the router send a packet?

• Priorities QoS
• Which packet queued for a port to send first?

EECS 149/249A, UC Berkeley: 12


Transport Layer Reliability

How do I reliably get messages between


two devices?

• What if the message is too big for one


packet?
• How do I know if the recipient got the
message?

Example: TCP and UDP

EECS 149/249A, UC Berkeley: 13


Higher Layers

How do we handle data?

Includes:
• maintaining connections across
computers
• deciding what messages to send
• data compression and encryption

EECS 149/249A, UC Berkeley: 14


WIRED NETWORKS

EECS 149/249A, UC Berkeley: 15


Wired Networks
• Ethernet
• CAN: Controller Area Network (Bosch, 1983)
• TTP: Time-Triggered Protocol (Vienna U. of Tech.)
• FlexRay (Automotive industry, deployed 2006…)
• TTEthernet (Time-triggered Ethernet)
• TSN (Time-sensitive networks)

Control over timing, guaranteed bandwidth, redundancy, and


fault tolerance, are all issues that loom large in embedded
systems.
Ethernet networks are acquiring high resolution clock
synchronization, which can make them more suitable.
EECS 149/249A, UC Berkeley: 16
I2C, UART, and SPI

Why aren’t these good enough for everything?

UART

I2C

SPI

EECS 149/249A, UC Berkeley: 17


I2C, UART, and SPI

Why aren’t these good enough for everything?

UART
• Slow. No shared bus.

I2C
• Slow. Master-initiated communication. Short distance.

SPI
• Master-initiated communication. Lots of pins.
EECS 149/249A, UC Berkeley: 18
Ethernet

• Shared network between peers


• Open contention for network CSMA/CD
• Detect collisions as they occur

• Problem: collisions slow down the network

Note: this is all original Ethernet design


EECS 149/249A, UC Berkeley: 19
Time-Slotted Networks:
Example: TTEthernet (marketed by TTTech)

Combines three traffic types over Ethernet:


• TT: Time triggered
• RC: Rate constrained
• BE: Best effort

EECS 149/249A, UC Berkeley: 20


TSN: Time-Sensitive Networks

Before 2012,
called AVB:
Audio-Video
Bridging.

Developed to
solve this
problem:

Broadcasting van.
Photo by Gael Mace,
licensed under creative
commons attribution 3.0
EECS 149/249A, UC Berkeley: 21
TSN: Time-Sensitive Networks (aka AVB)
(Priority-based routing over Ethernet with reservations)
Image by
Michael Johas
Teener,
licensed
under creative
commons
attribution
share-alike
3.0

Part of IEEE
802.1
(Ethernet)
family of
standards.

EECS 149/249A, UC Berkeley: 22


Application of TSN

Meyer Sound CAL


(Column Array Loudspeaker),
based on research at CNMAT
(UC Berkeley), using IEEE
1588 over Ethernet

23 UC Berkeley: 23
EECS 149/249A,
Enabler: Precision Time Protocols (PTP)
(IEEE 1588 and 802.1AS on Ethernet)
Press Release October 1, 2007
It is becoming
routine for physical
network interfaces
(PHY) to provide
hardware support for
PTPs.

With this first generation


PHY, clocks on a LAN
agree on the current time
of day to within 8ns, far
more precise than GPS
older techniques like NTP.

EECS 149/249A, UC Berkeley: 24


An Extreme Example:
The Large Hadron Collider
The WhiteRabbit project at CERN is synchronizing the clocks of computers
10 km apart to within about 80 psec using a combination of GPS, IEEE
1588 PTP and synchronous ethernet.

Lee, Berkeley 25 UC Berkeley: 25


EECS 149/249A,
PTP Example

The slave synchronizes to the master


1. Measure round-trip delay
1. Master sends a packet along with
time that packet was sent (𝑡1 )
2. Slave receives packet at (𝑡2 + 𝑒)
3. Slave sends response at (𝑡3 + 𝑒)
4. Master receives packet at 𝑡4
5. Master sends 𝑡4 to slave

RTT = (𝑡4 - 𝑡1 ) – ((𝑡3 + 𝑒) - (𝑡2 + 𝑒))

EECS 149/249A, UC Berkeley: 26


PTP Example

1. Assume symmetric delay


𝑅𝑇𝑇
One-way delay =
2

2. Estimate error
𝑅𝑇𝑇
𝑡2 = 𝑡1 +
2
𝑅𝑇𝑇
𝑒ǁ = 𝑡2 + 𝑒 − (𝑡1 + )
2

3. Adjust slave clock accordingly


4. Repeat periodically!

EECS 149/249A, UC Berkeley: 27


How PTP Synchronization works

EECS 149/249A, UC Berkeley: 28


WIRELESS NETWORKS

EECS 149/249A, UC Berkeley: 29


Wireless

• Personal Area Networks (PANs)


• Bluetooth, BLE
• Local Area Networks (LANs)
• WiFi (IEEE 802.11*)
• Zigbee, et al. (IEEE 802.15.4*)
• Wide Area Networks (WANs)
• GSM (for voice, some data)
• LTE and 5G (for audio, video)
• Sigfox, Lora, LTE-M (for Machine-to-Machine, M2M, IoT)

EECS 149/249A, UC Berkeley: 30


Radio Technologies

Source: Steve Dean, Texas Instruments


http://eecatalog.com/medical/2009/09/23/current-and-future-trends-in-medical-electronics/
EECS 149/249A, UC Berkeley: 31
Growing set of smart and connected devices
IEEE 802.15.4 (a.k.a. “ZigBee” stack)
⚫ Workhorse radio technology for sensornets
⚫ Widely adopted for low-power mesh protocols
⚫ Middle (6LoWPAN, RPL) and upper (CoAP layers)
⚫ Can last for years on a pair of AA batteries
⚫ 850 million chipset sales in 2016 expected

Bluetooth Low-Energy (BLE)


⚫ Short-range RF technology
⚫ On phones and peripherals
⚫ Can beacon for years on coin cells
⚫ 3 billion chipset sales in 2014

Near-Field Communications (NFC)


⚫ Asymmetric backscatter technology
⚫ Small (mobile) readers in smartphones
⚫ Large (stationary) readers in infrastructure
⚫ Ambient backscatter now emerging

Slide courtesy of Prabal Dutta EECS 149/249A, UC Berkeley: 32


IEEE 802.15.4

Physical and MAC layer standard for low-rate wireless


personal area networks (WPAN) for energy constrained
devices. Provides the basis for:
• Zigbee: Adds mesh network and encryption
• WirelessHART: Highway Addressable Remote
Transducer Protocol (HART)
• Integrates TSMP, Time Synchronized Mesh Protocol,
developed by Dust Networks.
• 6LoWPAN: IPv6 over low power WPAN

EECS 149/249A, UC Berkeley: 33


Network Topologies

Star
Mesh
Coordinator
End device
Router / End device
End devices capable of
routing and/or
coordinating are called
peer-to-peer devices.

Cluster Tree

EECS 149/249A, UC Berkeley: 34


Energy
Efficiency
Wireless HART uses
Time Synchronized
Mesh Protocol (TSMP)
in a Mote-on-Chip
(MoC), from Dust
Networks Inc.

IEEE 802.15.4e

EECS 149/249A, UC Berkeley: 35


WiFi

• WLAN: Wireless Local Area Network (~20 meters)


• Developed in the 1990s (AT&T plus others)
• Access points provide gateways to wired networks
• Operates in 2.4 and 5 GHz unlicensed bands

• Requires larger antennas and more energy than


Bluetooth or 802.15 networks.

EECS 149/249A, UC Berkeley: 36


Conclusion

The hot trend today is towards “smart sensors and


actuators” that are equipped with network interfaces
(wired or wireless) and are accessed via web
technologies (specifically HTTP) or wirelessly via
bluetooth.

But quality of service (QoS) is hard to control, so these


mechanisms are not always suitable.

EECS 149/249A, UC Berkeley: 37

You might also like