<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Keeping your EEPROM data valid through firmware updates</title>
	<atom:link href="http://embeddedgurus.com/stack-overflow/2009/11/keeping-your-eeprom-data-valid-through-firmware-updates/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/stack-overflow/2009/11/keeping-your-eeprom-data-valid-through-firmware-updates/</link>
	<description>Thoughts on embedded systems by Nigel Jones</description>
	<lastBuildDate>Fri, 10 Feb 2012 14:37:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/11/keeping-your-eeprom-data-valid-through-firmware-updates/comment-page-1/#comment-343</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Thu, 28 Jan 2010 12:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/11/26/keeping-your-eeprom-data-valid-through-firmware-updates/#comment-343</guid>
		<description>Ashleigh:I agree with you about the checksums. I&#039;ll point out that I did say in the post that I was ignoring issues related to corruption - which is the principal job of the checksum.I don&#039;t agree with you concerning loading default values. I&#039;ve designed products where effectively halting and doing nothing is far worse than loading default values and proceeding. I do agree that it is essential that the user be informed that default values have been loaded.</description>
		<content:encoded><![CDATA[<p>Ashleigh:I agree with you about the checksums. I&#39;ll point out that I did say in the post that I was ignoring issues related to corruption &#8211; which is the principal job of the checksum.I don&#39;t agree with you concerning loading default values. I&#39;ve designed products where effectively halting and doing nothing is far worse than loading default values and proceeding. I do agree that it is essential that the user be informed that default values have been loaded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/11/keeping-your-eeprom-data-valid-through-firmware-updates/comment-page-1/#comment-342</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Thu, 28 Jan 2010 11:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/11/26/keeping-your-eeprom-data-valid-through-firmware-updates/#comment-342</guid>
		<description>John:The downgrade problem is indeed an interesting problem - and certainly one that I can&#039;t address adequately in the comments section. I&#039;ll endeavor to put together a blog posting on this in the near future.</description>
		<content:encoded><![CDATA[<p>John:The downgrade problem is indeed an interesting problem &#8211; and certainly one that I can&#39;t address adequately in the comments section. I&#39;ll endeavor to put together a blog posting on this in the near future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ashleigh</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/11/keeping-your-eeprom-data-valid-through-firmware-updates/comment-page-1/#comment-341</link>
		<dc:creator>ashleigh</dc:creator>
		<pubDate>Tue, 26 Jan 2010 02:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/11/26/keeping-your-eeprom-data-valid-through-firmware-updates/#comment-341</guid>
		<description>Another couple of suggestions:1. Add a signature to the configuration block, before the version information. The signature should be AT LEAST 32 bits, in which you store a unique code per product (keep a company wide register of signautures used). Common geeky examples are 0xFEEDBEEF, or 0xABADBABE. Then you compare the signature present against the signature expected to see if the config block is even present.2. Checksum the configuration as the last step of loading a new one - but only if the configuration is totally static and treated by the program as read-only. Store the checksum after the version, make sure its set to 0 during the load and calculate and set it when load is complete. On start up, check the  checksum.3. Never ever ever ever automatically detect bad configuration data and auto-regenerate it. I&#039;ve had a case where a former employee did this, and dodginess in the design led to about 1 in 100 cases where at power up all the settings got blown out and re-created with defaults. If defaults are to be loaded, it must always be by an explicit action - preferably in the factory.</description>
		<content:encoded><![CDATA[<p>Another couple of suggestions:1. Add a signature to the configuration block, before the version information. The signature should be AT LEAST 32 bits, in which you store a unique code per product (keep a company wide register of signautures used). Common geeky examples are 0xFEEDBEEF, or 0xABADBABE. Then you compare the signature present against the signature expected to see if the config block is even present.2. Checksum the configuration as the last step of loading a new one &#8211; but only if the configuration is totally static and treated by the program as read-only. Store the checksum after the version, make sure its set to 0 during the load and calculate and set it when load is complete. On start up, check the  checksum.3. Never ever ever ever automatically detect bad configuration data and auto-regenerate it. I&#39;ve had a case where a former employee did this, and dodginess in the design led to about 1 in 100 cases where at power up all the settings got blown out and re-created with defaults. If defaults are to be loaded, it must always be by an explicit action &#8211; preferably in the factory.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/11/keeping-your-eeprom-data-valid-through-firmware-updates/comment-page-1/#comment-340</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/11/26/keeping-your-eeprom-data-valid-through-firmware-updates/#comment-340</guid>
		<description>I came across your column via a reference from Michael Barr of Netrino.  He sparked my attention by his comment &quot;Fellow EmbeddedGurus blogger Nigel Jones is obsessed with writing efficient C code. He experiments with alternative coding constructs, carefully examining the compiler&#039;s output for each, when normal people are sleeping.&quot;  I thought I was the only one who experiments with the output of various &#039;C&#039; constructs every time I use a new compiler (or version) to determine which generate more efficient code.At my company we have been using EEPROM versioning similar to your suggestion for years.  It works very well except for the problem of customers who insist on flashing backwards to old versions of code.  Our only solution to this has been to clear EEPROM and set all values to default if an unknown version is found.  This of course has it&#039;s problems.  So many that it took management approval to make a version change.  As such we have finally resorted to clearing all EEPROM settings on manufacturing and never changing previous locations only adding new ones.  Any new values added are designed so the cleared value is either the default setting or an invalid one.  This enables us to  tell if the location has ever been set.Do you have any ways to handle this?</description>
		<content:encoded><![CDATA[<p>I came across your column via a reference from Michael Barr of Netrino.  He sparked my attention by his comment &quot;Fellow EmbeddedGurus blogger Nigel Jones is obsessed with writing efficient C code. He experiments with alternative coding constructs, carefully examining the compiler&#39;s output for each, when normal people are sleeping.&quot;  I thought I was the only one who experiments with the output of various &#39;C&#39; constructs every time I use a new compiler (or version) to determine which generate more efficient code.At my company we have been using EEPROM versioning similar to your suggestion for years.  It works very well except for the problem of customers who insist on flashing backwards to old versions of code.  Our only solution to this has been to clear EEPROM and set all values to default if an unknown version is found.  This of course has it&#39;s problems.  So many that it took management approval to make a version change.  As such we have finally resorted to clearing all EEPROM settings on manufacturing and never changing previous locations only adding new ones.  Any new values added are designed so the cleared value is either the default setting or an invalid one.  This enables us to  tell if the location has ever been set.Do you have any ways to handle this?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

