<?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: Bricked MKL27Z64 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926843#M53944</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to perform mass erase using this commands:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ReadDp(IDCODE);&lt;BR /&gt; WriteDp(ABORT, 0x0000001E);&lt;BR /&gt; WriteDp(CTRL_STAT, 0x50000000);&lt;BR /&gt;ReadDp(CTRL_STAT);&lt;BR /&gt; WriteDp(SELECT, 0x01000000);&lt;BR /&gt; WriteAp(0x04, 0x00000015); // mass erase &amp;amp; system reset&lt;BR /&gt;ReadAp(0x00);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Oct 2019 08:16:10 GMT</pubDate>
    <dc:creator>dusek_martin</dc:creator>
    <dc:date>2019-10-17T08:16:10Z</dc:date>
    <item>
      <title>Bricked MKL27Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926840#M53941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I disabled reset pin in FTFA_FOPT register (RESET_PIN_CFG = 0) a then I accidentally initialized PTA0 pin (SWD_CLK) as GPIO pin quite early in MCU initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything I can do to connect/erase the MCU? MCU disables SWD_CLK approx. 1200 us after POR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use Segger J-Link.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2019 12:02:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926840#M53941</guid>
      <dc:creator>dusek_martin</dc:creator>
      <dc:date>2019-10-16T12:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Bricked MKL27Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926841#M53942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;Hi Martin, I hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to enter bootloader mode by holding the reset button when connecting the device? If you can, could try re-flashing the OpenSDA bin file?&lt;/P&gt;&lt;P&gt;To enter bootloader mode, you can follow the instructions in section 2 of the OpenSDA user guide, which can be found &lt;A href="https://www.nxp.com/docs/en/user-guide/OPENSDAUG.pdf"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is not entering bootloader mode, could you try connecting to the device using your device using JTAG?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After doing that, could you try to connect to the device with Jlink commander and running the "unlock kinetis" command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if it works for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2019 17:53:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926841#M53942</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2019-10-16T17:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Bricked MKL27Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926842#M53943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;thank you for your reply, but I'm afraid, I can't enter bootloader as it is disabled in FTFA_FOPT (boot options set). Also, my MCU doesn't have JTAG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I managed to implement basic SWD code in C and load it into another board. As reset of the target board is disabled, I reset&amp;nbsp;it by turning target's power on and off. I have success in reading IDCODE (the target MCU returns 0x0BC11477).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please instruct me how to implement halting MCU or perform mass erase using SWD (exact commands to be sent via SWD needed)? I'm trying&amp;nbsp;reading/writing SW-DP CTRL/STAT and writing SW-DP SELECT register without any success. Is there also any special timing needed? This is what I implemented:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read DP register 0x00 (IDCODE) - target returns&amp;nbsp;&lt;SPAN&gt;0x0BC11477&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Read DP register 0x04 (CTRL_STAT) - target returns 0x000000C0&lt;/P&gt;&lt;P&gt;Write DP register 0x04 (CTRL_STAT) with value 0x50000000 - the request is acknowledged with 0x4 (FAULT)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Write DP register 0x08 (SELECT) with value 0x01000000 (select MDM-AP, bank 0) - the request is acknowledged with 0x4 (FAULT)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2019 20:27:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926842#M53943</guid>
      <dc:creator>dusek_martin</dc:creator>
      <dc:date>2019-10-16T20:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bricked MKL27Z64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926843#M53944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to perform mass erase using this commands:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ReadDp(IDCODE);&lt;BR /&gt; WriteDp(ABORT, 0x0000001E);&lt;BR /&gt; WriteDp(CTRL_STAT, 0x50000000);&lt;BR /&gt;ReadDp(CTRL_STAT);&lt;BR /&gt; WriteDp(SELECT, 0x01000000);&lt;BR /&gt; WriteAp(0x04, 0x00000015); // mass erase &amp;amp; system reset&lt;BR /&gt;ReadAp(0x00);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 08:16:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Bricked-MKL27Z64/m-p/926843#M53944</guid>
      <dc:creator>dusek_martin</dc:creator>
      <dc:date>2019-10-17T08:16:10Z</dc:date>
    </item>
  </channel>
</rss>

