<?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>S12 / MagniV Microcontrollers中的主题 Re: Partitioning D-Flash MC9S12XE</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170775#M5712</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for teh code snippet.&amp;nbsp; My code base is quite similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;20 boards or so have been manufactured.&amp;nbsp; They all run the same code.&amp;nbsp; One of the 20 has d-flash/eee Prom/emulation enable problem, the other 19 do not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's looking like a defective part or manufacturing process defect/error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to force the micro back to a factory default state?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there other registers that can be interrogated for fault status?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2012 22:09:40 GMT</pubDate>
    <dc:creator>timcuff</dc:creator>
    <dc:date>2012-06-08T22:09:40Z</dc:date>
    <item>
      <title>Partitioning D-Flash MC9S12XE</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170773#M5710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having trouble with D-Flash on a&amp;nbsp; mc9s12xeq512caa .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a manufacturer build up the board, load an initial program (with a boot loader), test the boards and then pot the boards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bootloader is responsible to partition D-Flash the first time the board runs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The bootloader code is robust and has been proven to function on other similar hardware designs (similar because they also use the 9s12xe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting a mix of board from the manufacturer that have had d-flash properly partitioned and some that seem to have incorrect partitioning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When a board has had its d-flash&amp;nbsp;properly partitioned, I can enable RAM emulation, and the d-flash/ram emulation works as I expect it to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Boards that are not working cannot enable RAM emulation and do not retain their values through a power-cycle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am conjecturing it is a problem with partitioning because when I executed a d-flash query, DFPART = 0xffff and ERPART = 0xFFFF .&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I detect that DFPART and ERPART both equal 0xffff, I&amp;nbsp;attempted to issue the partition command (0x20).&amp;nbsp; This command indicates a failure&amp;nbsp;- it returns with a status of 3 (MSGSTAT1 and MSGSTAT0 both equal 0).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have examined the contents of D-Flash, and it looks like it's all 0xffff 's .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not running with a debugger connected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions are :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Are there any suggestions on how to diagnose faults or errors associated with d-flash?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Is there a way, using software, to reset the board to a factory default state so I can attempt to issue the partition commands with the hardware in the factory default state?&amp;nbsp; (the boards are potted, so there is no way to connect a debugger).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 19:03:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170773#M5710</guid>
      <dc:creator>timcuff</dc:creator>
      <dc:date>2012-06-08T19:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Partitioning D-Flash MC9S12XE</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170774#M5711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure you are executing flash partitioning properly? Already partitioned part can be repartitioned only in special mode, which is possible only having BDM debugger.&amp;nbsp;But DFPART = 0xffff and ERPART = 0xFFFF indicate that EEPROM is not yet partitioned and it should be possible to repartition it. Make sure DFLASH is not write protected.&lt;/P&gt;&lt;P&gt;For reference you may try this code, which worked well for me&lt;/P&gt;&lt;PRE&gt;   FSTAT = FSTAT_ACCERR_MASK | FSTAT_FPVIOL_MASK;   FCCOBIX = 0;   FCCOB   = 0x1500;  // EEPROM QUERY   FSTAT &amp;amp;= FSTAT_CCIF_MASK;      while(!(FSTAT &amp;amp; FSTAT_CCIF_MASK))   {   }   FCCOBIX = 2;   if(FCCOB == 0xFFFF) // Is it not partitioned already?   {      FSTAT = FSTAT_ACCERR_MASK | FSTAT_FPVIOL_MASK;      FCCOBIX = 0;      FCCOB   = 0x2000; // partition      FCCOBIX++;      FCCOB   = 0; //dfprt      FCCOBIX++;      FCCOB   = 1; //epart      FSTAT &amp;amp;= FSTAT_CCIF_MASK;         while(!(FSTAT &amp;amp; FSTAT_CCIF_MASK))      {      }   }   FSTAT = FSTAT_ACCERR_MASK | FSTAT_FPVIOL_MASK;   FCCOBIX = 0;   FCCOB   = 0x1300; // enable emulation   FSTAT &amp;amp;= FSTAT_CCIF_MASK;      while(!(FSTAT &amp;amp; FSTAT_CCIF_MASK))   {   }&lt;/PRE&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:19:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170774#M5711</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2020-10-29T09:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Partitioning D-Flash MC9S12XE</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170775#M5712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for teh code snippet.&amp;nbsp; My code base is quite similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;20 boards or so have been manufactured.&amp;nbsp; They all run the same code.&amp;nbsp; One of the 20 has d-flash/eee Prom/emulation enable problem, the other 19 do not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's looking like a defective part or manufacturing process defect/error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to force the micro back to a factory default state?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there other registers that can be interrogated for fault status?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 22:09:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170775#M5712</guid>
      <dc:creator>timcuff</dc:creator>
      <dc:date>2012-06-08T22:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Partitioning D-Flash MC9S12XE</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170776#M5713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure D-flash is blank. Try erasing it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This command indicates a failure&amp;nbsp;- it returns with a status of 3 (MSGSTAT1 and MSGSTAT0 both equal 0&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What does status=3 mean if MSGSTATx are 0? Also what about ACCERR bit? Non zero MSGSTAT would indicate that Dflash is improperly programmed, so that ECC errors are encountered. Erase of whole D-flash should help.&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>Sat, 09 Jun 2012 14:07:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170776#M5713</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-06-09T14:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Partitioning D-Flash MC9S12XE</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170777#M5714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had some problems with Partitioning D-Flash on S12XEt256 devices. Eventually it was connected with Processor Expert issue.&lt;/P&gt;&lt;P&gt;As I understand you don't use PE's code but anyway maybe this will be of some help for you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/104674#104674" title="https://community.freescale.com/message/104674#104674"&gt;https://community.freescale.com/message/104674#104674&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 18:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Partitioning-D-Flash-MC9S12XE/m-p/170777#M5714</guid>
      <dc:creator>mroczeks</dc:creator>
      <dc:date>2012-07-06T18:47:39Z</dc:date>
    </item>
  </channel>
</rss>

