[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug found
- Date: Tue, 09 Jun 2009 18:40:20 +0200
- From: Thomas.Doerfler at embedded-brains.de (Thomas Dörfler)
- Subject: Bug found
Leon,
the big question is, what is the definition of "clocks per usec". In
your view, this is the bus clock, in the view implemented, it is the
Timebase/DEC tick rate directly.
Maybe this helps...
wkr,
Thomas.
Leon Pollak wrote:
> Hello.
>
> In 4.8.0 version the file ../c/src/lib/libcpu/powerpc/mpc8260/clock/clock.c
> function clockOn (lines 94-95) has the following text:
>
> decrementer_value = rtems_configuration_get_microseconds_per_tick() *
> rtems_cpu_configuration_get_clicks_per_usec() - 1;
>
> while should be:
>
> decrementer_value = rtems_configuration_get_microseconds_per_tick() *
> (rtems_cpu_configuration_get_clicks_per_usec() / 4 ) - 1;
>
> (division by 4 is missing).
>
> See G2 Core Reference Manual. It is said (Section 1.1.8.2):
>
> "The decrementer is a 32-bit register that generates a decrementer interrupt
> exception after a programmable delay. The contents of the decrementer register
> are decremented once every four bus clock cycles, and the decrementer
> exception is generated as the count passes through zero."
>
> Thanks.
--
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler Obere Lagerstrasse 30
D-82178 Puchheim Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax: +49-89-18908079-9
- Follow-Ups:
- Bug found
- From: leonp at plris.com (Leon Pollak)
- References:
- Bug found
- From: leonp at plris.com (Leon Pollak)