<?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 Can't erase 9S12C32 flash in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Can-t-erase-9S12C32-flash/m-p/134299#M2031</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;I've got a handful of prototypes that I'm having trouble with (well, actually, all of my prototypes, not just a handful out of a larger group). The major problem is this: at a seemingly random point in the cycles of assemble-program-debug I will lose the ability to erase the flash and program new code into a device. I use the P&amp;amp;E Micro PKG12Z set of tools; our project is written in assembly, and I'm using the P&amp;amp;E USB Multilink to connect to the BDM port. The error shows up when I do a blank check after an erase within PROG12Z: the erase does not report an error, but the blank check does. Once a device reports this failure to erase, I can't do any further erasure or programming.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some random facts about the situation in the hopes that this will stimulate someone's memory:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- We're using a 4 MHz crystal, and once our application code gets going it multiplies this up to 24 MHz (in a 25 MHz part), using SYNR=5 and REFDV=0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- I've set FCLKDIV to 19, which I believe causes the flash oscillator to run at 4000000/(19+1)=200 kHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- We initialize location FF0D to 02 in the download image, which should mean that FPROT comes up with FF (unprotected). Later, after we examine a jumper to determine if a firmware update is requested, we write once to FPROT with the value $DA, which should protect the lower 2k and upper 16k of our flash image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Location FF0F has 02 in the download image, which should initialize FSEC to unsecured state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Running P&amp;amp;E's Usecure 12 tells me that FSEC=02 at the start, it does something, then FSEC=02 at the end, try talking to it. I can talk to it afterwards, but erasing still fails as described above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- The prototypes may have been run with FCLKDIV set to 18 for a while, but I don't think that flash was erased or programmed from within the firmware on more than one or two of the four.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help or suggestions you may have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kurt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 May 2006 02:13:04 GMT</pubDate>
    <dc:creator>usdkurt</dc:creator>
    <dc:date>2006-05-02T02:13:04Z</dc:date>
    <item>
      <title>Can't erase 9S12C32 flash</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Can-t-erase-9S12C32-flash/m-p/134299#M2031</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;I've got a handful of prototypes that I'm having trouble with (well, actually, all of my prototypes, not just a handful out of a larger group). The major problem is this: at a seemingly random point in the cycles of assemble-program-debug I will lose the ability to erase the flash and program new code into a device. I use the P&amp;amp;E Micro PKG12Z set of tools; our project is written in assembly, and I'm using the P&amp;amp;E USB Multilink to connect to the BDM port. The error shows up when I do a blank check after an erase within PROG12Z: the erase does not report an error, but the blank check does. Once a device reports this failure to erase, I can't do any further erasure or programming.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some random facts about the situation in the hopes that this will stimulate someone's memory:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- We're using a 4 MHz crystal, and once our application code gets going it multiplies this up to 24 MHz (in a 25 MHz part), using SYNR=5 and REFDV=0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- I've set FCLKDIV to 19, which I believe causes the flash oscillator to run at 4000000/(19+1)=200 kHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- We initialize location FF0D to 02 in the download image, which should mean that FPROT comes up with FF (unprotected). Later, after we examine a jumper to determine if a firmware update is requested, we write once to FPROT with the value $DA, which should protect the lower 2k and upper 16k of our flash image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Location FF0F has 02 in the download image, which should initialize FSEC to unsecured state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Running P&amp;amp;E's Usecure 12 tells me that FSEC=02 at the start, it does something, then FSEC=02 at the end, try talking to it. I can talk to it afterwards, but erasing still fails as described above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-- The prototypes may have been run with FCLKDIV set to 18 for a while, but I don't think that flash was erased or programmed from within the firmware on more than one or two of the four.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help or suggestions you may have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kurt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2006 02:13:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Can-t-erase-9S12C32-flash/m-p/134299#M2031</guid>
      <dc:creator>usdkurt</dc:creator>
      <dc:date>2006-05-02T02:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can't erase 9S12C32 flash</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Can-t-erase-9S12C32-flash/m-p/134300#M2032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello Kurt,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It's possible your MCU has been accenditally &lt;STRONG&gt;secured&lt;/STRONG&gt; during your manipulations.&lt;/DIV&gt;&lt;DIV&gt;You can have a look at the&amp;nbsp;message &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&amp;amp;message.id=904" target="_blank"&gt;&lt;FONT color="#000000"&gt;Re: Escape from Security Mode in 9S12DG256&lt;/FONT&gt;&lt;/A&gt;&lt;IMG alt="" border="0" src="http://forums.freescale.com/freescale/i/skins/freescale/subject_has_attachment.gif" /&gt;&amp;nbsp;&amp;nbsp;where an Unsecure command file is available.&lt;BR /&gt;&lt;BR /&gt;Alvin.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2006 04:58:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Can-t-erase-9S12C32-flash/m-p/134300#M2032</guid>
      <dc:creator>Nabla69</dc:creator>
      <dc:date>2006-05-02T04:58:56Z</dc:date>
    </item>
  </channel>
</rss>

