home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!agate!dog.ee.lbl.gov!lbl.gov!vxwexplo
- From: prb@aplexus.jhuapl.edu (Paul R. Bade)
- Newsgroups: comp.os.vxworks
- Subject: re: MVME167 and RealTime Clock
- Date: Mon, 17 Aug 92 08:18:25 EDT
- Organization: Lawrence Berkeley Laboratory, Berkeley CA
- Lines: 31
- Sender: vxwexplo@lbl.gov
- Message-ID: <9208171218.AA08406@aplexus.jhuapl.edu>
- NNTP-Posting-Host: 128.3.112.16
- Originator: daemon@vxw.ee.lbl.gov
-
-
- Wind River was informed of this error quite sometime ago, so long ago
- that I can't remember exactly when. The code I have used to correct the
- situation is:
-
- strncpy ( oscFreq, (char*)0xfffc1f28, 4); /* read clk speed from BBRAM */
- oscFreq[4] = NULL; /* terminate string */
-
- printf("Board has a %2s.%s Mhz Oscillator\n", oscFreq, &oscFreq[2]);
- if (!strncmp(oscFreq, "33", 2))
- {
- *PCC2_PRESCALE = -33;
- *PCC2_PRESCALE_CLK_ADJ = -33;
- if (strncmp(oscFreq, "3300", 4))
- {
- printf("sysLib.c: sysHwInit: \"Non-Integer clock frequency on Board will introduce error in system Clock ^G^G (see p 3-18 of MV167 manual)\n\"");
- }
- }
-
- else /* if (strncmp(oscFreq, "2500", 4)) */
- {
- *PCC2_PRESCALE = -25;
- *PCC2_PRESCALE_CLK_ADJ = -25;
- }
-
-
- That's All Folks,
-
- Paul Bade
- Johns Hopkins University / Applied Physics Lab
-
-