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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

System variablesIntroductionThe system variables are described here for a deeper understanding of how the OS works and to make debugging easier.Note:Do not change the value of any system variables.These variables are accessible and are not declared constant, but they should only be altered by functions of <strong>IAR</strong><strong>PowerPac</strong> <strong>RTOS</strong>. However, some of these variables can be very useful, especially the time variables.Time variablesOS_TimeDescriptionThis is the time variable which contains the current system time in ticks (usually equivalent to ms).Prototypextern volatile OS_I32 OS_Time;Additional InformationThe time variable has a resolution of one time unit, which is normally 1/1000 sec (1 ms) and is normally the timebetween two successive calls to the <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> interrupt handler. Instead of accessing this variable directly,use OS_GetTime() or OS_GetTime32() as explained in the Chapter Time measurement on page 113.OS_TimeDexBasically, for internal use only. Contains the time at which the next task switch or timer activation is due. If((int)(OS_Time - OS_TimeDex)) >= 0, the task list and timer list will be checked for a task or timer to activate.After activation, OS_TimeDex will be assigned the time stamp of the next task or timer to be activated.OS internal variables and data-structures<strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> internal variables are not explained here as they are in no way required to use <strong>IAR</strong> <strong>PowerPac</strong><strong>RTOS</strong>. Your application should not rely on any of the internal variables, as only the documented API functions areguaranteed to remain unchanged in future versions of <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong>.ImportantDo not alter any system variables.PP<strong>RTOS</strong>-2 109

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

Saved successfully!

Ooh no, something went wrong!