[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


http://www.rtems.org/bugzilla/show_bug.cgi?id=1129


Joel Sherrill <joel.sherrill at oarcorp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|joel                        |thomas.doerfler at embedded-
                   |                            |brains.de
             Status|ASSIGNED                    |WAITING
           Platform|                            |All
   Target Milestone|---                         |4.9


PIT interrupts occur 128 times slower.

Release:
RTEMS-4.6.5, CVS

Environment:
Pentium, Linux, mbx8xx

--- Comment #1 from hbuciuc at netscape.net  2006-07-12 04:33:20 ---
Fix:
There is an error in  
../rtems-4.6.5/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
in function clockOn() when programming the RTSEL and RTDIV bits in the SCCR register. RTSEL and RTDIV bits positions
are misscalculated. 
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-From-To: joel->thomas
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-From-To: open->feedback
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-----
 Hash: SHA1
 
 Joel,
 
 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:
 
 http://www.rtems.com/cgi-bin/viewcvs.cgi/~checkout~/rtems/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c?rev=1.9&content-type=text/plain
 
 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?
 
 NOTE!!!!
 
 Hm, I just checked
 
 c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c
 
 and it seems some of the neccesary changes did not make it into the
 4.6.99.3 branch (but they are in the the 4.6.5 branch, file revision
 1.8.2.3). If you look into this file, the differences to the previous
 version
 
 http://www.rtems.com/cgi-bin/viewcvs.cgi/rtems/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c.diff?r1=1.8.2.2&r2=1.8.2.3
 
 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.
 
 wkr,
 thomas Doerfler.
 
 
 
 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
 > Responsible-Changed-Why:
 > 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
 > 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.
 > 
 > 
 > 
 > 
 >  http://www.rtems.com/cgi-bin/gnatsweb.pl?cmd=view&database=RTEMS&pr=1129
 
 
 - --
 - --------------------------------------------
 IMD Ingenieurbuero fuer Microcomputertechnik
 Thomas Doerfler           Herbststrasse 8
 D-82178 Puchheim          Germany
 email:    Thomas.Doerfler at imd-systems.de
 PGP public key available at:
      http://www.imd-systems.de/pgpkey_en.html
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.5 (MingW32)
 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
 iD8DBQFEtTPWwHyg4bDtfjQRAnJQAJ9mZpxO605cQRvpWiw9YY7Pto4FvgCgh18o
 r/nUIFhu82Wl1Vv2b6rn0m8=
 =724c
 -----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 mailing list