diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-08-28 13:21:53 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-08-28 13:21:53 +0000 |
commit | 07b3693f175a0a601a53cba656940aaec8bd9949 (patch) | |
tree | bb3e6b3f60fba2580b8315e7f24374b70b218d61 /doc/bsp_howto/clock.t | |
parent | New file (diff) | |
download | rtems-07b3693f175a0a601a53cba656940aaec8bd9949.tar.bz2 |
Base files
Diffstat (limited to 'doc/bsp_howto/clock.t')
-rw-r--r-- | doc/bsp_howto/clock.t | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/doc/bsp_howto/clock.t b/doc/bsp_howto/clock.t new file mode 100644 index 0000000000..403192fd32 --- /dev/null +++ b/doc/bsp_howto/clock.t @@ -0,0 +1,38 @@ +@chapter = The Clock Driver + +@subsection = Introduction + +The clock driver aims at giving a steady time basis to the kernel, so that +the RTEMS primitives that need a clock tick work properly. <insert a link +to the Clock Driver defs> + +The clock driver is located in the clock directory of the BSP. + +@subsection = Primitives + +@subsection = Initialization + +The major and minor numbers of the clock driver can be made available to +the others, such as the Shared Memory Driver. + +Then you have to program your integrated processor periodic interval timer +so that an interrupt is generated every m microseconds, where m = +BSP_Configuration.microseconds_per_tick. Sometimes the periodic interval +timer can use a prescaler so you have to look carefully at your user's +manual to determine the correct value. + +You must use the RTEMS primitive to put your clock interrupt routine in +the VBR: + +@example +rtems_interrupt_catch (InterruptHandler, CONSOLE_VECTOR, &old_handler); +@end example + +@subsection = The clock interrupt subroutine + +It only has to inform the kernel that a ticker has elapsed, so call : + +@example +rtems_clock_tick(); +@end example + |