<?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: LPC5526 run isp bootloader in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1609650#M51804</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that this is a bug described in errata.pdf&lt;/P&gt;
&lt;P&gt;Pls download the errata of LPC552x from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com.cn/docs/en/nxp/errata/LPC55S2x_LPC552x_ES.pdf" target="_blank"&gt;https://www.nxp.com.cn/docs/en/nxp/errata/LPC55S2x_LPC552x_ES.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1678070797713.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213214iD4B01C66412588D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1678070797713.png" alt="xiangjun_rong_0-1678070797713.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I suppose that the PIO0_5 pin must be high when you execute the code:&lt;/P&gt;
&lt;P&gt;PMC-&amp;gt;AOREG1 |=(0X0A &amp;lt;&amp;lt;16);&lt;BR /&gt;NVIC_SystemReset();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2023 02:50:30 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2023-03-06T02:50:30Z</dc:date>
    <item>
      <title>LPC5526 run isp bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1609563#M51802</link>
      <description>&lt;P&gt;I am using the LPC5526 (NON-S) and want to re-enter the serial (uart) bootloader by a call from my program.&lt;BR /&gt;The ISP and SWD pins are not accessible (in the final product) and both will be locked out security bits in the future (to prevent possible readout).&lt;/P&gt;&lt;P&gt;Reading through the User manual:&amp;nbsp;9.3.4 runBootloader API&amp;nbsp; mentions exactly what i need.&lt;/P&gt;&lt;P&gt;However this does not work.&lt;BR /&gt;The example below doesn't respond to a serial program (tested with Flashmagic) and when i suspend the program it is halted in&amp;nbsp; an "HardFault_Handler"&lt;BR /&gt;If i use the alternative location from the fsl_iap the program just reboots.&lt;BR /&gt;And finaly using the undocumented NXP forum suggestion also just reboots.&lt;/P&gt;&lt;P&gt;Short: Is it possible to jump to the UART ISP bootloader direct from my program? or do i have to do something before jumping? like turning off interrupts?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example: In the application image boot process, regardless of whether the ISP pin is&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;connected to the high level, the device will directly enter the ISP mode through the UART&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;interface according to the parameter ispInterface in arg.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//Version 2.1.4.
// from fsl_iap.c: LPC5528_SERIES -&amp;gt; #define BOOTLOADER_API_TREE_POINTER ((bootloader_tree_t *)0x130010f0U)
// other LPC550x &amp;amp; LPC551x series -&amp;gt; #define BOOTLOADER_API_TREE_POINTER ((bootloader_tree_t *)0x1301fe00U)

////#define BOOTLOADER_TREE_LOCATION (0x130010f0U) // from fsl_iap.c: LPC5528_SERIES ??
#define BOOTLOADER_TREE_LOCATION (0x1301fe00) // from  ROM_API.PDF / User Manual
typedef struct BootloaderTree
{
    void (*runBootloader)(void *arg);      /*!&amp;lt; Function to start the bootloader executing. */
//    standard_version_t bootloader_version; /*!&amp;lt; Bootloader version number. */
//    const char *copyright;                 /*!&amp;lt; Copyright string. */
//    const uint32_t reserved0;              /*!&amp;lt; Do NOT use. */
//    flash_driver_interface_t flashDriver;
//    const kb_interface_t *kbApi;                               /*!&amp;lt; Bootloader API. */
//    const uint32_t reserved1[4];                               /*!&amp;lt; Do NOT use. */
//    const skboot_authenticate_interface_t *skbootAuthenticate; /*!&amp;lt; Image authentication API. */
} bootloader_tree_t;

bootloader_tree_t *romApiTree = (bootloader_tree_t *)BOOTLOADER_TREE_LOCATION;
uint32_t arg = 0xEB120000;       //0xEB: represents Enter Boot; 0x12: represents enter ISP mode by UART only


void EnterBootLoader(void)
{
	ReadChipUUID();

#if (true)
	// official NXP method
	romApiTree-&amp;gt;runBootloader(&amp;amp;arg);
#else
	// Undocumanted NXP forum solution (not working, just reboots)
	PMC-&amp;gt;AOREG1 |= (0x0A &amp;lt;&amp;lt; 16); //Set to boot from ROM
	NVIC_SystemReset();          //Reset‍‍
#endif
   for(;;)
   {
   }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2023 19:20:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1609563#M51802</guid>
      <dc:creator>bwinter</dc:creator>
      <dc:date>2023-03-05T19:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5526 run isp bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1609650#M51804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I suppose that this is a bug described in errata.pdf&lt;/P&gt;
&lt;P&gt;Pls download the errata of LPC552x from the link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com.cn/docs/en/nxp/errata/LPC55S2x_LPC552x_ES.pdf" target="_blank"&gt;https://www.nxp.com.cn/docs/en/nxp/errata/LPC55S2x_LPC552x_ES.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1678070797713.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213214iD4B01C66412588D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1678070797713.png" alt="xiangjun_rong_0-1678070797713.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I suppose that the PIO0_5 pin must be high when you execute the code:&lt;/P&gt;
&lt;P&gt;PMC-&amp;gt;AOREG1 |=(0X0A &amp;lt;&amp;lt;16);&lt;BR /&gt;NVIC_SystemReset();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 02:50:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1609650#M51804</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2023-03-06T02:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPC5526 run isp bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1610310#M51820</link>
      <description>&lt;P&gt;Thank you for your fast response.&lt;BR /&gt;Indeed it seems the "undocumented" part was from the errata pdf clearly writing the issue of the not working API ISP mode.&lt;BR /&gt;I still don't know how i could miss that point from the ES as i often look for the latest version and scan for possible problems.&lt;/P&gt;&lt;P&gt;However the ES fix was also in my source and tested without success on one of our prototypes (development boards).&lt;BR /&gt;On our new boards we have a pullup resistor connected to the P0_5 pin and on those boards the ES fix works as expected.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 21:57:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-run-isp-bootloader/m-p/1610310#M51820</guid>
      <dc:creator>bwinter</dc:creator>
      <dc:date>2023-03-06T21:57:44Z</dc:date>
    </item>
  </channel>
</rss>

