11.07.2015 Views

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

IAR PowerPac RTOS User Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ContentsPreface ................................................................................................................................................................3Introduction to <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> ........................................................................................................11What is <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>.......................................................................................................... 11Features.............................................................................................................................................. 11Basic concepts .................................................................................................................................................13Tasks ................................................................................................................................................... 13Single-task systems (superloop)....................................................................................................... 13Multitasking systems ......................................................................................................................... 13Cooperative multitasking....................................................................................................................... 14Preemptives multitasking....................................................................................................................... 15Scheduling .......................................................................................................................................... 15Round-robin scheduling algorithm ........................................................................................................ 15Priority-controlled scheduling algorithm............................................................................................... 16Priority inversion ................................................................................................................................... 16Communication between tasks ....................................................................................................... 16Global variables ..................................................................................................................................... 16Communication mechanisms................................................................................................................. 16Mailboxes and queues............................................................................................................................ 17Semaphores............................................................................................................................................ 17Events..................................................................................................................................................... 17How task-switching works ................................................................................................................ 17Switching stacks................................................................................................................................. 17Change of task status ........................................................................................................................ 18How the OS gains control ................................................................................................................ 19OS_InitKern() ........................................................................................................................................ 21OS_Start() .............................................................................................................................................. 21Different builds of <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> ........................................................................................ 22Profiling ................................................................................................................................................. 22List of libraries....................................................................................................................................... 23Task routines .................................................................................................................................................. 25Introduction ....................................................................................................................................... 25Task routine API function overview................................................................................................ 26OS_CREATETASK()............................................................................................................................ 26OS_CreateTask() ................................................................................................................................... 27OS_CREATETASK_EX() .................................................................................................................... 28OS_CreateTaskEx()............................................................................................................................... 29OS_Delay() ............................................................................................................................................ 30OS_DelayUntil().................................................................................................................................... 30OS_SetPriority() .................................................................................................................................... 31OS_GetPriority().................................................................................................................................... 31OS_SetTimeSlice() ................................................................................................................................ 32OS_Suspend() ........................................................................................................................................ 32OS_Resume()......................................................................................................................................... 32OS_GetSuspendCnt()............................................................................................................................. 33PP<strong>RTOS</strong>-2 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!