<?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: CRP1 Not Protecting Sector-0 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/CRP1-Not-Protecting-Sector-0/m-p/639901#M25305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="289161" data-username="mattferrari" href="https://community.nxp.com/people/mattferrari"&gt;Matt Ferrari&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Thank you for interest in NXP Semiconductor products and the opportunity to serve you.&lt;/P&gt;&lt;P&gt;I've found that you had created some threads about the question, and I'll reply the in the thread &lt;A href="https://community.nxp.com/thread/436969"&gt;Does USB Bootloading in CRP1 always erase all Flash?&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;However other thread will be closed later.&lt;/P&gt;&lt;P&gt;Thanks for your understanding.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Oct 2016 01:18:44 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-10-20T01:18:44Z</dc:date>
    <item>
      <title>CRP1 Not Protecting Sector-0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CRP1-Not-Protecting-Sector-0/m-p/639900#M25304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm hoping to get some help understanding why I am unable to get CPR1 to protect Sector-0 on my LPC11U68. &amp;nbsp;Any help will be greatly appreciated. &amp;nbsp; I am interfacing my target hardware directly to my PC via the USB Bootloader. &amp;nbsp;I am using LPCXpresso to generate my .axf &amp;amp; .bin files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to build my application and load it into my target hardware using CRP0 and everything works fine. &amp;nbsp;Now that everything is working great, I want to set CRP to CRP1, so that I can do subsequent partial code image downloads to the target without changing the contents of Sector 0. &amp;nbsp;It is my understanding that this is exactly what CRP1 is all about. &amp;nbsp;I am able to successfully configure my target hardware with CRP1 - that's not the problem. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that any file I subsequently attempt to program into Flash via the USB Bootloader ALWAYS overwrites Sector 0. &amp;nbsp;The idea was that with CRP set to CRP1, I could transfer a subsequent file to the target via the USB Bootloader and Sector 0 would be protected - but I am unable to make that happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read every datasheet, App Note and Forum post I can find and am still at a loss. &amp;nbsp;I have modified my Linker Script to include the 0x2FC declaration and am using the macro for setting CRP1. &amp;nbsp;I am able to confirm that the .bin file generated by the link is correct by dumping the .bin file to a "hex viewer" utility. &amp;nbsp;The CRP1 code is right there. &amp;nbsp;Here's what's happening:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I build my code image with CRP set for CRP1, then generate the .bin file from the .axf file (using LPCXpresso).&lt;/P&gt;&lt;P&gt;2) My&amp;nbsp;target hardware&amp;nbsp;is connected directly to my PC via its USB connector.&lt;/P&gt;&lt;P&gt;3) My target hardware shows at the Drive Designator as "CRP DISABLD".&lt;/P&gt;&lt;P&gt;4) I delete the "firmware.bin" file, and paste in my "CRP1" code image, then power cycle the target.&lt;/P&gt;&lt;P&gt;3) When I reset my target (configured to enter the Bootloader again) the Target now shows up again as a drive in Windows Explorer, now indicating that it is currently "CRP1 ENABLD".&lt;/P&gt;&lt;P&gt;4) So far so good.&lt;/P&gt;&lt;P&gt;5) Now I delete the "firmware.bin" file and paste in the new "field upgrade" .bin file, &lt;EM&gt;intended&lt;/EM&gt; to update other Sectors, but not make any changes to Sector 0.&lt;/P&gt;&lt;P&gt;6) After reset, it is obvious that the processor/code is not running.&lt;/P&gt;&lt;P&gt;7) When I re-enter the Bootloader, now the drive designator shows up as "CRP DISABLD"&lt;/P&gt;&lt;P&gt;8) So Sector 0 and the CRP value in Sector 0 got changed. &amp;nbsp;When I transfered the incremental file via the USB Bootloader.&lt;/P&gt;&lt;P&gt;9) From what I can observe, it appears that Sector 0 has been erased or at least overwritten.&lt;/P&gt;&lt;P&gt;10) The .bin file I'm loading while in CRP1 is small enough so that it should not result in the erasure of Sector-0 which is possible when "all sectors are being erased".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A) So does the act of deleting the "firmware.bin" file result in the erasure of the whole Flash, including Sector-0? &amp;nbsp;&lt;/P&gt;&lt;P&gt;If so, how is CRP1 any different from CRP2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B) The .bin file generated by LPCXpresso IDE is padded with "fill" characters from 0x00000000 to 0x00000FFF. &amp;nbsp;Is there an option to generate the .bin file such that it does NOT have ANY characters for addresses prior to 0x00001000 (Sector 1)? &amp;nbsp;Would this avoid having Sector 0 get written?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried everything - I'm just about done with my design - it's all working fine - the final step was to protect Sector-0 using CRP1 so I could do field upgrades to the other Sectors without changing Sector-0, but &lt;EM&gt;anything&lt;/EM&gt; I attempt to bootload into the chip via USB ALWAYS corrupts Sector-0, even though CRP is clearly set to CRP1 and not ALL sectors are being erased. &amp;nbsp;Or at least they're not supposed to be getting erased.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, does CPR1 and Sector 0 protection NOT work when using the USB Bootloader for some reason?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for any help you can offer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Oct 2016 10:39:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CRP1-Not-Protecting-Sector-0/m-p/639900#M25304</guid>
      <dc:creator>mattferrari</dc:creator>
      <dc:date>2016-10-16T10:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: CRP1 Not Protecting Sector-0</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/CRP1-Not-Protecting-Sector-0/m-p/639901#M25305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="289161" data-username="mattferrari" href="https://community.nxp.com/people/mattferrari"&gt;Matt Ferrari&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Thank you for interest in NXP Semiconductor products and the opportunity to serve you.&lt;/P&gt;&lt;P&gt;I've found that you had created some threads about the question, and I'll reply the in the thread &lt;A href="https://community.nxp.com/thread/436969"&gt;Does USB Bootloading in CRP1 always erase all Flash?&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;However other thread will be closed later.&lt;/P&gt;&lt;P&gt;Thanks for your understanding.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2016 01:18:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/CRP1-Not-Protecting-Sector-0/m-p/639901#M25305</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-10-20T01:18:44Z</dc:date>
    </item>
  </channel>
</rss>

