DSPRelated.com
Forums

Crystal Oscillator

Started by Hardeep December 2, 2005
Hi,

I am working with the DSP56858. In the CPU bean for my project, I can
select a value of crystal from 2MHz to 4MHz. Where in the program is
this crystal value being used? Is it being saved as a global variable?
If so, in which file would it be?

Thanks.
Hardeep


I thought that it would be in the _EntryPoint(), but after some
investigation I found that the PLL settings are being setup in that
routine. I also thought that the value would be stored in some register,
but after going through the manual, I couldn't find any registers that
holds its value. That's why I'm thinking that maybe it's saved as a
global variable somewhere?

I know that you set the crystal's value in the bean (and it uses this
value to correctly set the prescalers for all timer beans), but I still
haven't been able to find in the C code how the program knows that the
processor is using the 4MHz crystal.

Thanks.
Hardeep -----Original Message-----
From: R.A.Imhoff [mailto:rimhoff@rimh...]
Sent: Friday, December 02, 2005 11:52 AM
To: Hardeep Gida
Cc: motoroladsp@moto...
Subject: Re: [motoroladsp] Crystal Oscillator

Hello Hardeep,

Processor Expert needs to know your cpu frequency in order to correctly
set the prescalers for all timer beans you add to the project.
If you add a bean to create an interrupt every 10 ms, it needs to know
how many clock cycles that corresponds to, which in turn depends on the
crystal frequency.

Best regards
Robert

On 02.12.2005, at 17:17, Hardeep wrote:

> Hi,
>
> I am working with the DSP56858. In the CPU bean for my project, I can
> select a value of crystal from 2MHz to 4MHz. Where in the program is
> this crystal value being used? Is it being saved as a global variable?
> If so, in which file would it be?
>
> Thanks.
> Hardeep >
> ------------------------ Yahoo! Groups Sponsor




CPU operation =
[(PLLDB+1)*Crystal_frequency/Prescaler]/Postscaler/2
So any input frequency change will reflect either
PLLDB or Prescaler or Postscale change. You will see
this change in the settings of PLL in Cpu.c file

Charlie

--- Hardeep Gida <hgida@hgid...> wrote:

> I thought that it would be in the _EntryPoint(), but
> after some
> investigation I found that the PLL settings are
> being setup in that
> routine. I also thought that the value would be
> stored in some register,
> but after going through the manual, I couldn't find
> any registers that
> holds its value. That's why I'm thinking that maybe
> it's saved as a
> global variable somewhere?
>
> I know that you set the crystal's value in the bean
> (and it uses this
> value to correctly set the prescalers for all timer
> beans), but I still
> haven't been able to find in the C code how the
> program knows that the
> processor is using the 4MHz crystal.
>
> Thanks.
> Hardeep > -----Original Message-----
> From: R.A.Imhoff [mailto:rimhoff@rimh...]
> Sent: Friday, December 02, 2005 11:52 AM
> To: Hardeep Gida
> Cc: motoroladsp@moto...
> Subject: Re: [motoroladsp] Crystal Oscillator
>
> Hello Hardeep,
>
> Processor Expert needs to know your cpu frequency in
> order to correctly
> set the prescalers for all timer beans you add to
> the project.
> If you add a bean to create an interrupt every 10
> ms, it needs to know
> how many clock cycles that corresponds to, which in
> turn depends on the
> crystal frequency.
>
> Best regards
> Robert
>
> On 02.12.2005, at 17:17, Hardeep wrote:
>
> > Hi,
> >
> > I am working with the DSP56858. In the CPU bean
> for my project, I can
> > select a value of crystal from 2MHz to 4MHz. Where
> in the program is
> > this crystal value being used? Is it being saved
> as a global variable?
> > If so, in which file would it be?
> >
> > Thanks.
> > Hardeep
> >
> >
> >
> >
> >
> >
> > ------------------------ Yahoo! Groups Sponsor
> >
> >
> >
> >
> >
> >
> >
>

__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs