c2000 how to store data in non volatile memory

4 visualizzazioni (ultimi 30 giorni)
Lorenzo
Lorenzo il 11 Set 2012
Hallo, I have a control system built into simulink scheme. The scheme is configured to download code to flash memory.
Control gains and all parameters are thus defined at compile time.
I need to update those gains and parameters with new values received via serial port (for instance) during the system operation and store them in the internal flash memory so that, even after an on/off power cycle the new parameters are used (not the old ones).
Which is the best way to store those parameters without having to recompile the scheme with the new gains?
thanks, Lorenzo
  1 Commento
Imanol Eguren
Imanol Eguren il 3 Dic 2018
Hello Lorenzo,
I know that this question is from 2012, but did you figure out a way to store the values in the non volatile memory?
I need to do the same thing, and I did not find any help...
Thank you!
Imanol

Accedi per commentare.

Risposte (2)

Venkatesh Chilapur
Venkatesh Chilapur il 3 Dic 2018
Please refer this link:
https://in.mathworks.com/matlabcentral/answers/172053-how-do-i-store-variables-to-flash-memory-of-the-c2000-f28335-controller-using-matlab

Imanol Eguren
Imanol Eguren il 3 Dic 2018
I need to update the value of the variable periodically without building the model again. If I understood the example correctly, what it does is not exactly what I need.
In the example a parameter called STEP_PARAM is created so that changing the value of it is allowed when running the example in external mode. But, for storing the value in the flash, building the model again is required.
Can a parameter like this one be updated programatically?
Thank you,
Imanol
  1 Commento
Venkatesh Chilapur
Venkatesh Chilapur il 4 Dic 2018
Hi Imanol,
We currently do not support writing parameters to flash programatically. The description from Antonin in the link above summarizes the same.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by