<?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 LPC54102 cutom bootloader in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1584659#M51311</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;My goal is build a bootloader in order to launch and if needed upgrade, my application.&lt;/P&gt;&lt;P&gt;I'm working witu MCUxpresso and LPC54102 microcontroller.&lt;/P&gt;&lt;P&gt;I have already build the bootloader project named SBL.c, thi code is a single core code mapped in the first sector of the LPC Flash memory (Location 0x0, size 0x8000).&lt;/P&gt;&lt;P&gt;I have build also a simple application that toggle a led by one of the GPIO port just to debug the bootloader. This second application is mapped on the second sector of LPC Flash memory&amp;nbsp;(Location 0x8000, size 0x8000).&lt;/P&gt;&lt;P&gt;When I launch the SBL.c by debugger the it goes on a fault condition when it is calling the second application .... Attached a part of SBL.c and a Debugger error.&lt;/P&gt;&lt;P&gt;I have also tryed to leave the SBL.c running without the debugger but it seems not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//SBL.c&lt;/P&gt;&lt;P&gt;//Define my Application Address&lt;BR /&gt;#define APPLICATION_ADDRESS 0x00008020&lt;BR /&gt;typedef void(*pFunction)(void);&lt;BR /&gt;pFunction appEntry;&lt;BR /&gt;uint32_t appStack;&lt;/P&gt;&lt;P&gt;//Disabling interrupts, before changing interrupt vectors&lt;BR /&gt;__disable_irq();&lt;/P&gt;&lt;P&gt;//Get the application stack pointer&lt;BR /&gt;appStack=(uint32_t)*((__IO uint32_t*)APPLICATION_ADDRESS);&lt;/P&gt;&lt;P&gt;//Get the application entry point&lt;BR /&gt;appEntry=(pFunction)(__IO uint32_t*)(APPLICATION_ADDRESS+4);&lt;/P&gt;&lt;P&gt;// Set vector table offset&lt;BR /&gt;SCB-&amp;gt;VTOR = APPLICATION_ADDRESS;&lt;/P&gt;&lt;P&gt;//Enable interrupts before jumping to application&lt;BR /&gt;__enable_irq();&lt;/P&gt;&lt;P&gt;//Set application stack pointer&lt;BR /&gt;__set_MSP(appStack);&lt;/P&gt;&lt;P&gt;appEntry();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Errors appear when call this function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DebuggerError.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/207781i21CA6F84B9CC1319/image-size/large?v=v2&amp;amp;px=999" role="button" title="DebuggerError.PNG" alt="DebuggerError.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 13:38:17 GMT</pubDate>
    <dc:creator>eu_mtaverna</dc:creator>
    <dc:date>2023-01-18T13:38:17Z</dc:date>
    <item>
      <title>LPC54102 cutom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1584659#M51311</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;My goal is build a bootloader in order to launch and if needed upgrade, my application.&lt;/P&gt;&lt;P&gt;I'm working witu MCUxpresso and LPC54102 microcontroller.&lt;/P&gt;&lt;P&gt;I have already build the bootloader project named SBL.c, thi code is a single core code mapped in the first sector of the LPC Flash memory (Location 0x0, size 0x8000).&lt;/P&gt;&lt;P&gt;I have build also a simple application that toggle a led by one of the GPIO port just to debug the bootloader. This second application is mapped on the second sector of LPC Flash memory&amp;nbsp;(Location 0x8000, size 0x8000).&lt;/P&gt;&lt;P&gt;When I launch the SBL.c by debugger the it goes on a fault condition when it is calling the second application .... Attached a part of SBL.c and a Debugger error.&lt;/P&gt;&lt;P&gt;I have also tryed to leave the SBL.c running without the debugger but it seems not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//SBL.c&lt;/P&gt;&lt;P&gt;//Define my Application Address&lt;BR /&gt;#define APPLICATION_ADDRESS 0x00008020&lt;BR /&gt;typedef void(*pFunction)(void);&lt;BR /&gt;pFunction appEntry;&lt;BR /&gt;uint32_t appStack;&lt;/P&gt;&lt;P&gt;//Disabling interrupts, before changing interrupt vectors&lt;BR /&gt;__disable_irq();&lt;/P&gt;&lt;P&gt;//Get the application stack pointer&lt;BR /&gt;appStack=(uint32_t)*((__IO uint32_t*)APPLICATION_ADDRESS);&lt;/P&gt;&lt;P&gt;//Get the application entry point&lt;BR /&gt;appEntry=(pFunction)(__IO uint32_t*)(APPLICATION_ADDRESS+4);&lt;/P&gt;&lt;P&gt;// Set vector table offset&lt;BR /&gt;SCB-&amp;gt;VTOR = APPLICATION_ADDRESS;&lt;/P&gt;&lt;P&gt;//Enable interrupts before jumping to application&lt;BR /&gt;__enable_irq();&lt;/P&gt;&lt;P&gt;//Set application stack pointer&lt;BR /&gt;__set_MSP(appStack);&lt;/P&gt;&lt;P&gt;appEntry();&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Errors appear when call this function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DebuggerError.PNG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/207781i21CA6F84B9CC1319/image-size/large?v=v2&amp;amp;px=999" role="button" title="DebuggerError.PNG" alt="DebuggerError.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 13:38:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1584659#M51311</guid>
      <dc:creator>eu_mtaverna</dc:creator>
      <dc:date>2023-01-18T13:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54102 cutom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1585710#M51332</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206486"&gt;@eu_mtaverna&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you please try declaring the &lt;EM&gt;appEntry();&lt;/EM&gt; as follows?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;static void(*appEntry)(void)=0;
appEntry=(void(*)())(APPLICATION_ADDRESS+4);
appEntry();&lt;/LI-CODE&gt;
&lt;P class="lia-align-justify"&gt;Also, could you please read the following application note? &lt;A href="https://www.nxp.com/docs/en/application-note/AN11610.zip" target="_blank"&gt;https://www.nxp.com/docs/en/application-note/AN11610.zip&lt;/A&gt;. It might be useful.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 20:15:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1585710#M51332</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-01-19T20:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54102 cutom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1586712#M51351</link>
      <description>&lt;P&gt;Hi, Thanks a lot for replay, the issue was about the systick interrupts that I haven't disabled....&lt;/P&gt;&lt;P&gt;Now the bootloader works and can start correctly a single core application.&lt;/P&gt;&lt;P&gt;Now a new issue appears with a dual core application: when the bootloader lounch a dual core application only the Master core seems to starts. The Slave core seems to loop in boot condition.... Have you any Idea about??&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 16:14:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1586712#M51351</guid>
      <dc:creator>eu_mtaverna</dc:creator>
      <dc:date>2023-01-23T16:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54102 cutom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1586782#M51354</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206486"&gt;@eu_mtaverna&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please take a look to the following application notes related with the dual core applications?&lt;/P&gt;
&lt;UL class="lia-align-justify" type="disc"&gt;
&lt;LI&gt;&lt;A href="https://style.nxp.com/docs/en/application-note/AN12123.pdf" target="_blank"&gt;AN12123. LPC541xx Dual Core Starting Guide&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;AN11609. LPC5410x Dual Core Usage&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;Regards, Raul.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 19:05:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1586782#M51354</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-01-23T19:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54102 cutom bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1589827#M51437</link>
      <description>&lt;P&gt;Hi RaulRomero, I have take a look to the application notes as you seggest, but I have not fix.. The issue seems in the Chip_CPU_CM0Boot(uint32_t *coentry, uint32_t *costackptr) function.&lt;/P&gt;&lt;P&gt;When the above function clears the Slave Reset an HardFault (HFSR) appears.&amp;nbsp;At first I thought about a Debugger problem, but also without Debugger the CM0 Slave don't starts correctly.&lt;/P&gt;&lt;P&gt;Do you have suggestion about in order to investigate?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:09:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54102-cutom-bootloader/m-p/1589827#M51437</guid>
      <dc:creator>eu_mtaverna</dc:creator>
      <dc:date>2023-01-30T13:09:10Z</dc:date>
    </item>
  </channel>
</rss>

