Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Strange problem with PLL

2006-02-02 by brendanmurphy37

Just a suggestion, but I learned long ago it's a good idea to get 
into the habit of doing this like:

while (wait_volatile_flag_object)
{
    ;
}

This makes it really obvious what's going on.

It's an extension of another habit of always using braces, even when 
they're not required, as in:

while (s != end)
{
    sum += *s++;
}

This makes it a lot easier to add/delete lines of code without having 
unintended consequences.

By the way, this is obviously off-topic: I don't intend to start a 
thread on coding style/standards.....

Brendan


--- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
>
> Em Qui 02 Fev 2006 08:47, Karl Olsen escreveu:
> > --- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@> wrote:
> > > Em Qui 02 Fev 2006 06:05, Jaromir Subcik escreveu:
> > >> According to User Manual, you use lowest possible crystal, but 
it
> > >> may works. Do you set CCO within recommended range 156 to 
320MHz?
> > >> For desired frequency 50MHz you must output divider adjust to 
4 to
> > >> keep this CCO range.
> > >
> > > Yes, I am (I think I am).
> > > My PLL routine is like that:
> > >
> > > SCB_PLLCFG = 0x24;
> > > SCB_PLLCON = 0x01;
> > > SCB_PLLFEED = 0xAA;
> > > SCB_PLLFEED = 0x55;
> > >
> > > while(!(SCB_PLLSTAT & 0x00000400))
> > >
> > > SCB_PLLCON = 0x03;
> > >
> > > SCB_PLLFEED = 0xAA;
> > > SCB_PLLFEED = 0x55;
> >
> > Ahem, you are repeatedly enabling and connecting the PLL while you
> > wait for it to lock.  Try a ; or {} after the while().
> >
> > Karl Olsen
> 
> Damn! Why didnt I see that obvious problem???? 
> Thank you so much, Karl!!!!!
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.