Changeset c34aaae7 in rtems
- Timestamp:
-
May 7, 1999, 4:29:54 PM
(22 years ago)
- Author:
- Joel Sherrill <joel.sherrill@…>
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- acb644a6
- Parents:
- b06279d
- Message:
-
Bug fix from Gunter Magin <magin@@skil.camelot.de>:
in libcpu/powerpc/mpc860/clock/clock.c:InstallClock() the reload value for
the PIT is defined as:
pit_value = (BSP_Configuration.microseconds_per_tick *
Cpu_table.clicks_per_usec) - 1 ;
What exactly is a tick, and what is a click?
My confusion stems from the fact, that Jay defines clicks_per_usec to 1
which is correct for his configuration, where a 4MHz clock is predivided
by 4 and then fed to the PIT. So I assume a "click" is just the period of
the PIT input frequency.
However, our HW config seems to have 32.768 kHz crystal input for PIT.
Mandatory division by 4 means 8.196kHz (122usec) at the PIT.
I think, the above assignment should read:
pit_value = (BSP_Configuration.microseconds_per_tick /
Cpu_table.clicks_per_usec) - 1;
where I can define Cpu_table.clicks_per_usec in bspstart.c to 122
(clicks_per_usec). That would lead to a PIT reload value of
10000/122 - 1 = 81 to reach a 10ms "tick" period.
-
File:
-
Legend:
- Unmodified
- Added
- Removed
-
rb06279d
|
rc34aaae7
|
|
75 | 75 | Clock_driver_ticks = 0; |
76 | 76 | |
77 | | pit_value = BSP_Configuration.microseconds_per_tick * |
| 77 | pit_value = BSP_Configuration.microseconds_per_tick / |
78 | 78 | Cpu_table.clicks_per_usec; |
79 | 79 | if (pit_value == 0) { |