colin howard

"Official" PLL init code

Discussion created by colin howard on Aug 27, 2008
Latest reply on Aug 28, 2008 by colin howard

Does anyone know of either (a) some Freescale example code for setup of the PLL, or (b) a solid rationale for the NOPs in the following.  I have to justify (or otherwise) the presence of the NOPs in some code written by a guy who left the company.

PLL_ON;                         // macro to turn on PLL
while((CRGFLG & 0x08) == 0){}   // poll for LOCK

 The logic behind this question is simple, if they should be there, then some justification should be made, if not they should be removed. Unfortunately the old saying "if it aint broke dont fix it" doesn't hold in this case :smileysad: