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.

Creating Flash Lookup Table

Other Parts Discussed in Thread: TMS320F28335

Hello,

I've got a TMS320F28335 chip in a product, and I can compile a program to it no problem.  I'm changing some of the values in the program, things that are constants, and I'm trying to figure out how to input these as a table in Flash that I can change without having to recompile after every minor change.  The code structure isn't changing, only a constant value here and there - a config file if you will.

For example, we're tuning a PI loop, and we can choose different Kp and Ki values. If I make a change now, I have to go and recompile. I'd rather simply load a location in Flash with an updated value.

Could you point me to some resources of people that may have done this in the past?

Thank you, Tim

  • Tim,

    I think the question is more suited to the C2000 device forum, therefore I moved your post.

    In the meantime, check the discussion below about a very similar scenario.

    e2e.ti.com/.../264223

    Regards,
    Rafael
  • Hi Tim,

    Check this thread out: e2e.ti.com/.../205736

    Regards,
    Gautam
  • Hi Tim. You cannot simply write to a flash location in order to change the value. For flash memory, you need to use the flash API which erases the flash memory contents of a sector at a time and then program the value. Erasing changes the values to all 1s and programming flips individual bits to 0s.

    I would suggest loading your table into RAM. This way the CPU can update the value, or you can do a debugger write to the variable/value.

    It sounds like you are still debugging and developing your system, so I suggest running at least some of the code that is being developed from RAM so that you can more quickly tune your system. Otherwise if you change a value in flash you will need to run the Flash API or recompile the program and flash it to the device with the CCS plugin.

    sal