<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MC9S08LC60 Flash Emulation on SofTec demo board in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166727#M4952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try searching on 'flash programming'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2010 09:02:07 GMT</pubDate>
    <dc:creator>J2MEJediMaster</dc:creator>
    <dc:date>2010-01-13T09:02:07Z</dc:date>
    <item>
      <title>Flash Emulation on SofTec DEMO9S08LC60 development board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166723#M4948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I will start out by saying that I am extremely frustrated in trying to decipher the application notes for the flash emulation. I understand none of it as it seems to be written for someone that already should know how to do it. Typically, I would take over the C programming for a computer that had this stuff already written by a developer. So I have to say I am over my head.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Already figuring out some of the stuff with the keyboard interrupts and real time clock, I am trying to figure out how to write and store variables to the flash. Does someone have some C examples of how to initialize the flash and some read/write examples? I am currently using the Softec demo board for some testing.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Pyretta on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2010-01-12&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:47 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Pyretta on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2010-01-12&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:55 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 20:45:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166723#M4948</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-12T20:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08LC60 Flash Emulation on SofTec demo board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166724#M4949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are app notes on the topic, and the question gets asked many times in the forums. Use the search box at the lower left of this web page and usr it to search on "flash programming" or similar phrases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 20:55:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166724#M4949</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2010-01-12T20:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08LC60 Flash Emulation on SofTec demo board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166725#M4950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom, I have searched and found nothing that did not lead into the "Read the app note" about the topic. I have read it, several times and it is like Mandarin Chinese to me. Before coming here, I searched on Google since most of the responses here seem to just point people to application notes. If they were more clear with some examples using the demo9s08lc60, I think many issues would be solved before they were even asked. Something simple as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;Initialize flash to emulate an EEPROM&amp;gt; with this block of code.&lt;/P&gt;&lt;P&gt;&amp;lt;To write to this emulated EEPROM&amp;gt; use this function&lt;/P&gt;&lt;P&gt;&amp;lt;To read this emulated EEPROM&amp;gt; use this function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is easy to look back when you are a master of something and say how easy and simple the application note is but when you have no idea what they are talking about, it is extremely difficult to understand.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 22:08:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166725#M4950</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-12T22:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08LC60 Flash Emulation on SofTec demo board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166726#M4951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;And searching for eeprom flash mc9s08lc60 brings up 1 result, my question.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2010 22:28:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166726#M4951</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-12T22:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08LC60 Flash Emulation on SofTec demo board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166727#M4952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try searching on 'flash programming'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 09:02:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166727#M4952</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2010-01-13T09:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Emulation on SofTec DEMO9S08LC60 development board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166728#M4953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I have read 5 pages deeps all of the search results for flash programming and I see people talking about loading programs into flash, loading a program into flash and leaving the eeprom as is, and whatnot, I do not see any results on how to specifically use EEPROM emulation for the double flash array for the address range 0x1870 - 0x286F like in application note AN3404.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 19:48:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166728#M4953</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-13T19:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Emulation on SofTec DEMO9S08LC60 development board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166729#M4954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the exact reason I told my co-worker I did not want to post a question to the forums because ultimately, the forum model has stopped working years ago. I stopped going to forums 5 years ago because people refuse to help newbies and constantly say use the search tool. This is not my first week on the internet, I have used the search tool for 2 days before I decided to create a post. There is 1 post on the forum that talks about AN3404 and mine would be the second one. For the life of me, I do not understand why I cannot just get a simple answer on how to program, in C, an emulated EEPROM in the dual flash array. For 4 days I have been searching for an answer and I have found nothing that will help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assure you, I am not just being lazy and not searching. If I could have found the answer to my question and avoided all of my agrevation I would have.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 20:15:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166729#M4954</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-13T20:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Emulation on SofTec DEMO9S08LC60 development board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166730#M4955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand your frustration. The Freescale site is not the most easy thing to search. However, understand where I am coming from. The question on how to program Flash/EEPROM keeps coming up constantly over the years. From the huge amount of search results that you saw, we keep trying to answer them. Sometimes the response is to point to another forum thread, where the problem has been discussed--and solved--before. That is the tack I took here. I have also taken some of the more gnarly flash questions (such as how to add a serial number to the flash image) and made FAQs out of them (FAQ-28651), in an attempt to have answers on hand for such real-world issues. I have been doing this--by strange coincidence--for the past five years or so to help people find a flash programming solution quickly, and get their project going.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there FAQ or forum post that has C code to program an emulated EEPROM using the dual flash array in a S08 part? No. Is there enough information available to cobble something together for your part? Probably, and I will admit the information is scattered all over the place. Or, maybe one of the flash programming experts (which I am not) will weigh in with a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Having said all of that, let me try to run some of that information down for you. Here are some fourm threads:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Serial EEPROM operation&lt;BR /&gt;Look for the link to S08_Flash.c -- whoops, it's a C wrapper around assembly, but it works.&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&amp;amp;message.id=5727&amp;amp;query.id=10033#M5727" target="_self"&gt;http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&amp;amp;message.id=5727&amp;amp;query.id=10033#M5727&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Re: Flash programming using uProg1flash and uErasePages / 9S08QG8&lt;BR /&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;thread.id=13469" target="_self"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;thread.id=13469&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Flash programming EEPROM emulation&lt;BR /&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=4147&amp;amp;query.id=10191#M4147" target="_self"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=4147&amp;amp;query.id=10191#M4147&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;EEPROM emulation on QY4 in C&lt;BR /&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=6744&amp;amp;query.id=10191#M6744" target="_self"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=6744&amp;amp;query.id=10191#M6744&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Eeprom emulation on QG8 fails&lt;BR /&gt;Look for the link to QG8_Flash_6.zip, which uses C. Use the main.c file, and not all of the duplicate copies of main.c in that archive.&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=8718&amp;amp;query.id=10227#M8718" target="_self"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=8718&amp;amp;query.id=10227#M8718&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Download AN2295SW.zip -- Has bootloader code (which means write-to-flash routines) for almost every HCS08/RS08 part out there. Mostly in C, although is uses some macros that have assembly in them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by J2MEJediMaster on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2010-01-13&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:43 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 23:36:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166730#M4955</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2010-01-13T23:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Emulation on SofTec DEMO9S08LC60 development board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166731#M4956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for your response Tom. We just got the LC60_eeprom.zip file from the support folks and we will try to piece some of that in to make it work.&amp;nbsp;Hopefully this will be enough information now to jump this hurdle!&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 23:42:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166731#M4956</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-13T23:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Emulation on SofTec DEMO9S08LC60 development board</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166732#M4957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was also able to get the application note software zip file AN3404sw.zip which was extremely helpful. I have just a few questions that kind of confuse me when looking at the code compared to what they are saying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation says that we simply cannot write a value to 0x1870 and then rewrite a different value to the 0x1870 address without first erasing the page of flash that contains the 0x1870 range (512 bytes). I&amp;nbsp; would assume that if we had all 512 locations written to that we would want to save&amp;nbsp;that we would have to store the whole page in RAM and then re-write everything except for the address that has to change?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Section 3.3 on application note AN3404 states that &lt;EM&gt;&lt;FONT color="#000000"&gt;"0x1870 - 0x286f address range is used for data storage, divided into eight blocks of 512 bytes. Each block is separated into small blocks of eight bytes because it is the quantity of characters received from SCI."&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Looking at the code, I do not see where it is limiting to 0x268f and I thought that we could go to 0x7FFF. I do see the following code in the software main.c&lt;/P&gt;&lt;P&gt;// Unsecured status flash&lt;BR /&gt;const unsigned char flash_security&amp;nbsp; @0xFFBF = 0xFE;&amp;nbsp;&lt;BR /&gt;const unsigned char NVPROT_Data @0xFFBD = 0x7E;&amp;nbsp;&lt;BR /&gt;const unsigned char EEPAdrs @0x1870;&lt;BR /&gt;const unsigned char EEPAdrsEnd @0x1890;&amp;nbsp; &lt;FONT color="#000000"&gt;&amp;lt;----- This confuses me&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I am not too sure why it has EEPAdrsEnd set to 0x1890. The code says that if it reaches 0x1891 that it should erase the page using function NVM_Erase_Page&amp;nbsp;and start over with 0x1870. When it erased the page, will it erase 0x1870 through 0x1D82 or does it just erase from 0x1870 through 0x1890? My initial thought is that they just used 0x1890 to show how it works and I would&amp;nbsp;like to just get a little clarification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are&amp;nbsp;the only few questions that I have at this time as I am still tinkering with this code to familiarize myself and hopefully enter into a more comfortable application programming environment!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 22:40:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Flash-Emulation-on-SofTec-DEMO9S08LC60-development-board/m-p/166732#M4957</guid>
      <dc:creator>Pyretta</dc:creator>
      <dc:date>2010-01-14T22:40:10Z</dc:date>
    </item>
  </channel>
</rss>

