This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Project wont start any more LPC1768

After making some changes to my code last night, my project builds fine, but no way will it start (under the emulator).

It is stuck in SystemInit() at the following instruction:

  while (!(LPC_SC->PLL0STAT & (1<<26)));/* Wait for PLOCK0                    */

I don't think I changed the clock configuration but clearly it's not happy

Here's what it is currently set to:

If that's invalid what do I need to change to make this work please.

Thanks, David

Parents
  • This depends on your external clock source. As you can read in the source code of system_LPC17xx.c:

    //   <e3> PLL0 Configuration (Main PLL)
    //     <h> PLL0 Configuration Register (PLL0CFG)
    //                     <i> F_cco0 = (2 * M * F_in) / N
    //                     <i> F_in must be in the range of 32 kHz to 50 MHz
    //                     <i> F_cco0 must be in the range of 275 MHz to 550 MHz
    //       <o4.0..14>  MSEL: PLL Multiplier Selection
    //                     <6-32768><#-1>
    //                     <i> M Value
    //       <o4.16..23> NSEL: PLL Divider Selection
    //                     <1-256><#-1>
    //                     <i> N Value
    //     </h>
    //   </e>

    To be sure, you should check the user guide of this device which frequency ranges for the PLL is allowed.

Reply
  • This depends on your external clock source. As you can read in the source code of system_LPC17xx.c:

    //   <e3> PLL0 Configuration (Main PLL)
    //     <h> PLL0 Configuration Register (PLL0CFG)
    //                     <i> F_cco0 = (2 * M * F_in) / N
    //                     <i> F_in must be in the range of 32 kHz to 50 MHz
    //                     <i> F_cco0 must be in the range of 275 MHz to 550 MHz
    //       <o4.0..14>  MSEL: PLL Multiplier Selection
    //                     <6-32768><#-1>
    //                     <i> M Value
    //       <o4.16..23> NSEL: PLL Divider Selection
    //                     <1-256><#-1>
    //                     <i> N Value
    //     </h>
    //   </e>

    To be sure, you should check the user guide of this device which frequency ranges for the PLL is allowed.

Children