View
918
Download
1
Category
Preview:
Citation preview
The information in this presentation is public. | Copyright © 2016
MBED TUTORIAL
Edinburgh - May 2016
Hannes Tschofenig - ARM Limited
Enabled by the mbed ecosystem
BBC MICRO:BIT
Programmable IoT
device given free to
every 12year old
child in the UKShipping in February
2016
MBED SMART CITY REFERENCE DESIGN: SUB-
GHZ 6LOWPAN
Sub-Ghz technology for robust long-range communications• Significant penetration on materials
• Long range distance communications
6LoWPAN enables native IP-
based connectivity thru backhaul
networks
Appmbed
Device Connector
6LoWPAN
nodes
ISPAccess Point
IPv4IPv6IPv4
Tunnel
Broker
IPv4IPv6
AYIYA Tunnel
Raspberry Pi
IPv6
6LoWPAN
Border Router
MBED WEARABLE REFERENCE DESIGN ON
MBED.COM
Ultra Energy
Efficient Products
Build differentiated
products quickly
Tools for
successful
ecosystem
Components and
code needed to
bootstrap
Tested to deliver
8-week long battery
life.
Ready development
tools from mbed
partners
CONNECTIVITY
To use the Web and the Internet to the best possible extend IoT devices need to support IP.
Modern 32-bit MCUs easily handle IP stacks (and Internet security as well)
Non-standard approaches are a risk• Particularly when it comes to rolling out
your own, custom security mechanism.
Information Models
IPv4 | IPv6
UDP | TCP
DTLS | TLS
CoAP | HTTP
REST APIs
IoT Application Device Management
Hardware Interfaces
uVisor
Drivers
Networking
mbed OS API
mbed TLS
mbed Client
IP Stack BLE API
Device DriversCMSIS-Core
Application Code Libraries
uVisor
Debug Support
Software UpdateSecure Drivers
ARMv6-MARMv7-M
ARM Cortex-M CPU
MCU
Radio
SensorCrypto
SW Crypto
ThreadWiFi BLE6LoWPAN
Thread API
CommunicationSecurity
LifecycleSecurity
DeviceSecurity
SECURITY
UDP TCP
CoAP HTTP
IOT DEVICES?
Limited RAM
Limited Flash memory size
Computational capabilities
Energy efficiency
User interface limitations
Low bit rate
High loss rate
Small frame sizes/MTU
sizes
Limited reachability
See also RFC 7228 “Terminology for Constrained-Node Networks”
Constrained Node Constrained Networks
CORTEX-M PROCESSORS
Lowest costLow power
Example: Touchscreen
Controller
Lowest powerOutstanding energy efficiency
Example: Sensor node
Bluetooth Smart
Performance & efficiencyFeature rich connectivity
Example: Weables,
Activity trackers, Wifi receiver
Digital Signal Control (DSC)/
Processor with DSP
Accelerated SIMD
Floating point (FP)Example: Sensor fusion,
motor control
Processors use the 32-bit RISC architecture
http://www.arm.com/products/processors/cortex-m/index.php
Maximum Performance
Flexible Memory Cache
Single & Double Precision FPExamples: Automotive,
High-end audio set
EXAMPLE: STM32F215RET6
32bit CORTEX M3 with120 Mhz
Flash: 512 KB
RAM: 128KB
Features: • Interfaces: CAN, I2C, SPI, UART, USART, USB, Ethernet
• Camera interface
• Random number generator, hardware accelleration (AES-128, AES-192, AES-256, Triple DES, MD5, SHA1, HMAC)
• Real-Time Clock
• A/D & D/A Converters
• Temperature sensor
• Serial wire JTAG debug port
Datasheet can be found here.
Farnell
Volume Price
1 - 9 € 16,49
10 - 99 € 13,61
100 - 249 € 10,15
250 - 499 € 8,99
500 - 999 € 8,09
1000 - 1999 € 7,35
2000+ € 6,62
*: Prices from March 2015
EXAMPLE: STM32F415ZGT6
32bit CORTEX M4 with168 Mhz
Flash: 1MB
RAM: 192KB
Features: • Interfaces: CAN, I2C, SPI, UART, USART, USB, Ethernet
• Camera interface
• Random number generator, hardware accelleration (AES-128, AES-192, AES-256, Triple DES, MD5, SHA1, HMAC)
• Real-Time Clock
• A/D & D/A Converters
• Temperature sensor
• Serial wire JTAG debug port
Datasheet can be found here and here.
Farnell
Volume Price
1 - 9 € 12,40
10 - 99 € 11,36
100 - 249 € 10,14
250 - 499 € 9,33
500 - 999 € 8,59
1000 - 1999 € 7,90
2000+ € 6,75
*: Prices from March 2015
EXAMPLE: STM32L063C8T6
32bit CORTEX M0+
with max 32 Mhz
Flash: 64 KB
RAM: 8 KB
Datasheet can be found here.
Mouser*
Volume Price
1000 € 2,25
2500 € 2,14
5000 € 2,06
*: Prices from March 2015
COST
Reducing total system cost by enabling better system tradeoffs
We care about this.
… if it results in savings here …
(e.g. sophisticated power management)
But it can make sense to spend more here …
(e.g., on flash/RAM, CPU, BOM)
= + +
Total Cost Hardware Cost Energy Cost Development Cost(amortized, inc. deployment cost)
… and here.
(e.g. firmware
update,
manageability)More detailed treatment of this topic in a webinar by Peter Aldworth about
“How to Select Hardware for Volume IoT Deployments?”
ARM Cortex-M Architecture
mbed OS mbed Device Connector mbed Cloud Partnership
mbed Silicon Partnership mbed Enabled
Collaboration and contributions
from over 55 partners
Over 100 boards available
for developers to get started
MBED DEVICE CONNECTOR:
MAKING IOT SCALE
• mbed Device Connector eases development, management and scaling of IoT
• Available at connector.mbed.com. Easy transition to commercial service
providers
Build IoT
Device Connect your devices
Build application
with example
code
Utilize cloud
solutions
MBED DEVICE CONNECTOR
• Free for development purposes
• 100 devices, 10,000 events per hour
• Caching and subscription aggregation
• Strong end-to-end trust and security
• Based on industry standard protocols for
energy-efficient data communication
• REST APIs for easy integration with
existing systems
• Full integration with and web tools on
mbed.com
Device Connector
Support
Protocol Implementations: LWM2M, CoAP,
HTTP
Channel Security Implementations: TLS, DTLS
Client Library Port
mbed OS or RTOS/Linux +
Networking
mbed Client C++ API
Application and Service Integration
MBED CLIENT
Connects to mbed Device Connector and mbed Enabled Services
Included as part of mbed OS, also portable to other platforms including Linux and third party RTOS
Implements protocols and support for securely publishing resources (e.g. sensor data), and managing the device from the cloud
• mbed TLS makes it easy for developers to include cryptographic and
TLS/DTLS capabilities in their embedded products, with a minimal code
footprint.
• mbed TLS makes it easy to disable any feature during compilation thus
reducing the footprint to only those features absolutely needed.
• Small footprint and API’s with full documentation available
• Open Source under Apache 2.0 license at https://tls.mbed.org/
• Suitable for use on Cortex-M and Cortex-A targets
MBED TLS
GETTING STARTED
• Entry Point: https://www.mbed.com
• Getting started guide:
https://docs.mbed.com/docs/getting-started-mbed-os/en/latest/
• Running your first program (blinky):
https://docs.mbed.com/docs/getting-started-mbed-
os/en/latest/FirstProjectmbedOS/
• Mbed Client Example:
https://github.com/ARMmbed/mbed-client-quickstart
• ARM mbed Developer site (with mbed Classic Online IDE):
https://developer.mbed.org/
DEVELOPMENT
BOARDS
• Freescale – K64F http://developer.mbed.org/platforms/
FRDM-K64F/
ARM Cortex-M4 (120MHz)
1MB FLASH, 256KB RAM
• Other supported boards: Mbed Classic:
https://developer.mbed.org/platforms
Mbed OS: https://www.mbed.com/en/development/hardware/boards/
Recommended