[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug found
- Date: Tue, 9 Jun 2009 13:36:01 +0300
- From: leonp at plris.com (Leon Pollak)
- Subject: Bug found
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.
--
Leon
- Follow-Ups:
- Bug found
- From: Thomas.Doerfler at embedded-brains.de (Thomas Dörfler)