18
TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

Embed Size (px)

Citation preview

Page 1: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

1

TI-RTOS overviewNick Lethaby, TI-RTOS and IoT Ecosystem

May 2015

Page 2: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

What is TI-RTOS?

Real-time Kernel

IoT MCU

Drivers

ConnectivityWi-Fi, Bluetooth®

Smart, ZigBee®, Cellular (via PPP), Wired TCP/IP,

TLS/SSL

Other Middleware

USB, File Systems

User Application

Tasks

Power Manager

Sensors

TI-RTOS

APls

Page 3: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

TI-RTOS development tools

• TI-RTOS works with the TI Code Composer Studio (CCS), IAR, and GCC toolchains

• The RTOS Object Viewer enables developers to study the state of OS objects such as tasks, stacks, and semaphores– Available for CCS and IAR

• The RTOS Analyzer enables developers to look at execution history including context switching and per-task CPU load– Available for CCS

Page 4: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

How TI-RTOS helps developers

• Provides pre-tested embedded software modules– Connectivity protocols, power management, real-time kernel, …– Eliminates need for these to be developed from scratch– Enables developers to focus on their areas of application expertise

• No licensing hassles to use– Completely free to use and deploy

• Reduced effort to port existing applications to new devices – RTOS isolates application from hardware specifics

• Simpler development and maintenance of multi-function applications– Using multiple priorities and threads to integrate different functions– Add new features without modifying real-time response

Page 5: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

TI-RTOS kernel, drivers, & power manager

Real-time Kernel

IoT MCU

Drivers

ConnectivityWi-Fi, Bluetooth Smart,

ZigBee, Cellular (via PPP), Wired TCP/IP,

TLS/SSL

Other Middleware

USB, File Systems

User Application

Tasks

Power Manager

Sensors

TI-RTOS

APls

Page 6: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

TI-RTOS kernel

• Designed for real-time applications– Scheduler is deterministic so kernel system calls complete

operation in a predictable time– Interrupt latency is low– “Zero-latency Interrupts” enable kernel to be used in hard real-

time applications

• Low footprint to meet MCU memory constraints– Kernel is highly configurable so unneeded functions are

excluded– Static configuration enables very low footprints by eliminating

need for heaps or create/delete calls if desired

• Tick suppression for enhanced low-power performance

Page 7: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

Kernel services

IPC Services:Events, Mailboxes, Semaphores, Gates

Threading Services:Tasks, Software Interrupts,

Clocks, Idle

Debug & Analysis:Logging,

diagnostics,Hooks, stack

checkingMemory

Managers:Heap, fixed-sized buffers

Device-specific services: Interrupt and

power management, timers, exception

handling

Page 8: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

An integrated approach to power management

Clock module:• Provide next

scheduled event

Drivers & stacks:• Request peripheral clocks and

power domains be enabled• Set power-down constraints in

critical sections

Power manager:• Manage clock gates & power domains• Power-down and wake-up routines• Power-down and wake-up latencies• Record power-down constraints

Power policy:• Run in idle

task• Select power

saving mode

Page 9: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

Impact of TI-RTOS power manager

Power Mode Wake-up Time to CPU Active

Current Used

Active NA 4.145 mA

WaitForInterrupt A few cycles 2.028 mA

IDLE 1.4 µs 796 µA

STANDBY 14 µs 1-2 µA

• TI MCU offers low power modes that consume exponentially less power compared to simply sleeping the main Cortex-M core (WaitForInterrupt)– The default power policy uses the latency data combined with its knowledge

of the next scheduled event to select the lowest possible power state, thus greatly extending battery life

– Note: The data below is from the SimpleLink™ CC2640 wireless MCU

Page 10: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

10

TI-RTOS device drivers & board support

• Driver APIs are consistent across device families – Makes applications easy to port to other device supported by TI-RTOS

• Drivers are designed for use with RTOS– Thread-safe– Block (on a semaphore) when waiting for I/O so CPU is released for another

thread to run

• Each supported board has a “board.c” file that contains the code for initializing all the peripherals

• Drivers are “power-aware” for ultra low-power MCU devices

Page 11: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

C28 C28+M3 TM4C MSP432 MSP430 CC3200 CC26xx

Real-time clock Y Y Y Y

Timer Y Y Y Y Y Y Y

UART Y Y Y Y Y Y

DMA-based UART Y Y

I2C Y Y Y Y Y Y

I2S Y

SPI Y Y Y Y Y Y

SPI-SD Y Y Y Y Y

PWM Y Y Y

Camera Y

EMAC Y Y

USB Y Y Y

Watchdog Y Y Y Y Y

TI-RTOS device drivers

Page 12: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

TI-RTOS connectivity & middleware

Real-time Kernel

IoT MCU

Drivers

ConnectivityWi-Fi, Bluetooth®

Smart, ZigBee®, Cellular (via PPP), Wired TCP/IP,

TLS/SSL

Other Middleware

USB, File Systems

User Application

Tasks

Power Manager

Sensors

TI-RTOS

APls

Page 13: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

TI-RTOS: wireless connectivity

• TI-RTOS supports all on-chips stacks in TI SimpleLink™ wireless MCUs out-of-box

• TI-RTOS supports the SimpleLink™ Wi-Fi CC3100 wireless network processor out-of-box

Device Wireless Stack Comments

CC3200 Wi-Fi CC3200 Wi-Fi host driver pre-tested on TI-RTOS

CC2630 ZigBee Stack runs by default on TI-RTOS

CC2640 Bluetooth Smart Stack runs by default on TI-RTOS

MCU + CC3100

Wi-Fi TI-RTOS offers pre-integrated CC3100 host drivers using SPIs on MSP430, MSP432 and TM4Cx

Page 14: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

Hardware

EthernetPacketDriver

SerialPort

Driver

TimerDriver

UserLED

Driver

Hardware Adaptation Layer

Serial IF

PPP

TI-RTOS TCP/IP stack

Supports both IPv4 and IPv6

Standard BSD Sockets interface

Zero-copy sockets interface available

Highly configurable to meet footprint constraints

PPP/Serial Interface allows use with third-party cellular modems

SSL/TLS requires a licensing fee

TCP/IP Key Features

NAT

IFManager

RouteManager

Ethernet IF

ARP

IP

TCP UDP ICMP IGMP

Standard BSD Sockets Interface

TLS

SNTP

HTTP

TFTP

TELNET

DNS

DHCP

Page 15: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

USB stack

Hardware

SD card, mouse, UART, ….Drivers

DMADriver

USBDriver

Hardware Adaptation Layer

Class DriverApplication

MSC Host Class Driver

HID Host & Device Class Drivers

CDC Device Class Driver

Examples for each class driver

Example of using MSC Host Driver under FAT file system

USB Key Features

Host

MSC

HID

Device

CDC

HID

CONFIGURATION

Page 16: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

File system

• TI uses an open source software called FatFs

• Key features:– Both native and C RTS file APIs may be used

• C RTS APIs (fopen (), fread (), fwrite (), …) are plugged into file system– Supports FAT12, FAT16, FAT32, and VFAT

• Long file names (VFAT) are not supported in the default build• TI does NOT indemnify against VFAT patents

• Drivers options:– SD Card (via SPI driver)– USB flash drive (via USB MSC host)

Page 17: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

Summary

• TI-RTOS enables developers to focus on their specific areas of applications expertise by providing pre-tested software building blocks:– Multitasking kernel and device drivers– Connectivity solutions: TCP/IP, Wi-Fi, BLE, and USB– Advanced, easy-to-use power management

• Preemptive multitasking design paradigm simplifies development and maintenance of embedded applications

• TI-RTOS no-cost licensing removes commercial barriers to deployment

Page 18: TI-RTOS overview Nick Lethaby, TI-RTOS and IoT Ecosystem May 2015 1

For more information

• www.ti.com web page: www.ti.com/tool/ti-rtos– Product brochure, white paper, manuals, software downloads

• e2e forum: http://e2e.ti.com/support/embedded/tirtos/

• Wiki: http://processors.wiki.ti.com/index.php/Main_Page– Select ‘TI-RTOS’ category

• Download page:– http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/ind

ex.html

Product manager: Nick Lethaby ([email protected])