General AMX Operation
K
A
DAK
15
Timing Facilities
The AMX Timer Manager provides a Clock Handler and a Kernel Task to provide
complete timing control for your real-time application. The AMX Clock Handler is
independent of any particular hardware configuration. If AMX timing facilities are to be
utilized, a real-time clock must be included in the configuration.
The hardware clock interrupt must be serviced by a conforming ISP. Whenever a clock
interrupt occurs, the application Interrupt Service Procedure must dismiss the hardware
clock interrupt and call the AMX Clock Handler.
The AMX Clock Handler triggers the AMX Kernel Task if required. The Kernel Task is
triggered at the user defined system tick interval if, and only if, there is any outstanding
timing activity required in the system. In this case, the interrupted task is suspended and
the AMX Kernel Task begins execution.
The AMX Kernel Task executes as the highest priority task in the system. The AMX
Kernel Task monitors all tasks which are in a timed wait state. If a task's timer expires,
the AMX Kernel Task primes the task to resume execution with a timeout indication.
The AMX Kernel Task also services all expiring application interval timers. Whenever
an application interval timer expires, the corresponding application Timer Procedure is
executed. This procedure can invoke a subset of the AMX services to send messages,
signal events or wake tasks. If the timer is defined to be periodic, the AMX Kernel Task
automatically restarts it with the predefined period.