seamless integration of communication protocols · small footprint ipv4 only ipv4 and ipv6 module...
TRANSCRIPT
© 2016 Renesas Electronics Corporation. All rights reserved.
SEAMLESS INTEGRATION OF COMMUNICATION PROTOCOLS
Renesas Synergy Engineering ConferenceLake Garda7-8 April 2016
© 2016 Renesas Electronics Corporation. All rights reserved. Page 2
Agenda
Overview of Synergy Software Package (SSP)
Focus on complex communication protocols
Networking with Netx Duo
Connectivity with USBx
SSP Framework
Renesas Synergy™ Configuration Tool
Summary
© 2016 Renesas Electronics Corporation. All rights reserved. Page 3
Renesas Synergy™ Software Package – Block Diagram
Synergy Software Package (SSP)
Board Support Package (BSP)
ThreadX®
RTOS
Memory Management
Message Queue
Inter-process and Inter-thread
Communication
Advanced Scheduler
FileX®
Very Fast Performance and
Low Footprint
Complete Flash Management
FAT12/16/32, exFAT, SD,
microSD, CF, and MemoryStick
USBX™
Host Stack
Host Controller
Device Stack
Device Controller
Host Classes(Storage, CDC,
HID, Hub)
Device Classes(Storage, CDC,
Audio, HID, Printer)
GUIX™
GUIX Studio
Run Time Library
Canvas
Drawing
Screen
System
Widget
Window
NetX™ and NetX™ DuoFTP
TFTP
Telnet
PPP
SMTP
POP3
HTTP
DNS
SNTP
NAT
TCP
IPv4/v6
UDP
ICMP
IGMP
ARP
RARPDHCP
Functional Libraries
CMSIS DSP
Security & Encryption
Hardware Abstraction Layer (HAL) Drivers
CAN
UART
SDHI
QSPI
SPI
IIC
SSI
RTC
Ethernet MAC Controller
Data Transfer Controller
DMA Controller
Clock Management
Graphics LCD Controller
2D Drawing Engine
Segment LCD Controller
And more…
ADC12
ADC14
DAC12
Safety
USBHS
USBFS Timing & Control
Security & Encryption
Application Framework
Audio
Console
JPEG
SPI
I2C
UART
Touch Panel
External IRQ
Thread Monitor
Power Profile
Messaging
Cap Touch Sensing
ADC
2D Drawing Engine
© 2016 Renesas Electronics Corporation. All rights reserved.
Networking with Netx Duo
Page 4
© 2016 Renesas Electronics Corporation. All rights reserved. Page 5
NetX Contents
NetX Core Stack
Internet Protocol (IP)
Address Resolution Protocol (ARP)
Reverse Address Resolution Protocol (RARP)
Internet Control Message Protocol (ICMP)
Internet Group Management Protocol (IGMP)
User Datagram Protocol (UDP)
Transmission Control Protocol (TCP)
NetX Applications
Dynamic Host Configuration Protocol (DHCP)
Point-To-Point Protocol (PPP)
Domain Name Server (DNS)
mDNS and DNS-SD
File Transfer Protocol (FTP)
Trivial File Transfer Protocol (TFTP)
Terminal Emulation (Telnet)
BSD Sockets Interface Layer
Hypertext transfer Protocol Server (HTTP)
Simple Network Management Protocol (SNMP)
Simple Mail Transport Protocol (SMTP)
Post Office Protocol-3 (POP3)
Simple Network Time Protocol (SNTP)
AutoIP
© 2016 Renesas Electronics Corporation. All rights reserved. Page 6
NetX Duo Additional Components
NetX Duo includes the following protocols
All IPv4 features available in NetX 5.x
IPv6 header and extension header processing
IPsec with IKEv2
Neighbor Discovery Protocol
Router Discovery Protocol
Stateless Address Autoconfiguration
Duplicate Address Detection
IPv4 Network Address Translation (NAT)
IPv6 Ready Logo Certified!
© 2016 Renesas Electronics Corporation. All rights reserved. Page 7
Modular Design
© 2016 Renesas Electronics Corporation. All rights reserved. Page 8
NetX Technology
PiconetTM Architecture
Zero-Copy API
Flexible Packet Pool Management
UDP Fast Path TechnologyTM
Dynamic Creation
Optimized for use with ThreadX RTOS
Modular Design
Small footprint
© 2016 Renesas Electronics Corporation. All rights reserved. Page 9
Small Footprint
IPv4 only IPv4 and IPv6
Module ROM Size (bytes)
RAM Size (bytes)
IP 3996 140
Packet 1040 8
ARP 2050 0
ICMP 1046 0
TCP 11920 12
UDP 2220 0
Total 22272 160
Module ROM Size (bytes)
RAM Size (bytes)
IP 5860 140
Packet 1058 8
ARP 2050 0
ICMP 5122 11600
TCP 12750 12
UDP 2392 0
Total 29232 11760
Code Size is measured using GCC for Synergy.
© 2016 Renesas Electronics Corporation. All rights reserved. Page 10
Small Footprint
An IoT application uses CoAP (UDP-only) requires only 9.3K bytes of NetX Duo code.
Module ROM Size (bytes)
RAM Size (bytes)
IP 3996 140
Packet 1040 8
ARP 2050 0
UDP 2220 0
Total 9306 148
© 2016 Renesas Electronics Corporation. All rights reserved.
Connectivity with USBx
Page 11
© 2016 Renesas Electronics Corporation. All rights reserved. Page 12
USBX
USBX is Express Logic’s Universal Serial Bus (USB) protocol stack
USBX includes Host, Device, and OTG support
USBX is provided in full source code, is small and fast
© 2016 Renesas Electronics Corporation. All rights reserved. Page 13
USBX Features
Available for host, device and a combination of both
USB low speed, full speed and high speed
Supports all embedded CPUs
Supports many USB host/device and OTG controllers in discrete or IP form integrated with a SOC
OHCI, EHCI, or proprietary like Renesas
Supports most of the standard USB classes drivers
Integrated with Express Logic’s ThreadX, FileX and NetX
Mass Storage, CDC/ECM, RNDIS
© 2016 Renesas Electronics Corporation. All rights reserved. Page 14
USB Host Stack Memory Footprint
Host Class Code Size Data Size Host Class Code Size Data Size
ASIX 320 4KB PIMA 896 8KB
AUDIO 1188 4KB Printer 832 2KB
CDC/ACM 1426 4KB Prolific 1432 4KB
GSER 556 4KB Storage 3510 4KB
HID 3694 8KB-16KB SWAR 526 4KB
HUB 1638 2KB
USBX Host Stack (bytes)
Core System 8500
Controller 7248
RAM Required * 25KB – 128KB
* The standard USBx stack. Is being optimized to allow lower footprint options on Synergy, pls refer to the SSP Datasheets for actual numbers
© 2016 Renesas Electronics Corporation. All rights reserved. Page 15
USB Device Stack Memory Footprint
* The standard USBx stack. Is being optimized to allow lower footprint options on Synergy, pls refer to the SSP Datasheets for actual numbers
Device Class Code Size Data Size Device Class Code Size Data Size
CDC/ACM 716B 2KB PIMA(w/MTP) 5K 8KB
CDC/ECM 716B 2KB RNDIS 2K 4KB-8KB
DFU 1018B 2KB Storage 2K 4KB
HID 900B 2KB
USBX Device Stack
Core System 4.6K
Controller 4.6K
RAM Required * 16KB-64KB
© 2016 Renesas Electronics Corporation. All rights reserved. Page 16
SSP Framework
© 2016 Renesas Electronics Corporation. All rights reserved. Page 17
Background: SSP Modules
Basic building block of SSP
All modules provide an interface
Interface is a contract with the user
that defines functionality and API
Some modules require an interface
Examples of modules:
Driver code for peripheral
Messaging framework
Express Logic NetX™
Express Logic Telnet Application Layer
Module
Provides
Requires
© 2016 Renesas Electronics Corporation. All rights reserved. Page 18
SSP Framework Modules
SSP Framework modules are higher level software components
Tied to interfaces rather than specific peripheral
May use more than one interface
Often integrated with ThreadX® RTOS (drivers never are)
Source code is encrypted, but can be viewed in e2 studio
Framework
Driver
BSP
X-Ware
© 2016 Renesas Electronics Corporation. All rights reserved. Page 19
Framework Example: Communications (UART)
Standard communications interface including APIs to
open, close, read, write, etc.
Can be implemented by an RTOS integrated UART
framework
UART framework uses SCI Synergy peripheral
Application
SF_UART_COMMS
R_SCI_UART
BSP
Requires: sf_comms
Provides: sf_comms
Requires: uart
Provides: uart
© 2016 Renesas Electronics Corporation. All rights reserved.
Provides: ux_device_class_cdc_acm
Page 20
Framework Example: Communications (USB)
Uses the same standard comms interface (open,
close, read, write, etc.)
Application code does not change
Uses USBX™ CDC ACM device class
CDC ACM is a USB device class used to emulate
a serial port
Application
SF_EL_UX_COMMS
UX_DEVICE_CLASS_CDC_ACM
BSP
Requires: sf_comms
Provides: sf_comms
Requires: ux_device_class_cdc_acm
UX
Provides: ux
Requires: sf_el_ux
Requires: ux
SF_EL_UX
Provides: sf_el_ux
© 2016 Renesas Electronics Corporation. All rights reserved.
Provides: nx_telnet_server
Page 21
Framework Example: Communications (Telnet)
Uses the same standard comms interface (open,
close, read, write, etc.)
Application code does not change
Uses NetX™ Telnet server
Telnet is a session layer protocol used to emulate
a terminal
Application
SF_EL_NX_COMMS
NX_TELNET_SERVER
BSP
Requires: sf_comms
Provides: sf_comms
Requires: nx_telnet_server
NX
Provides: nx
Requires: sf_el_nx
Requires: nx
SF_EL_NX
Provides: sf_el_nx
© 2016 Renesas Electronics Corporation. All rights reserved. Page 22
Renesas Synergy™ Configuration Tool
© 2016 Renesas Electronics Corporation. All rights reserved. Page 23
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
© 2016 Renesas Electronics Corporation. All rights reserved. Page 24
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
Dependency requirements marked with red X
Hover feature shows what dependencies aren’t met
© 2016 Renesas Electronics Corporation. All rights reserved. Page 25
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
Dependency requirements marked with red X
Hover feature shows what dependencies aren’t met
Dependencies met using interface and instance name
© 2016 Renesas Electronics Corporation. All rights reserved. Page 26
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
Dependency requirements marked with red X
Hover feature shows what dependencies aren’t met
Dependencies met using interface and instance name
© 2016 Renesas Electronics Corporation. All rights reserved. Page 27
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
Dependency requirements marked with red X
Hover feature shows what dependencies aren’t met
Dependencies met using interface and instance name
© 2016 Renesas Electronics Corporation. All rights reserved. Page 28
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
Dependency requirements marked with red X
Hover feature shows what dependencies aren’t met
Dependencies met using interface and instance name
Some dependencies met using Properties tab
© 2016 Renesas Electronics Corporation. All rights reserved. Page 29
Building Stacks in e2 studio
Select module from “New” dropdown list on Threads tab
Dependency requirements marked with red X
Hover feature shows what dependencies aren’t met
Dependencies met using interface and instance name
Some dependencies met using Properties tab
No red X = stack complete
© 2016 Renesas Electronics Corporation. All rights reserved. Page 30
General Usage of SSP
Select Interface and Instance from dropdown list
e2 studio guides you and makes configuration easy
Allocate control and configuration structures
e2 studio generates all of these these based on your configuration
Access API functions through API pointer in Instance structure
e2 studio creates a convenient named Instance pointer
err = my_comms.p_api->write(my_comms.p_ctrl,
&buffer, buffer_size,
TX_NO_WAIT);
© 2016 Renesas Electronics Corporation. All rights reserved. Page 31
Summary
The SSP includes high quality, integrated, tested and production ready software stacks and
modules
SSP framework provides additional well integrated, high level software components
Adding them to your application is easy
Use the E2Studio Synergy configuration tool
Can have a working communications interface within minutes, not days
Still have the flexibility to use the modules (X-Ware, HAL) directly, without going through the
software frameworks, if desired
© 2016 Renesas Electronics Corporation. All rights reserved. Page 32
THANK YOU FOR YOUR ATTENTION
PLEASE REMEMBER TO COMPLETE THE FEEDBACK
SURVEY IN YOUR SMARTPHONE APP