cancel
Showing results for 
Search instead for 
Did you mean: 

Storing some calibration data in FLASH memory

psilvaggio
Associate III
Posted on April 17, 2013 at 22:35

Hello,

I'm looking into storing some calibration data for my application into FLASH memory since my EEPROM space is very valuable and I cannot spare any of it. The cal data would only be written once (upon the first powerup of the device) and from then on would be read everytime on powerup.

What is a good way of doing this sort of thing? Can I ''reserve'' some FLASH so that the compiler doesn't use that particular location(s) for the main program?

Thanks
2 REPLIES 2
sia
Associate II
Posted on May 07, 2013 at 01:07

Yes, you can 'reserve' memory for your calibration data storage in the FLASH area. You should know in advance the size of your calibration data structure and I recommend to reserve the memory address at the bottom of the 32K flash area (32K-Calibration Data Size). You should make sure that your compiled code does not exceed 32K-Calibration Data Size. The compiled code is stored in sequence, therefore it does not utilize the last bytes unless your compiled code gets big enough to utilize it.

Martin Davey
Associate III
Posted on May 15, 2013 at 17:11

Hi,

Check out the peripheral libraries, there is an example in there.

Martin.