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.

ContentsOS_LeaveInterrupt() ............................................................................................................................102OS_LeaveInterruptNoSwitch() ............................................................................................................103Example using OS_EnterInterrupt()/OS_LeaveInterrupt()..................................................................103Enabling / disabling interrupts from C........................................................................................... 103OS_IncDI() / OS_DecRI() ...................................................................................................................103OS_DI() / OS_EI() / OS_RestoreI() ....................................................................................................104Definitions of interrupt control macros (in <strong>RTOS</strong>.h) ..................................................................104Nesting interrupt routines..............................................................................................................105OS_EnterNestableInterrupt() ...............................................................................................................105OS_LeaveNestableInterrupt() ..............................................................................................................106OS_LeaveNestableInterruptNoSwitch() ..............................................................................................106Non-maskable interrupts (NMIs)................................................................................................... 106Critical Regions............................................................................................................................................ 107Introduction .....................................................................................................................................107Critical regions API function overview .........................................................................................107OS_EnterRegion()................................................................................................................................107OS_LeaveRegion() ..............................................................................................................................107System variables........................................................................................................................................... 109Introduction .....................................................................................................................................109Time variables.................................................................................................................................. 109OS_Time ..............................................................................................................................................109OS_TimeDex .......................................................................................................................................109OS internal variables and data-structures .................................................................................... 109Configuration for your target system..................................................................................................... 111Introduction .....................................................................................................................................111Hardware-specific routines.............................................................................................................111Configuration defines ...................................................................................................................... 111How to change settings...................................................................................................................111Setting the system frequency OS_FSYS..............................................................................................111Using a different timer to generate the tick-interrupts for <strong>IAR</strong> <strong>PowerPac</strong> <strong>RTOS</strong> ...............................112Changing the tick frequency ................................................................................................................112OS_CONFIG() ................................................................................................................................. 112STOP / HALT / IDLE modes ..........................................................................................................112Time measurement ..................................................................................................................................... 113Introduction .....................................................................................................................................113Low-resolution measurement........................................................................................................113Low-resolution measurement API function overview................................................................. 114OS_GetTime()......................................................................................................................................114OS_GetTime32()..................................................................................................................................114High-resolution measurement .......................................................................................................115High-resolution measurement API function overview................................................................ 116OS_TimingStart() ................................................................................................................................116OS_TimingEnd()..................................................................................................................................116OS_Timing_Getus().............................................................................................................................116OS_Timing_GetCycles() .....................................................................................................................116PP<strong>RTOS</strong>-29

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

Saved successfully!

Ooh no, something went wrong!