Presentation is loading. Please wait.

Presentation is loading. Please wait.

MSP432™ MCU RTOS Solutions

Similar presentations


Presentation on theme: "MSP432™ MCU RTOS Solutions"— Presentation transcript:

1 MSP432™ MCU RTOS Solutions

2 MSP432 RTOS RTOS Options TI-RTOS freeRTOS RTX (CMSIS-RTOS) Micrium OS
Middleware File Systems Connectivity Wi-Fi User Application Tasks TI-RTOS freeRTOS RTX (CMSIS-RTOS) Micrium OS Power Manager Real-time Kernel Drivers MCU Sensors Welcome. In this video we will discuss various Real Time Operating Systems or RTOS that can be used when creating applications for MSP432. The four RTOS products that fully support the MSP432 today are TI-RTOS, freeRTOS, ARM RTX and Micrium OS. RTOS products provide applications with various levels of services. Many RTOS solutions provide much more than just a real time kernel.

3 “RTOS Core” standard offering from all RTOSes
MSP432 RTOS Middleware File Systems Connectivity Wi-Fi User Application Tasks Broad Middleware offering from TI-RTOS & CMSIS Unique to TI-RTOS: Simplify power management for MCU Power Manager Real-time Kernel Broad offering from TI-RTOS Drivers Drivers MCU Sensors “RTOS Core” standard offering from all RTOSes The Real time kernel is provide by all four RTOS solutions. TI-RTOS include drivers for various peripherals on the MSP432. More details on the drivers in a bit. Unique to TI-RTOS is also the Power Manager which greatly simplifies power management by abstracting all device specific configuration needed to enter low power modes on the MSP432. Middleware such as File system APIs is provided by TI-RTOS and ARM CMSIS.

4 RTOS Features Comparison
Scheduler Type CMSIS comp-liant Services Interrupt Latency Device Specific Support Device Drivers Flash Size Low Power Support TI-RTOS By TI Pre-emptive X Tasks Swis Hwis Software Timers Semaphores Mutex Mailbox Events Zero-latency interrupts supported (115 cycles for ISRs with TI-RTOS calls) Systick Interrupts Exception Handling SPI SPI-SD I2C UART Timer RTC Timestamp Watchdog 4K to 10K Tick Suppression, Device specific Power Manager ARM RTX By Keil Round-robin (default) Cooperative SWIs Zero-latency interrupts supported <4K Device specific support coming soon FreeRTOS By Real Time Engineers Ltd Co-routines (task share stack) Direct TASK notifications Semaphore 5K to 10K Pre and post sleep macros for customization, Idle task hook. Micrium OS By Micrium Unknown 5K to 24K Idle Task Hook Tick suppression coming soon Here is a table comparing the various features of the four RTOS products that support MSP432. Various scheduler configurations are supported. As seen in the table per-emptive, co-operative or round-robin are supported by one or more RTOS products. Pre-emptive - each task has a different priority and will run until a higher priority task is ready to run. Round-Robin - each task will run for a fixed period of CPU run-time (time slice). Co-operative - each task will run until it is told to pass control to another task or reaches a blocking OS call. Being CMSIS-compliant will help integrate into other middleware provide by ARM. ARM RTX is compliant. All four RTOS provide a rich list of services including the familiar Tasks, Semaphores and Software Timers. All four support zero latency interrupts when RTOS services are not required within the interrupt. Approximate size benchmarks are provided for the four RTOS. Since low-power is key for all MSP432 applications, various features related to low power support are listed. Tick suppression is supported by most as allows the system tick to get turned off when no tasks require it. This allows the CPU to sleep for longer periods of time without being woken up by the RTOS tick. Most RTOS also provide hooks for applications to use device specific code to enter low power modes. TI-RTOS is the only one that supports a full-featured Power Manager that is specific to the MSP432.

5 RTOS Tools Comparison Object Viewer Execution Graph Logging RTOS Config Tool Signal Plots Compiler support Examples License Certified Cost TI-RTOS By TI (GUI composer) CCS IAR GCC > 50 BSD Free ARM RTX By Keil X Keil Cosmic 2 FreeRTOS By Real Time Engineers Ltd 3rd party Standalone Tasking 1 Modified GPL SafeRTOS Micrium OS By Micrium Micrium SIL3/SIL4 Contact Micrium No RTOS offering is attractive without a good set of debugging and trace tools. This table lists the various tools offered by the RTOS products. Object viewers are Graphical Tools that display the current state of the RTOS objects – such as how many tasks are waiting on a particular semaphore, which task is in a run state, etc. Execution graph shows the time consumed by the various threads over time and can be used to visualize how an applications meets/ or does not meet real time needs. Logging here refers to a graphical tool that captures and displays debug messages sent by the RTOS over UART, Ethernet, USB etc. This tool is very useful to trace RTOS events for debug. Several RTOS have a GUI to configure the RTOS such as Number of Priorities, Task stack size etc. TI-RTOS going beyond and allows allocation of static RTOS objects. Several RTOS (some associated with an IDE) allow applications to plot variables, and associate variables with a dial, heat map etc. Although the four RTOS options support various IDEs (and their associated compilers), they many not provide out-of-the box projects for all the various IDEs/compilers. The last few columns talk about examples, license, available certifications and cost. Most RTOS are free and are licensed BSD or modified GPL except Micirum. TI-RTOS provides a large number of examples. Micrium has been certified for safety applications.

6 MSP432 & TI-RTOS Developed and maintained by TI
Components Supported Kernel Wi-Fi FAT File System Device Drivers Power Manager Instrumentation IDE: CCS, IAR, & GCC Tools Device Drivers Real-time clock NEW! Timer UART I2C SPI SPI-SD PWM NEW! Watchdog GPIO Developed and maintained by TI Fully supported on MSP432 with > 50 examples. Out of the box examples for supported booster- packs. Power Manager to simplify & optimize power during runtime Power-aware Drivers that work with TI-RTOS kernel or can even be used with another RTOS Underlying structure for Energia MT - first hobbyist-oriented multi- thread IDE supporting MSP432 BoosterPack Supported CC3100 Booster Pack SD-Card BoosterPack TMP006 BoosterPack Sharp Memory LCD BoosterPack RF430CL330 NFC Transponder TPL0401EVM Board Here we talk about TI-RTOS is more detail. TI-RTOS is developed and maintained by Texas Instruments. They fully support the MSP432 device and have >50 out-of-the box examples. Many of these examples run on the MSP432 LaunchPad with a combo BoosterPack to demonstrate real world examples. TI-RTOS Kernel provides a broad range of real-time kernel services as seen in the table earlier. TI-RTOS has provides drivers for various MSP432 specific peripherals such as SPI, I2C, Uart, PWM, RTC, GPIO and Timer. The driver APIs are common across various TI MCU’s – for example same API can be used on an MSP432, C2000 as well as a CC26xx. The exciting new addition to TI-RTOS is the MSP432 specific Power Manager which we will cover in the next slide. TI-RTOS is also the basis for new Energia MT. (multi Theraded Energia). More details shortly.

7 Using TI-RTOS Power Manager
MSP432 Power Sequence Using MSP432 DriverLib Using TI-RTOS Power Manager FlashCtl_setWaitState(FLASH_BANK0, waitsNew); FlashCtl_setWaitState(FLASH_BANK1, waitsNew); /* now change clocks and dividers */ CS_setDCOCenteredFrequency( PowerMSP432_perfLevels[level].DCORESEL); CS_initClockSignal(CS_MCLK, PowerMSP432_perfLevels[level].clockSource, PowerMSP432_perfLevels[level].DIVM); CS_initClockSignal(CS_HSMCLK, PowerMSP432_perfLevels[level].DIVHS); CS_initClockSignal(CS_SMCLK, PowerMSP432_perfLevels[level].DIVS); FlashCtl_enableReadBuffering(FLASH_BANK0, FLASH_DATA_READ); FlashCtl_enableReadBuffering(FLASH_BANK0, FLASH_INSTRUCTION_FETCH); FlashCtl_enableReadBuffering(FLASH_BANK1, FLASH_DATA_READ); FlashCtl_enableReadBuffering(FLASH_BANK1, changedStateOK = PCM_setPowerState(stateNew); AMx_LDO SLx_LDO AMx_LPR SLx_LPR AMx_DCDC SLx_DCDC 1MCLK 3MCLKs AM1_LDO AM0_LDO AM1_LPR AM0_LPR AM1_DCDC AM0_DCDC RESET RTC_C_holdClock(); WDT_A_holdTimer(); PCM_setPowerState(PCM_LPM3); Power_setPerformanceLevel(level) Power_sleep() Active-mode Transition Sleep-mode Transition Power Manager helps applications with entering/exiting various Low Power Modes modes and choosing among the various performance levels – AM_LDO_VCORE0, AM_DCDC_VCORE1. Power Manager reduces a gnarly code sequence into a single function call!!!! Application can pick the sleep mode and performance level and then the Power Manager will manage the rest in a thread-safe way. Clocks get configured, Flash wait states and buffering modes, RTC and Watchdog are managed based on the performance level automatically Simply ask power Manager these questions – “What are my clocks right now?” “What is my performance level?” “ Why can’t my system enter LPMx.5? What are my latencies to enter/exit LPM modes?” etc. All TI-RTOS drivers use the Power Manager services. Drivers can give inputs to Power Manager on which sleep mode or performance level they can handle at any given time.Drivers can get notified by the Power Manager when sleep or performance events occur.

8 Energia MT ?? Single sketch code hard to write for multiple LEDs at different rates Multiple sketches makes code clean and easy to write Complex single sketches to simple multiple sketches Run sketches in parallel Automagic low power The power of an RTOS for everybody without the complexity! Easy to create interactive component libraries See video! Energia is the easy to use programming environment for micro controllers based on the Wiring framework, the same framework Arduino is based on. Energia has a vibrant self supporting community of enthusiastic user and contributors Using TI-RTOS as a foundation, Energia now supports multiple threads which make it easy for the applications to write modular code. Automagic low power comes with using TI-RTOS. As seen in this slide, a complex sketch can be broken down into simpler sketches that run in parallel (i.e in diff threads)

9 Energia MT – Reuse of framework
TI-RTOS enables Energia to be ported to new devices rapidly! Energia MT Energia/Wiring API UART SPI I2C PWM Device TI-RTOS Libraries Sketches Energia This is the Energia Framework, To the left we see that Energia MT uses TI-RTOS that makes Energia even more portable across TI MCUs.

10 MSP432 & ARM RTX Download Keil IDE from Free for all ARM RTX details Run examples today on the MSP432 LaunchPad Full suite of examples and CMSIS drivers coming soon CMSIS compliant Royalty Free Small footprint <4K Flexible Scheduling Arm RTX supports MSP432. ARM RTX comes as part of the ARM_MDK install at the link shown here. Now lets talk about some of the key features and advantages of ARM RTX. ARM RTX is free and comes installed with ARM_MDK. 2. RTX is specifically written for embedded systems based on ARM and Cortex-M MCUs. It therefore runs quickly and has a very low memory footprint of around 4K bytes. Detailed benchmarks are available on line. 3. ARM RTX follows the ARM CMSIS standard. 4. ARM RTX has a flexible scheduler which is deterministic and supports zero latency interrupts. Scheduler can be per-emptive, co-operative or round-robin. Pre-emptive - each task has a different priority and will run until a higher priority task is ready to run. Round-Robin - each task will run for a fixed period of CPU run-time (time slice). Co-operative - each task will run until it is told to pass control to another task or reaches a blocking OS call. Default is round-robin pre-emptive. Tasks execute for the duration of their time-slice If no other task with the same priority or higher is ready to run, the currently running task resumes it execution. 5. ARM RTX low power support specific to the MSP432 is coming soon.

11 Free, Modfiied GPL licence
MSP432 & FreeRTOS Download FreeRTOS from See the demo that runs on the MSP432 LaunchPad at OS_Demo.html MPU support Tickless Free, Modfiied GPL licence Lets talk about some of the key features and advantages of FreeRTOS 1. FreeRTOS is "free" and is provided with a Modified GPL license. This license makes the kernel source code remain open source, while allowing application code, drivers and middleware that just uses the kernel to remain closed if needed. 2. Its compiler agnostic and supports CCS, IAR, Keil, GCC and Tasking. Our-of box demo for CCS and IAR are available. 2. FreeRTOS uses prioritised preemptive scheduling with time slicing. That means the RTOS scheduler will always run the highest priority task that is in the Ready state, and will switch between tasks of equal priority on every RTOS tick interrupt. If config parameter USE_TIME_SLICING is set to 0 then the RTOS scheduler will still run the highest priority task that is in the Ready state, but will not switch between tasks of equal priority just because a tick interrupt has occurred. 3. FreeRTOS supports tickless mode of operation and provides idle task hooks for applications to enter low power modes. 4. SafeRTOS version available for safety critical applications.

12 MSP432 & Micrium OS Built-in benchmarks Download Micrium µC/OS-II from results/?searchterm=mi- msp432p401r&supported=true Contact Micrium for pricing questions. Certified for safety! Micirum OS also supports MSP432. Micirum RTOS is a well known in safety-critical applications such as Avionics, Medical and Nuclear. MSP432 is supported in UCOS I and UCOS III RTOSes from Micirum. Please contact Micirum for cost and licensing questions.

13 Backup

14 MSP432 TI-RTOS – Power Manager
Power Manager helps applications with entering/exiting various LPM modes, choosing among the various performance levels – AM_LDO_VCORE0, AM_DCDC_VCORE1 etc Drivers can give inputs to Power Manager on which sleep mode or performance level they can handle at any given time. Drivers can get notified by the Power Manager when sleep or performance events occur. Application can pick the sleep mode and performance level and then the Power Manager will manage the rest in a thread-safe way. Power and performance decisions are made in ONE place. Clocks get configured based on requested performance level. Flash wait states and buffering modes set automatically based on performance level. RTC and Watchdog are managed to enter LPM3 Simply ask power Manager these questions – “What are my clocks right now?” “What is my performance level?” “ Why can’t my system enter LPMx.5? What are my latencies to enter/exit LPM modes?” etc. All TI-RTOS drivers use the Power Manager services.

15 MSP432 TI-RTOS – Power Manager APIs
Init and setup Power_init(); - Call once before other APIs at init time. Power_enablePolicy(); Enable Power Manager – call once at init time. Power_idleFunc(); - Add to idle loop or forever while(1). Get/Set Power_set/getPerformanceLevel(); Use this API to set various performance levels such as AM_DCDC_VCORE1, AM_DCDC_VCORE0 etc. This API also manages flash wait wait and buffering modes. Constarints are taken into account before entering a new performance level. Power_register/unregisterNotify(); Register a function with the power manager to get notified on power events such as “about to sleep”, “waking up”. Apps can then manage their state/resources accordingly. Power_set/releaseConstraint(); Use this API to prevent entry into Low Frequency Mode or prevent entry into LPMx.5. Getters Power_getConstraintMask(); - Get constraints that can prevent power manager from entering a particular sleep state or performance level. This API will tell the application why the power Module did not allow entry into a particular sleep or performance state. Goto to LPM Power_shutdown(); API to enter LPMx.5. Power_sleep(); API to enter LPM0, LPM3 or LPM4.

16 TI-RTOS Development Tools
16

17 ARM RTX Development Tools
Leverage ARM standard CMSIS-DSP library


Download ppt "MSP432™ MCU RTOS Solutions"

Similar presentations


Ads by Google