<?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: Not able to use Flash for buring data (as ROM) in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206883#M17465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Jim,&lt;BR /&gt;&lt;BR /&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; Thanks a ton. Yes I&amp;nbsp; made sure about that, was about ~192Khz.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Mar 2008 21:06:26 GMT</pubDate>
    <dc:creator>R_D</dc:creator>
    <dc:date>2008-03-29T21:06:26Z</dc:date>
    <item>
      <title>Not able to use Flash for buring data (as ROM)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206878#M17460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I am using MC9S08AW16, trying to burn the flash region with some data to use it as ROM, i used the program given in the HCS08_Peripherals_Module_Quick_Reference_Users_Guide, that program does not work and not able to understand the algorithm given in the data sheet. especially about using FCBEF ( Write 1 to FCBEF to launch command and clear FCBEF). In the full chip simulation it says using unintialliatized location, when programmed is on the chip, only first location is burnt with data other locations are not burnt. Also when I enable channel interrupts in the program and use full chip simulation, interrupt does not occur. But works properly when program is in the chip.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code in the reference material:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Array of opcode instructions of the Erase/Program function&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//Element 0x14 of the array is: (command 0x20 to program a byte, 0x40 to erase a page)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char FLASH_CMD[] {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x87,0xC6,0x18,0x25,0xA5,0x10,0x27,0x08,0xC6,0x18,0x25,0xAA,0x10,0xC7,0x18,0x25,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x9E,0xE6,0x01,0xF7,0xA6,0x20,0xC7,0x18,0x26,0x45,0x18,0x25,0xF6,0xAA,0x80,0xF7,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x9D,0x9D,0x9D,0x9D,0x45,0x18,0x25,0xF6,0xF7,0xF6,0xA5,0x30,0x27,0x04,0xA6,0xFF,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0x20,0x07,0xC6,0x18,0x25,0xA5,0x40,0x27,0xF9,0x8A,0x81};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* The opcode above represents this set of instructions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (FSTAT&amp;amp;0x10){ //Check to see if FACCERR is set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FSTAT = FSTAT | 0x10; //write a 1 to FACCERR to clear&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(*((volatile unsigned char *)(Address))) = data; //write to somewhere in flash&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FCMD = 0x20; //set command type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FSTAT = FSTAT | 0x80; //Put FCBEF at 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_asm NOP; //Wait 4 cycles&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_asm NOP;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_asm NOP;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_asm NOP;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (FSTAT&amp;amp;0x30){ //check to see if FACCERR or FVIOL are set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return 0xFF; //if so, error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while ((FSTAT&amp;amp;0x40)==0){ //else wait for command to complete&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 14:58:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206878#M17460</guid>
      <dc:creator>R_D</dc:creator>
      <dc:date>2008-03-27T14:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to use Flash for buring data (as ROM)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206879#M17461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;All I can say is "does so".&lt;BR /&gt;Assuming you have transcribed it correctly, I have used that exact code on an AW and it worked.&lt;BR /&gt;I am away from the lab right now, but later I wll post a CW project for the AW that I have tested.&lt;BR /&gt;Also search this forum, as there have been many recent threads on this subject.&lt;BR /&gt;You do realize that the code in the array must run from ram.&lt;BR /&gt;See search box at the bottom....&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Mar 2008 18:27:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206879#M17461</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-27T18:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to use Flash for buring data (as ROM)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206880#M17462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please do put the project I am stuck with it for now, operating the MCU with bus clock of ~19.9968MHz&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 01:28:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206880#M17462</guid>
      <dc:creator>R_D</dc:creator>
      <dc:date>2008-03-28T01:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to use Flash for buring data (as ROM)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206881#M17463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I will this evening, but are you sure that you are setting the flash clock correctly?&lt;BR /&gt;That could be your problem.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 01:46:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206881#M17463</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-28T01:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to use Flash for buring data (as ROM)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206882#M17464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Ok, here is a &lt;A href="http://freescalemcu.com/HCSAW16Base.zip" rel="nofollow" target="_blank"&gt;link to a&lt;/A&gt; Processor Expert project that programs flash on an AW16.&lt;BR /&gt;Since it is a processor expert project, you can easily adjust the clocks as you wish.&lt;BR /&gt;Currently the clock is set for a 16Mhz bus clock. If you connect a serial port with a terminal emulator at 9600 baud you will get a prompt - type h for help. There is also code for a serial eeprom, but ignore that.&lt;BR /&gt;Study the flash init bean, and the code in flash.c.&lt;BR /&gt;&lt;BR /&gt;If you have any questions, ask them..&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 09:12:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206882#M17464</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-28T09:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to use Flash for buring data (as ROM)</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206883#M17465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Jim,&lt;BR /&gt;&lt;BR /&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; Thanks a ton. Yes I&amp;nbsp; made sure about that, was about ~192Khz.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2008 21:06:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Not-able-to-use-Flash-for-buring-data-as-ROM/m-p/206883#M17465</guid>
      <dc:creator>R_D</dc:creator>
      <dc:date>2008-03-29T21:06:26Z</dc:date>
    </item>
  </channel>
</rss>

