<?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: How can i write multiple data to MC9S08SH8 flash's? in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208663#M17774</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;We ALL make silly mistakes from time to time.&lt;BR /&gt;This version only uses 6 bytes of ram, which on an SH with only 512 bytes of ram is meaningful.&lt;BR /&gt;You might move the flash page you are using to the 0xFC00 as your code may hit where you are writing to.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Apr 2008 22:21:50 GMT</pubDate>
    <dc:creator>JimDon</dc:creator>
    <dc:date>2008-04-01T22:21:50Z</dc:date>
    <item>
      <title>How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208656#M17767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;I've some problem to write datas to flash of the SH8. I've made this function to write one byte in to the flash on&amp;nbsp;a specified (empty)&amp;nbsp;address:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;unsigned int write_flash(unsigned int indirizzo,byte dato){&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while(!FSTAT_FCBEF);&amp;nbsp; //wait if there's another&amp;nbsp;command in progress&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(FSTAT_FACCERR)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSTAT_FACCERR = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (*((volatile unsigned char *)(indirizzo))) = dato;&amp;nbsp;&amp;nbsp;&amp;nbsp; //write dato in the location defined by indirizzo&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCMD = 0x20;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // write byte command&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FSTAT_FCBEF = 1; //Send Command&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _asm NOP;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Wait 4 cycles&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _asm NOP;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _asm NOP;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _asm NOP;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _asm NOP;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(!FSTAT_FCCF);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(indirizzo);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return indirizzo to verify&amp;nbsp;if the write location is correct&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In the main program I want to made a firmware to&amp;nbsp;write once the&amp;nbsp;flash to store some important data like firmware version and some costant, that are useful for&amp;nbsp;the execution of the&amp;nbsp;main alghoritm and&amp;nbsp;then&amp;nbsp;I want to protect this data forever.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG style="text-decoration: underline;"&gt;My problem is that: when i call multiple times the write flash function, only the firts call work fine.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Example:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;SPAN style="font-family: 'Courier New';"&gt;address = write_flash(0xEA01,0x10); //this instruction produce the&amp;nbsp;wanted&amp;nbsp;effect&lt;BR /&gt;&amp;nbsp;address = write_flash(0xEA02,0x01);&amp;nbsp;// this instruction doesn't work&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;address = write_flash(0xEA03,0x03);&amp;nbsp;//&amp;nbsp;and also this doesb't work&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG style="text-decoration: underline;"&gt;How can&amp;nbsp;I write multiple&amp;nbsp;locations&amp;nbsp;of the flash in sequence, for instance with a for cycle.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thak for your help,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Walter&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 19:59:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208656#M17767</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2008-04-01T19:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208657#M17768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Are you executing the code from RAM? You can only run the flash code from RAM.&lt;BR /&gt;Do have interrupts disabled? If not your code could be crashing after the first write.&lt;BR /&gt;&lt;BR /&gt;Once things are right, your code should work.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=9610&amp;amp;query.id=27140#M9610" target="_blank"&gt;Here is one of many threads that shows how to do this.&lt;/A&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 20:21:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208657#M17768</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-04-01T20:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208658#M17769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;But when the code is executed it isn't executed from RAM normally?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;this i how I call the function in the main program:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void main(void) {&amp;nbsp;&lt;BR /&gt;&amp;nbsp; MCU_init(); /* call Device Initialization */&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; address = write_flash(0xEA01,0x10);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; address = write_flash(0xEA02,0x01);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; [...]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Actually I don't use any interrupt in the code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 20:33:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208658#M17769</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2008-04-01T20:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208659#M17770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;Brodek wrote:&lt;BR /&gt;&lt;DIV&gt;But when the code is executed it isn't executed from RAM normally?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;Code is exectued from where ever the program counter is set to, but normally all your code is located in flash and there is where the program counter is set to.&amp;nbsp; With the code Jim has in the above link he places the code that must be run from RAM in the array PGM.&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;HR /&gt;Brodek wrote:&lt;BR /&gt;&lt;DIV&gt;void main(void) {&amp;nbsp;&lt;BR /&gt;&amp;nbsp; MCU_init(); /* call Device Initialization */&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; address = write_flash(0xEA01,0x10);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; address = write_flash(0xEA02,0x01);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; [...]&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;};&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;HR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;Your code can not be called this way, Jim's code can because the crucial part is placed in RAM.&amp;nbsp; When erasing/writing to flash you can not execute code out of flash.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 20:56:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208659#M17770</guid>
      <dc:creator>allawtterb</dc:creator>
      <dc:date>2008-04-01T20:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208660#M17771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Ok! Now, I've followed your suggestions and I've tried to write in RAM the critical part of code like in the JimD example. The result is this:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;DIV class="text_smallest"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="text_smallest"&gt;[variable declaration, library call, ....]&lt;/DIV&gt;&lt;PRE&gt;volatile unsigned char PGM[6]  = {  0xf7,      // sta ,X FSTAT  0x44,      // lsra -  delay and convert to FCCF bit0xf5,      // Bit ,X       FSTAT0x27,0xfd, // BEQ *-10x81       // RTS}; byte Flash_Erase_Page(word page) {       asm {            TPA         ; Get status to A            PSHA        ; Save current status              SEI         ; Disable interrupts            LDA  #0x30            STA  FSTAT  ; Clear FACCERR &amp;amp; FPVIOL flags            LDHX  page            STA ,X      ; Save the data            LDA  #$40   ; Erase command            STA  FCMD            LDA  #FSTAT_FCBEF_MASK      LDHX @FSTAT             JSR  PGM           PULA        ; Restore previous status            TAP         }           return (FSTAT &amp;amp; 0x30);  }byte Flash_Program_Byte(word address, byte data) {        asm{            TPA              PSHA        ; Save current status              SEI         ; Disable interrupts            LDA  #0x30            STA  FSTAT  ; Clear FACCERR &amp;amp; FPVIOL flags            LDHX  address            LDA  data            STA ,X      ; Save the data            LDA  #$20   ; Burn command            STA  FCMD            LDA  #FSTAT_FCBEF_MASK            LDHX @FSTAT             JSR   PGM            PULA        ; Restore previous status            TAP         }            return (FSTAT &amp;amp; 0x30);  } void MCU_init(void); /* Device initialization function declaration */void main(void) {MCU_init(); /* call Device Initialization */  (void) Flash_Erase_Page(0xEA00);(void) Flash_Program_Byte(0xEA00,0x01);        (void) Flash_Program_Byte(0xEA01,0x02);(void) Flash_Program_Byte(0xEA02,0x03);&lt;/PRE&gt;&lt;PRE&gt;[......]&lt;/PRE&gt;&lt;PRE&gt;};    &lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;So i write the firmware on the SH8 and tried to run the code with debugger step-to-step and also in one shot, but after the execution if i watch the flash memory at the specified address nothing was writed\erased.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank for your precious help.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Walter&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 21:31:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208660#M17771</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2008-04-01T21:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208661#M17772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;How do you know it did not work?&lt;BR /&gt;TrueTime will not update you view of memory when it is flash unless you set&amp;nbsp; "re-fresh memory when halting " in the "Debugging Memory Map" for that block. Also check "no memory access when running".&lt;BR /&gt;&lt;BR /&gt;The "Debugging Memory Map" dialog is Main&amp;nbsp; Menu, 4th item from the left.&lt;BR /&gt;&lt;BR /&gt;The debugger normally has no reason the re-read flash since it never changes.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 21:42:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208661#M17772</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-04-01T21:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208662#M17773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I always do "refresh" of mem manually after a breakpoint, but the problem was that I&amp;nbsp;called write function before MCU&amp;nbsp; init function....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now I've call the function after MCU_init and it's working!!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank a lot for your help my saver!!! &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Walter&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Ps:&amp;nbsp;I'm very&amp;nbsp;for my poor english and for my stupid error!&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 22:00:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208662#M17773</guid>
      <dc:creator>Brodek</dc:creator>
      <dc:date>2008-04-01T22:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208663#M17774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;We ALL make silly mistakes from time to time.&lt;BR /&gt;This version only uses 6 bytes of ram, which on an SH with only 512 bytes of ram is meaningful.&lt;BR /&gt;You might move the flash page you are using to the 0xFC00 as your code may hit where you are writing to.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Apr 2008 22:21:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208663#M17774</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-04-01T22:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can i write multiple data to MC9S08SH8 flash's?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208664#M17775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for that code Brodek. Was hurting my head for a while, so many other people have the same problem. Then you realise you have to run from RAM, and setting that up is a headache with pragmas and memory mapping and etc; and then you discover a cool use of the volatile keyword, and a few bytes of handy code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;P&gt;:smileyhappy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 15:57:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-can-i-write-multiple-data-to-MC9S08SH8-flash-s/m-p/208664#M17775</guid>
      <dc:creator>lumenshroom</dc:creator>
      <dc:date>2009-05-02T15:57:48Z</dc:date>
    </item>
  </channel>
</rss>

