<?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 Programming access block in LPC54608J512BD208 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-Programming-access-block-in-LPC54608J512BD208/m-p/1306060#M45838</link>
    <description>&lt;P&gt;Hi,&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Prasanna Naik&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Regarding your question "As per my understanding, if SWD is disabled then no one can gain access of Flash of microcontroller so even mass erase won't be possible even if i keep this Mass Erase bit enable in OTP bank register.", I agree with you that you can not program the flash via SWD port once the SWD is disabled. But if you enable the mass-erase feature by clearing the "CRP_MASS_ERASE_DISABLE" bit in OTP register, in&amp;nbsp; ISP mode, the host can send the mass-erase command to erase all flash no matter the flash sectors are protected or not. You can also use IAP command to execute the mass-erase instruction.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Regardless of how many sectors are protected by this field, an erase request to erase the&lt;BR /&gt;entire flash (0 to last sector) will always be completed successfully if the Mass Erase disable bit in the&lt;BR /&gt;OTP is not programmed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;In other words, you can operate flash with n3 methods, one is to execute command&amp;nbsp; via SWD, the second is that host send mass-erase command in ISP mode, the third is application code executes IAP command. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 09:14:37 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2021-07-12T09:14:37Z</dc:date>
    <item>
      <title>Flash Programming access block in LPC54608J512BD208</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-Programming-access-block-in-LPC54608J512BD208/m-p/1305119#M45810</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using LPC54608J512BD208in my design.&lt;/P&gt;&lt;P&gt;We want to restrict access to flash memory from SWD interface once the controller has been programmed.&lt;/P&gt;&lt;P&gt;I need confirmation on following queries:&lt;/P&gt;&lt;P&gt;1) While going through chapter 42 -&amp;nbsp; Enhanced Code Read Protection of User manual, I found that it is possible to disable the SWD interface.&lt;/P&gt;&lt;P&gt;But there is a line "&lt;STRONG&gt;When Mass Erase is enabled, the Debug Mailbox is also enabled and allows a debugger to&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;communicate with the bootloader to execute a Mass Erase. The Debug Mailbox is disabled if Mass Erase&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;is disabled&lt;/STRONG&gt;".&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per my understanding, if SWD is disabled then no one can gain access of Flash of microcontroller so even mass erase won't be possible even if i keep this Mass Erase bit enable in OTP bank register.&lt;/P&gt;&lt;P&gt;2) Also, i want to program the controller through my secondary bootloader (based on UART) so i am not disabling the IAP write/erase feature. Is there anything else i need if i disable SWD interface?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; best regards,&lt;/P&gt;&lt;P&gt;Prasanna Naik&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 02:57:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-Programming-access-block-in-LPC54608J512BD208/m-p/1305119#M45810</guid>
      <dc:creator>prasannanaik</dc:creator>
      <dc:date>2021-07-09T02:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Flash Programming access block in LPC54608J512BD208</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-Programming-access-block-in-LPC54608J512BD208/m-p/1306060#M45838</link>
      <description>&lt;P&gt;Hi,&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Prasanna Naik&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Regarding your question "As per my understanding, if SWD is disabled then no one can gain access of Flash of microcontroller so even mass erase won't be possible even if i keep this Mass Erase bit enable in OTP bank register.", I agree with you that you can not program the flash via SWD port once the SWD is disabled. But if you enable the mass-erase feature by clearing the "CRP_MASS_ERASE_DISABLE" bit in OTP register, in&amp;nbsp; ISP mode, the host can send the mass-erase command to erase all flash no matter the flash sectors are protected or not. You can also use IAP command to execute the mass-erase instruction.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Regardless of how many sectors are protected by this field, an erase request to erase the&lt;BR /&gt;entire flash (0 to last sector) will always be completed successfully if the Mass Erase disable bit in the&lt;BR /&gt;OTP is not programmed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;In other words, you can operate flash with n3 methods, one is to execute command&amp;nbsp; via SWD, the second is that host send mass-erase command in ISP mode, the third is application code executes IAP command. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;Hope it can help you&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;BR&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="test-id__field-value slds-form-element__static slds-grow word-break-ie11"&gt;XiangJun Rong&lt;/SPAN&gt;&lt;/P&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;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 09:14:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-Programming-access-block-in-LPC54608J512BD208/m-p/1306060#M45838</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2021-07-12T09:14:37Z</dc:date>
    </item>
  </channel>
</rss>

