Target startup code - Where is PLLCFG_VAL defined?

Comments

7 comments

  • Avatar
    Chalo

    Ok... at the top of the startup code there's a definition for PLLCFG_VAL when that symbol is not defined but again, that's validated against OSCILLATOR_CLOCK_FREQUENCY==12000000, were is that defined?

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    PLLCFG_VAL is either defined by the user on the project, or is defined by a project template for a specific board depending upon that board's components so when you create a project it gets defined to the "best" value.

    0
    Comment actions Permalink
  • Avatar
    Paul Curtis

    OSCILLATOR_CLOCK_FREQUENCY is defined when you change the oscillator frequency; I believe it's in a property group file.

    0
    Comment actions Permalink
  • Avatar
    Francesco Cuzzocrea

    Hi there is a configuration file in which these variables are yet defined ?I should set the multiplier and divider value, the USB clock value and sets the peripheral clock different for some of them.  I made a search in order to see where the variables are yet defined, but nothing.  Can I define them in a file and include it in the project ?How can I check that the defined values are effectively setted ?

    best regards

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    PLLCFG_VAL, CCLKCFG_VAL and USBCLKCFG_VAL are defined at the top of the Philips_LPC230X_Startup.s file if OSCILLATOR_CLOCK_FREQUENCY is 12000000.

    If you are using a different input clock frequency or want to override the default values you can do this using the Preprocessor Options > Preprocessor Definitions project property.

    You can check the defined values are set to the value you want by building the program and looking at the disassembly of the code. You could also run the program and check the value of the register using the memory or register window.

    0
    Comment actions Permalink
  • Avatar
    Francesco Cuzzocrea

    I have defined in the project properties the preprocessor options:

    PLLCFG_VAL 0x0002001F

    when I recompile the result is "error: garbage following instruction --ldr r1,=0x0002001F1"

    how is the sintax ? At which manual pèage I will find it ?  Did you have some examples ?

    I apologize for the bunch of questions, but I'm new to crossworks, we are evaluation it (up now we used free  keil) in order to buy.

    best regards

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Jon Elliott

    I believe "PLLCFG_VAL 0x0002001F" should be "PLLCFG_VAL=0x0002001F".

    0
    Comment actions Permalink

Please sign in to leave a comment.