<?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: FLASH in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184459#M6903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can I set INITEE such that my current FLASH location at $4000 becomes EEPROM?&amp;nbsp; If so, what&amp;nbsp;setting for INITEE?&amp;nbsp; And&amp;nbsp;do I erase and write to it the same as I currently do to FLASH?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 20:43:40 GMT</pubDate>
    <dc:creator>jamska</dc:creator>
    <dc:date>2012-08-02T20:43:40Z</dc:date>
    <item>
      <title>FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184455#M6899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the MC9S12B128 processor, how many times can the 512 byte sector from $4000 to $41FF be erased and written before the FLASH is worn out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 06:37:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184455#M6899</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-07-31T06:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184456#M6900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See A.3.2 NVM Reliability in MC9S12B128 Device User Guide&lt;/P&gt;&lt;P&gt;It is 10000 cycles at temperatures &amp;lt; 0C, and 100000 at temps &amp;gt;&amp;nbsp;0C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 15:05:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184456#M6900</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-01T15:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184457#M6901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;100K&amp;nbsp;might not be enough cycles -- app&amp;nbsp;would hit 100,000 in 8 years.&amp;nbsp; All I really need is 512 bytes (minimum for sector erase).&amp;nbsp; This chip says it has 1K of EEPROM that triples the cycles rating, but I could not figure out where they put that 1K space.&amp;nbsp; Once I find it,&amp;nbsp;would I erase and write to it like I do to FLASH at $4000 ?&amp;nbsp; The documentation of the EEPROM seems to be the same as that for FLASH.&amp;nbsp; And I saw one reference to a FLASH cycle counter, but can't find it anywhere -- I figured it should be in the FLASH register section...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 22:40:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184457#M6901</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-01T22:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184458#M6902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;100k is indeed enough.&amp;nbsp;You have lots of sectors. Instead of using&amp;nbsp;one sector, you may use two or more sectors. You find blank sector (all 0xFF) in your set of data sectors and use it to store your data. Next time you use another blank sector. When you are out of blank sectors, you erase them all and start from scratch...&lt;/P&gt;&lt;P&gt;In case you data is N times smaller than sector size, you use one sector and divide it into records. You find blank (all FF) record and fill it, .. when all records are non blank, you erase sector. Again 100k cycles limit, but you may write up to N*100k times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's no flash cycle counter. In case you need it, you need to maintain it in your SW.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CPU local address of EEPROM is defined by INITEE register. You need to initialize it to map EEPROM to address you want. B128 device guide states that on reset INITEE is initialized with 1, which means that EEPROM is enabled and mapped to zero address. RAM is also mapped to 0, and since it is higher priority memory, EEPROM is not accessible until you remap either RAM or EEPROM to different address.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 03:20:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184458#M6902</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-02T03:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184459#M6903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can I set INITEE such that my current FLASH location at $4000 becomes EEPROM?&amp;nbsp; If so, what&amp;nbsp;setting for INITEE?&amp;nbsp; And&amp;nbsp;do I erase and write to it the same as I currently do to FLASH?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 20:43:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184459#M6903</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-02T20:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184460#M6904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;Can I set INITEE such that my current FLASH location at $4000 becomes EEPROM?&amp;nbsp; If so, what&amp;nbsp;setting for INITEE?&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Yes, INITEE = 0x41. 0x40 for address 0x4000 and 1 for EEPROM enabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;And&amp;nbsp;do I erase and write to it the same as I currently do to FLASH?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Though erase and write algorithms are similar, EEPROM uses different set of control registers (ECLKDIV instead of FCLKDIV, ESTAT instead of FSTAT, etc). Also EEPROM erase sector size is much more smaller. It is just 4 bytes. So you need to edit your flash routines to make them working with EEPROM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 01:00:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184460#M6904</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-03T01:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184461#M6905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where can I find a document on EEPROM and how to use it?&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>Fri, 03 Aug 2012 01:43:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184461#M6905</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-03T01:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184462#M6906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Complete S12B documentation is here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/microcontrollers/doc/data_sheet/9S12B128_ZIP.zip" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/files/microcontrollers/doc/data_sheet/9S12B128_ZIP.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EEPROM documentation is in B128\S12EETS1KV1.pdf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 02:03:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184462#M6906</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-03T02:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184463#M6907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will stick with FLASH, and using&amp;nbsp;your first suggestion of opening a new sector each time an old sector wears out.&amp;nbsp; The trick here is detecting when it is time to move to a new sector.&amp;nbsp; Temperatures at operation are uncontrolled (outdoor product), so the number of cycles to end of life&amp;nbsp;is variable in the range of 10,000 to 100,000 -- big range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When FLASH "wears out", what is the mechanism of failure?&amp;nbsp; Does it refuse to erase completely?&amp;nbsp; If so, is a second erase OK?&amp;nbsp; Or does it refuse to write zeroes?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whatever I design will be virtually untestable.&amp;nbsp; At 30 milliseconds per erase/write (512 bytes), it would take 50 hours to get to 100,000 cycles, and when it gets there, it might still be working, or a failure might cause the processor to fail.&amp;nbsp; I dunno.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 21:11:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184463#M6907</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-03T21:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184464#M6908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suggestion was not to change sector when flash wears out (bad idea), but write each time to different sector, so that each sector from a set of sectors is cycled +-1 the same number of times. If you need guaranteed 200k writes even at low temps with specified 10k limit, then you should use at least 200k / 10k = 20 sectors. You write to 1st sector, then write to 2nd,&amp;nbsp;etc. When you are about to write 21st sector, you erase all 20 sectors and write data to 1st sector and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When FLASH "wears out", what is the mechanism of failure?&amp;nbsp; Does it refuse to erase completely?&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;If so, is a second erase OK?&amp;nbsp; Or does it refuse to write zeroes?&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I never met this kind of failure, but I think it may&amp;nbsp;both either refuse to erase&amp;nbsp;or refuse to program some bits.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 23:41:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184464#M6908</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-03T23:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184465#M6909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your suggestion to erase a large chunk (like 8K) and incrementally write to it would work great.&amp;nbsp; However, I was not able to figure out what is needed to get an 8K erase from $4000 to $5FFF.&amp;nbsp; This is what I am doing now to erase 512 bytes from $4000:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSTAT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; staa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSTAT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movb&amp;nbsp;&amp;nbsp; #%01001111,FCLKDIV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 24.576 MHZ osc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movb&amp;nbsp;&amp;nbsp; #$3E,PPAGE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; staa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCNFG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; staa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCMD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jsr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DoOnStack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; execute FLASH command from RAM&lt;/P&gt;&lt;P&gt;What should I do to erase 8K?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 23:06:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184465#M6909</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-06T23:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184466#M6910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out -- must erase 512 bytes at a time, $4000, $4400, $4800, etc., until all is erased.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 23:18:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184466#M6910</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-06T23:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184467#M6911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you should erase 8k sector by sector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSTAT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; staa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSTAT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^^ this is wrong. Above these two commands, CBEIF is most likely set, so you are making&amp;nbsp;an attempt to launch flash command! Clear just error flags, but not CBEIF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movb&amp;nbsp;&amp;nbsp; #%01001111,FCLKDIV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 24.576 MHZ osc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^^ Is 24MHz your crystal or external oscillator clock, not bus clock? For old S12 parts (not new&amp;nbsp;like S12P), you should use your external crystal/ oscillator clock to calculate FCLKDIV.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movb&amp;nbsp;&amp;nbsp; #$3E,PPAGE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;^^ this is not necessary when you are writing to 0x4000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; staa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCNFG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$4000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldaa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #$40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; staa&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCMD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jsr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DoOnStack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; execute FLASH command from RAM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 00:29:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184467#M6911</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-07T00:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184468#M6912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK on all.&amp;nbsp; Everything now working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is&amp;nbsp;&amp;nbsp;&amp;nbsp; bclr&amp;nbsp; FSTAT,%00110000&amp;nbsp;&amp;nbsp; &amp;nbsp;what you were thinking?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;24.576 is crystal and bus clock (after PLL doubler).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PPAGE stays at 3E anyway.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is an S12P processor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 02:03:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184468#M6912</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-07T02:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184469#M6913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;24.576 is crystal and bus clock (after PLL doubler).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;you should use crystal clock to calculate FCLKDIV, not PLL and not the bus clock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S12P:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S12P" rel="nofollow" target="_blank"&gt;http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S12P&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 02:37:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184469#M6913</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-07T02:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184470#M6914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the S12P processors, can you point me to a schematic for the external filter for the PLL, and the calculation of the resistor(s) and cap(s) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 05:36:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184470#M6914</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-07T05:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184471#M6915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S12P has internal PLL filter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 11:55:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184471#M6915</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-07T11:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184472#M6916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to comment this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is&amp;nbsp;&amp;nbsp;&amp;nbsp; bclr&amp;nbsp; FSTAT,%00110000&amp;nbsp;&amp;nbsp;&amp;nbsp; what you were thinking?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is again wrong. What does BCLR? It reads byte from FSTAT (say it was 0xA0) , clears specified bits in byte (0xA0 &amp;amp; ~0x30 = 0x80), and writes result back to FSTAT. Instead of clearing error flags this is again an attempt to launch flash command. You need to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; BCLR FSTAT, #~0x30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; BCLR FSTAT, #0xCF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or just&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; MOVB&amp;nbsp; #0x30, FSTAT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 21:11:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184472#M6916</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-07T21:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: FLASH</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184473#M6917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like MOVB ... done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;End of thread.&amp;nbsp; (sad)&amp;nbsp; Thanks for all the help.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2012 21:38:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/FLASH/m-p/184473#M6917</guid>
      <dc:creator>jamska</dc:creator>
      <dc:date>2012-08-07T21:38:33Z</dc:date>
    </item>
  </channel>
</rss>

