TI-RTOS Overview - Florida International University

Transcription

TI-RTOS overviewNick Lethaby, TI-RTOS and IoT EcosystemMay 20151

What is TI-RTOS?ConnectivityWi-Fi, Bluetooth Smart, ZigBee ,Cellular (via PPP),Wired TCP/IP,TLS/SSLOtherMiddlewareUSB, PlsReal-time KernelDriversIoT MCUSensors

TI-RTOS development tools TI-RTOS works with the TI Code Composer Studio (CCS), IAR, andGCC toolchains The RTOS Object Viewer enables developers to study the state of OSobjects such as tasks, stacks, and semaphores– Available for CCS and IAR The RTOS Analyzer enables developers to look at execution historyincluding context switching and per-task CPU load– Available for CCS

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-functionapplications– Using multiple priorities and threads to integrate different functions– Add new features without modifying real-time response

TI-RTOS kernel, drivers, & power managerConnectivityWi-Fi, Bluetooth Smart,ZigBee, Cellular (viaPPP), Wired TCP/IP,TLS/SSLOtherMiddlewareUSB, PlsReal-time KernelDriversIoT MCUSensors

TI-RTOS kernel Designed for real-time applications– Scheduler is deterministic so kernel system calls completeoperation in a predictable time– Interrupt latency is low– “Zero-latency Interrupts” enable kernel to be used in hard realtime applications Low footprint to meet MCU memory constraints– Kernel is highly configurable so unneeded functions areexcluded– Static configuration enables very low footprints by eliminatingneed for heaps or create/delete calls if desired Tick suppression for enhanced low-power performance

Kernel servicesIPC Services:Events, Mailboxes,Semaphores, GatesDebug &Analysis:Logging,diagnostics,Hooks, stackcheckingDevice-specificservices: Interrupt andpower management,timers, exceptionhandlingMemoryManagers:Heap, fixedsized buffersThreading Services:Tasks, Software Interrupts,Clocks, Idle

An integrated approach to power managementDrivers & stacks: Request peripheral clocks andpower domains be enabled Set power-down constraints incritical sectionsClock module: Provide nextscheduledeventPower policy: Run in idletask Select powersaving modePower manager: Manage clock gates & power domains Power-down and wake-up routines Power-down and wake-up latencies Record power-down constraints

Impact of TI-RTOS power manager TI MCU offers low power modes that consume exponentially less powercompared to simply sleeping the main Cortex-M core (WaitForInterrupt)– The default power policy uses the latency data combined with its knowledgeof the next scheduled event to select the lowest possible power state, thusgreatly extending battery life– Note: The data below is from the SimpleLink CC2640 wireless MCUPower ModeWake-up Timeto CPU ActiveCurrent UsedActiveNA4.145 mAWaitForInterruptA few cycles1.4 µs14 µs2.028 mA796 µA1-2 µAIDLESTANDBY

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 anotherthread to run Each supported board has a “board.c” file that contains the code forinitializing all the peripherals Drivers are “power-aware” for ultra low-power MCU devices10

TI-RTOS device driversC28C28 M3TM4CMSP432YYYYYYYYReal-time clockTimerUARTYDMA-based YYY

TI-RTOS connectivity & middlewareConnectivityWi-Fi, Bluetooth Smart, ZigBee ,Cellular (via PPP),Wired TCP/IP,TLS/SSLOtherMiddlewareUSB, PlsReal-time KernelDriversIoT MCUSensors

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 CC3100wireless network processor out-of-boxDeviceWireless StackCommentsCC3200Wi-FiCC3200 Wi-Fi host driver pre-tested onTI-RTOSCC2630ZigBeeStack runs by default on TI-RTOSCC2640Bluetooth SmartStack runs by default on TI-RTOSMCU CC3100Wi-FiTI-RTOS offers pre-integrated CC3100host drivers using SPIs on MSP430,MSP432 and TM4Cx

TI-RTOS TCP/IP stackTLSSNTPHTTPTELNETTFTPDHCPDNSStandard BSD Sockets /IP Key FeaturesSupports both IPv4 and IPv6Standard BSD Sockets interfaceZero-copy sockets interface availableIPPPPARPSerial IFEthernet IFHardware Adaptation LayerEthernet rLEDDriverHighly configurable to meet footprintconstraintsPPP/Serial Interface allows use withthird-party cellular modemsSSL/TLS requires a licensing fee

USB stackMSCHIDCDCHIDClass DriverApplicationHostDeviceHardware Adaptation LayerSD card, mouse,UART, .DriversHardwareDMA USBDriver DriverCONFIGURATIONUSB Key FeaturesMSC Host Class DriverHID Host & Device Class DriversCDC Device Class DriverExamples for each class driverExample of using MSC Host Driverunder FAT file system

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)

Summary TI-RTOS enables developers to focus on theirspecific areas of applications expertise by providingpre-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 simplifiesdevelopment and maintenance of embeddedapplications TI-RTOS no-cost licensing removes commercialbarriers to deployment

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://softwaredl.ti.com/dsps/dsps public sw/sdo sb/targetcontent/tirtos/index.htmlProduct manager: Nick Lethaby (nlethaby@ti.com)

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