<?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: LPC5546XX ECRP problem in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1829762#M55678</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160756"&gt;@luimarma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change ECRP value need&amp;nbsp;erase the entire flash firstly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If user can change ECRP value without erase full flash, this setting is meaningless.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Others can change ECRP to do not protect, then read out flash data.&lt;/P&gt;
&lt;P&gt;So before change ECRP, must erase all flash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
    <pubDate>Sun, 17 Mar 2024 06:50:09 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2024-03-17T06:50:09Z</dc:date>
    <item>
      <title>LPC546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820302#M55546</link>
      <description>&lt;P&gt;I am developing an application that is making use of a second boot loader and I want to prevent access to the SWD interface and also protect the 4 first sectors of the flash to protect the bootloader.&lt;/P&gt;&lt;P&gt;Programming the ECRP in the startup file of my project with value 0x0001583B works fine, but if I try to activate the IAP erase/write protection with 0x0001583B, then the programming of the image fails and the lpc546xx is ruined.&lt;/P&gt;&lt;P&gt;I understand that after loading the image, then writing to the first 4 sectors will no longer be possible, but why is this happening on first image writing?&lt;/P&gt;&lt;P&gt;How can I program the IAP erase/write protection bits of ECRP if I cannot do it at compile time in the start up code?&lt;/P&gt;&lt;P&gt;Is anything wrong with the following?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;void (* const g_pfnVectors[])(void) = {
    // Core Level - CM4
    &amp;amp;_vStackTop,                       // The initial stack pointer
    ResetISR,                          // The reset handler
    NMI_Handler,                       // The NMI handler
    HardFault_Handler,                 // The hard fault handler
    MemManage_Handler,                 // The MPU fault handler
    BusFault_Handler,                  // The bus fault handler
    UsageFault_Handler,                // The usage fault handler
    __valid_user_code_checksum,        // LPC MCU checksum
    (void (*)()) 0x0001543B,           // ECRP
    0,                                 // Reserved
    0,                                 // Reserved
    SVC_Handler,                       // SVCall handler
    DebugMon_Handler,                  // Debug monitor handler
    0,                                 // Reserved
    PendSV_Handler,                    // The PendSV handler
    SysTick_Handler,                   // The SysTick handler&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 09:12:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820302#M55546</guid>
      <dc:creator>luimarma</dc:creator>
      <dc:date>2024-03-13T09:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820490#M55547</link>
      <description>&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;gt; I am developing an application that is making use of a second boot loader and I want to prevent access to the SWD interface and also protect the 4 first sectors of the flash to protect the bootloader.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am not sure what exactly you want to achieve here.&lt;BR /&gt;My company has such second-stage bootloaders on almost all it's devices, of different architectures.&lt;BR /&gt;The protection is in the BL logic, which checks the addresses of the loaded firmware and just refused to touch sectors the BL itself resides in.&lt;BR /&gt;OTOH, those devices are built into heavy machinery, and as such not really prone to hacker / erverse engineering attacks. Your requirements might differ.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 10:54:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820490#M55547</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2024-03-04T10:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820507#M55548</link>
      <description>&lt;P&gt;What I want to achive is protecting from Erase/Write the first 4 blocks of the image from IAP access.&lt;/P&gt;&lt;P&gt;As you mentioned, the ECRP protection is in BL logic, at offset 0x20.&lt;/P&gt;&lt;P&gt;And it is supposed that at offset 0x20 I should have a "0" at bit&amp;nbsp; 11, a "1" at bit 10 (to enable IAP Sector Erase/Write protection) and bits 0 to 5 should be 0x3b (to protect just the 4 first blocks).&lt;/P&gt;&lt;P&gt;But if I flash an image with bit 11 and bit 10 as related above,&amp;nbsp; the image writing fails and the lpc54608 gets bricked.&lt;/P&gt;&lt;P&gt;I was expecting that after writing the image, the blocks get protected and the image would still work.&lt;/P&gt;&lt;P&gt;I hope that I have explained myself better now.&lt;/P&gt;&lt;P&gt;Any help is welcome.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 11:30:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820507#M55548</guid>
      <dc:creator>luimarma</dc:creator>
      <dc:date>2024-03-04T11:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820537#M55552</link>
      <description>&lt;P&gt;First, none of our devices is a LPCxx.&lt;BR /&gt;While some are Cortex M and some are other architectures, all have a feature equivalent to "CRP".&lt;BR /&gt;However, we do &lt;EM&gt;&lt;STRONG&gt;not&lt;/STRONG&gt;&lt;/EM&gt; use this CRP-like features, but leave this logic to the bootloader code.&lt;/P&gt;&lt;P&gt;To be honest, I have not tried IAP on the LPC54xxx MCUs.&lt;BR /&gt;But one common issue applies - Flash sector and bank setup.&lt;BR /&gt;While you can erase and write Flash on a per-sector basis, you cannot execute code from the same bank while IAP is ongoing, even it it is a different sector.&lt;BR /&gt;Some of our bootloaders need to relocate relevant code to RAM, and execute the erase/write code from there, for this reason.&lt;/P&gt;&lt;P&gt;Most Cortex M MCUs, especially smaller/less expensive variants, have only Flash bank. I would check the LPC54608 datasheet in this regard. Perhaps this is your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 12:22:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1820537#M55552</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2024-03-04T12:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1821435#M55563</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160756"&gt;@luimarma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"0x000&lt;SPAN&gt;1583B&lt;/SPAN&gt;"&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;have a "0" at bit&amp;nbsp; 11, a "1" at bit 10&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-&amp;gt;&amp;gt; While the two descriptions not the same.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also Pay attention, your configuration ""0x0001583B"" also do not allow enter ISP mode.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alice_Yang_0-1709632682798.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266547i3EE436B859288B94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Alice_Yang_0-1709632682798.png" alt="Alice_Yang_0-1709632682798.png" /&gt;&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;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 06:35:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1821435#M55563</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-03-17T06:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1822320#M55578</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;&lt;/P&gt;&lt;P&gt;About bits 13:12 and 15:14 I have it clear. We have an IAP routine to mass erase the LPC to be able to recover it for reflashing.&lt;/P&gt;&lt;P&gt;But still I dont understand why when we try to activate the IAP erase/wite protection at bits 11:10 then we cannot flash the image the first time. How can then bits 11:10 be programmed?&lt;/P&gt;&lt;P&gt;This is the process example that we follow:&lt;/P&gt;&lt;P&gt;Procedure 1:&lt;/P&gt;&lt;P&gt;1. LPC54608 is blank.&lt;/P&gt;&lt;P&gt;2. We build an image with ECRP 0x0001583B&lt;/P&gt;&lt;P&gt;3. We flash image built in step 2.&lt;/P&gt;&lt;P&gt;4. Flashing works and the LPC54608 is working.&lt;/P&gt;&lt;P&gt;Procedure 2:&lt;/P&gt;&lt;P&gt;1. LPC54608 is blank.&lt;/P&gt;&lt;P&gt;2. We build an image with ECRP 0x0001543B&lt;/P&gt;&lt;P&gt;3. We flash image built in step 2.&lt;/P&gt;&lt;P&gt;4. Flashing fails and the LPC54608 part is ruined.&lt;/P&gt;&lt;P&gt;Any hint?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 09:25:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1822320#M55578</guid>
      <dc:creator>luimarma</dc:creator>
      <dc:date>2024-03-06T09:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1827001#M55633</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/27788"&gt;@Alice_Yang&lt;/a&gt;can you give some light to the question above?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 09:06:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1827001#M55633</guid>
      <dc:creator>luimarma</dc:creator>
      <dc:date>2024-03-13T09:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5546XX ECRP problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1829762#M55678</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/160756"&gt;@luimarma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change ECRP value need&amp;nbsp;erase the entire flash firstly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If user can change ECRP value without erase full flash, this setting is meaningless.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Others can change ECRP to do not protect, then read out flash data.&lt;/P&gt;
&lt;P&gt;So before change ECRP, must erase all flash.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 06:50:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC546XX-ECRP-problem/m-p/1829762#M55678</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-03-17T06:50:09Z</dc:date>
    </item>
  </channel>
</rss>

