[Bug 1129] PIT interrupts slow on mbx8xx when derived from EXTCLK
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Tue Aug 5 18:20:01 UTC 2008
Joel Sherrill <joel.sherrill at oarcorp.com> changed:
What |Removed |Added
AssignedTo|joel |thomas.doerfler at embedded-
Target Milestone|--- |4.9
PIT interrupts occur 128 times slower.
Pentium, Linux, mbx8xx
--- Comment #1 from hbuciuc at netscape.net 2006-07-12 04:33:20 ---
There is an error in
in function clockOn() when programming the RTSEL and RTDIV bits in the SCCR register. RTSEL and RTDIV bits positions
The fix consists of:
Line 87: m8xx.sccr |= (1<<23);
Line 93: m8xx.sccr |= (1<<23);
Line 101: m8xx.sccr |= (1<<24);
--- Comment #2 from Joel Sherrill <joel.sherrill at oarcorp.com> 2006-07-12 08:30:05 ---
Responsible-Changed-Why: This is Thomas' BSP.
--- Comment #3 from Joel Sherrill <joel.sherrill at oarcorp.com> 2006-07-12 08:30:05 ---
State-Changed-Why: Precisely which board model is this happening with. There
are a lot of MBX8xx models and the clock scheme varies.
Thomas.. hopefully this isn't much to digest and fix
properly. It could be a new variant or a bug. A fix needs
to be on the 4.6 branch and CVS head.
--- Comment #4 from thomas.doerfler at embedded-brains.de 2006-07-12 19:39:35 ---
From: "Thomas Doerfler (nt)" <Thomas.Doerfler at imd-systems.de>
To: bugs at rtems.com
Cc: joel at oarcorp.com, jmj at oarcorp.com, jennifer at oarcorp.com,
ralf_corsepius at rtems.org, chrisj at rtems.com, norume at aps.anl.gov,
vvv at oktetlabs.ru, mayes at oarcorp.com, hbuciuc at netscape.net
Subject: Re: RTEMS Re: bsps/1129
Date: Wed, 12 Jul 2006 19:39:35 +0200
-----BEGIN PGP SIGNED MESSAGE-----
thank you for moving this PR to me, I have tinkered around in this code
for some time so it is really my responsibility.
Horia, I am a bit confused by your problem description. In the
rtems-4.6.5 branch, I have a small shift in line numbers compared with
your description, but this may be due to your efforts to find the reason
for your problems. But I also find that the lines you mentioned (with an
offset of 1-3) already contain the code you proposed, so do we really
look into the same code? I have investigated the code today through the
cvsweb interface at:
I have rechecked the bit meanings against my MPC860 manual (MPC860UM/AD
rev 1), and the code manipulates the bits I would manipulate (which, on
the other hand is not too suprising, because I wrote this code).
The problem with this BSP is, that there are LOTS of different MBX8xx
boards and they differ to a large amount in the clock input circuitry.
Some use a 4.0MHz crystal at the OSCCLK, some (like mine) have a 32768Hz
crystal. That's why I have made a special addition to the BSP: when
rtems_cpu_configuration_get_clicks_per_usec() is set to 0, then the PIT
will be driven from the main system clock (EXTCLK), not the OSCCLK.
Can you provide me with the following information:
- - what kind of board derivate do you have?
- - can you identify the type of crystal attached to the OSCCLK?
- - which type of MBX8xx configuration (BSP derivate like mbx860_005b.cfg)
do you use for this board?
Hm, I just checked
and it seems some of the neccesary changes did not make it into the
184.108.40.206 branch (but they are in the the 4.6.5 branch, file revision
220.127.116.11). If you look into this file, the differences to the previous
you will find the relevant patches: For certain board variants, the
following assigment is relevant:
Cpu_table.clicks_per_usec = 0; /* for 32768 Hz oscclk */
Can you add this modification to your code and try it out on your board?
If it works, I will prepare a patch, check it on my boards :-9 and will
feed it to the RTEMS CVS.
RTEMS-gnats at rtems.com schrieb:
> Synopsis: PIT interrupts slow on mbx8xx when derived from EXTCLK
> Responsible-Changed-From-To: joel->thomas
> Responsible-Changed-By: joel
> Responsible-Changed-When: Wed, 12 Jul 2006 08:30:05 -0500
> This is Thomas' BSP.
> State-Changed-From-To: open->feedback
> State-Changed-By: joel
> State-Changed-When: Wed, 12 Jul 2006 08:30:05 -0500
> Precisely which board model is this happening with. There
> are a lot of MBX8xx models and the clock scheme varies.
> Thomas.. hopefully this isn't much to digest and fix
> properly. It could be a new variant or a bug. A fix needs
> to be on the 4.6 branch and CVS head.
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: Thomas.Doerfler at imd-systems.de
PGP public key available at:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
--- Comment #5 from Joel Sherrill <joel.sherrill at oarcorp.com> 2008-08-05 13:20:00 ---
Ping? Can this be closed?
Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the bugs