11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Timer supportIf your application can provide a periodic timer interrupt (<strong>for</strong> example one that keepsa watch dog alive) then you can use the timer wait facility of the library. This is a simplesoftware counter that is incremented by your timer interrupt. You can use this tospecify a wakeup time and to prevent your program waiting <strong>for</strong>ever <strong>for</strong> something tohappen.Interrupt service routine supportOn systems that have programmable interrupt controllers the CTL provides functionsthat enable you to install interrupt service routines as C functions and associate therequired hardware priority to their execution. On systems that have fixed interruptschemes functions are provided that enable you to create interrupt service routines thatco-operate with the CTL.Tasks can synchronize with interrupt service routines using either event sets,semaphores or message queues. Interrupt service routines are allowed to set (andclear) events in an event set, to signal a semphore and to do a non blocking post to amessage queue. Interrupt service routines cannot wait <strong>for</strong> events, wait <strong>for</strong> a semaphoreor use blocking message queue functions.Memory block allocation supportThe CTL provides a simple memory block allocator that can be used in situationswhere the standard C malloc and free functions are either too slow or may block thecalling task.C library supportThe CTL provides a task specific errno as well as exclusion mechanisms to enableusage of malloc/free functions in a multi-tasking envrionment.Chapter 17Timer support207

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

Saved successfully!

Ooh no, something went wrong!