<?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: Locking an LPC55xx sometimes bricks the device in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1325008#M46186</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;Hope you are well. &lt;BR /&gt;The reason might be that the image could be corrupted during the loading with the debugger. I suggest you always keep enabled the ISP so it can be unlocked in case of SW-DAP cannot be found. If the SW-DAP and ISP cannot be used the MCU cannot be unlocked. &lt;BR /&gt;&lt;BR /&gt;I apologize for the inconvenience this is might bring you. If you have more questions do not hesitate to ask me. &lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
    <pubDate>Tue, 17 Aug 2021 23:43:29 GMT</pubDate>
    <dc:creator>Omar_Anguiano</dc:creator>
    <dc:date>2021-08-17T23:43:29Z</dc:date>
    <item>
      <title>Locking an LPC55xx sometimes bricks the device</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1322534#M46153</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we are using an LPC5526, and we wanted some sort of Code Read Protection like we are used to with for instance LPC546xx devices:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Lock the device in Production, so it can't be read over SWD or SPI/I2C etc (FlashMagic) anymore&lt;/LI&gt;&lt;LI&gt;Unlock the device, so it can be reprogrammed in Production.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So we implemented the locking mechanism, as described in&amp;nbsp;&lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC552x-How-to-write-CMPA-to-disable-debug-subdomains-from/m-p/1248237" target="_self"&gt;LPC552x: How to write CMPA to disable debug subdomains from application?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Important note: to be able to unlock, the device should not be sealed (there is no way to unlock a sealed device), so use the 'development' mode.&lt;/P&gt;&lt;P&gt;However, unlocking a device will just do that: it won't erase the device like we are used to with the LPC546xx.&lt;BR /&gt;So we added a full Flash erase before unlocking.&lt;BR /&gt;To be able to do that we implemented is in a RAM function, see&lt;LI-MESSAGE title="LPC55xx (Mass) Flash erase with IAP" uid="1312881" url="https://community.nxp.com/t5/LPC-Microcontrollers/LPC55xx-Mass-Flash-erase-with-IAP/m-p/1312881#U1312881" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now when testing this, we found that sometimes the device gets bricked:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The bootloader/application no longer runs, so we are not able to unlock anymore&lt;/LI&gt;&lt;LI&gt;The device cannot be reached:&lt;UL&gt;&lt;LI&gt;When trying to connect over SWD connection fails (SW-DAP can't even be found..., which it can when it is correctly locked)&lt;/LI&gt;&lt;LI&gt;Also FlashMagic cannot connect&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;After some testing we suspected that a connected (Segger) debugger causes this.&lt;BR /&gt;We can't explain why, but now we always disconnect the debugger (physically!) before locking/unlocking, and we no longer see bricked devices.&lt;/P&gt;&lt;P&gt;Is there some explanation for this, or another way to prevent this situation?&lt;BR /&gt;Is there a way to unbrick our products (in case SW-DAP can't be found)?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;BR /&gt;Jan Pieter de Ruiter&lt;BR /&gt;Airios&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 09:16:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1322534#M46153</guid>
      <dc:creator>janpieterderuit</dc:creator>
      <dc:date>2021-08-12T09:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Locking an LPC55xx sometimes bricks the device</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1325008#M46186</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;Hope you are well. &lt;BR /&gt;The reason might be that the image could be corrupted during the loading with the debugger. I suggest you always keep enabled the ISP so it can be unlocked in case of SW-DAP cannot be found. If the SW-DAP and ISP cannot be used the MCU cannot be unlocked. &lt;BR /&gt;&lt;BR /&gt;I apologize for the inconvenience this is might bring you. If you have more questions do not hesitate to ask me. &lt;BR /&gt;Best regards,&lt;BR /&gt;Omar&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 23:43:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1325008#M46186</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2021-08-17T23:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Locking an LPC55xx sometimes bricks the device</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1326754#M46223</link>
      <description>&lt;P&gt;Hi Omar,&lt;/P&gt;&lt;P&gt;Thanks for the confirmation.&lt;/P&gt;&lt;P&gt;The device is completely bricked, so also over ISP not reachable I guess.&lt;/P&gt;&lt;P&gt;Furthermore enabling ISP would make it possible for anyone to unlock it, and that would make it useless in our usecase.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jan Pieter de Ruiter&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 07:42:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Locking-an-LPC55xx-sometimes-bricks-the-device/m-p/1326754#M46223</guid>
      <dc:creator>janpieterderuit</dc:creator>
      <dc:date>2021-08-20T07:42:44Z</dc:date>
    </item>
  </channel>
</rss>

