I have three floats that I want to store in non volatile memory. Not sure how to go about this though.
First question is how do I decide where in flash to store these values. I am running my code in flash so I looked at the *.map file and I can see I don use anything above 0x00005000 so I thought just to be safe I could stick them up at 0x1FFF0000 but I'm not sure.
The next question is how do I retrieve them? Could I say
float *flt1, *flt2, *flt3;
flt1 = 0x1FFF0000;
flt2 = 0x1FFF0004;
flt3 = 0x1FFF0008;
and then use the stellarisware FlashProgram function to write to the location? That doesn't work so I'm assuming no. I'm just not familiar enough with C or the chip to figure this out at the moment. I've attached my *.map file in case it may be useful in answering my question.
To start off, which product (part number) are you using? If you are using Tempest, you might want to consider the use of an external flash to avoid flash corruption. What is your application of this, and how often do you plan on writing to these locations? If possible, it might be easier and better to just use RAM.
You are going about it the correct way of merely analyzing the map file, but it is not showing up, so can you reattach it? On assigning locations, if you are using IAR or CCS, you can refer to section B.3 of this document http://www.ti.com/lit/slau157, or this forum post http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/180401/650040.aspx#650040.
I am tuning PID parameters with an external C# application over the UART. I could just find the right parameters and then hard code them I suppose but this felt more flexible. Device is the LM3S9B96 on the DK-LM3S9B96 which has an external EEPROM but this seemed easier. I found an appnote for a software EEPROM using flash which I thought I had working but it seems it only worked the first time. I still haven't got it figured out yet I guess.
How exactly are you reading from and writing to the flash?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.