This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/LAUNCHXL-F28069M: Reading parameters from flash memory

Part Number: LAUNCHXL-F28069M

Tool/software: Code Composer Studio

Hi

I am writing my custom current controller. I currently have some control law constants defined as Macros.

There must be a way to store& read  these parameters from flash memory.

How could it be done..?

I see that specific motor constants are stored in user_j5.h

If i do the same (initially), how do i read my "new constants" into the custom current controller code ?

  • Srinath,

    if you would like to define a constant in memory there are a few ways to go about it.

    1. You could define a #pragma, and then use your linker command file to place that section in flash.
    2. You could use the "const" keyword  when defining the constants and make sure that you linker places the .const section in flash.
    3. Finally you could used a #define, this will be a compile time constant... it will be an immediate value in the program data space not a value read from a data page.

    I hope it helps!

    Regards,

    Cody