--- In lpc2000@yahoogroups.com, "Karl Olsen" <kro@p...> wrote:
>
> --- In lpc2000@yahoogroups.com, vijayasarathy T <tvsarathy@g...>
> wrote:
> > Hi,
> >
> > Iam using GNU arm gcc compiler for LPC2104 , when i use
> >
> > while( !( SCB_PLLSTAT & PLL_LOCK ) );)
> >
> > this statement, the assembly codes are not generated for other
> > instruction below this statement. do any one have a suggestion.
>
> Probably (SCB_PLLSTAT & PLL_LOCK) is always false, so the while loop
> is infinite. Code after an infinite loop would never be executed, so
> GCC optimizes it away.
That would be my bet. I expect that SCB_PLLSTAT and PLL_LOCK are
constants, intended to select a bit from a status word. Just ANDing
them together produces a zero which is never true. The OP needs to
read the status word and use these constants to select the bits for
the while condition.