<?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: LPC1125 run code exception in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1940093#M56712</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239489"&gt;@Guo2024&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend you low PIO0_1 pin when reset the chip. Then it run into ISP mode. Erase all flash, it can recovered to normal.&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>Mon, 26 Aug 2024 07:39:12 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2024-08-26T07:39:12Z</dc:date>
    <item>
      <title>LPC1125 run code exception</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1939185#M56695</link>
      <description>&lt;P&gt;Hi,Sir&amp;amp;Miss,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Good day.&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;LPC1125's embed flash bas been programmed with all zeros during production accidently.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Then I find the flash loader can not call the IAP commands again through the SWD interface.(flash loader is not from NXP,which is developmented by user-self refer to the ARM SWD debug protocol).&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;So I do another test to debug the&amp;nbsp;&amp;nbsp;LPC1125 to find the root cause by running some simple code.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;First,I load the below &lt;STRONG&gt;Test1&amp;nbsp; code&lt;/STRONG&gt; into&amp;nbsp;LPC1125' embed ram,then I run the&amp;nbsp;LPC1125 core by ARM debug port(SWD).The run entry address is the location of __asm("MOV R0,#0xAA"),and the bit0 should be 1.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I find that the LPC1125 core generates an exception when it executes the&amp;nbsp; code&amp;nbsp;&amp;nbsp;__asm("MOV R0,#0xAA").So the code&amp;nbsp;__asm("bkpt") can not be executed ok and the core can not be halted again.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/*&lt;STRONG&gt;Test1 code&lt;/STRONG&gt; start*/&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __asm("MOV R0,#0xAA");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __asm("bkpt");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /*Test1 code end*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Second,I load the below &lt;STRONG&gt;Test2&lt;/STRONG&gt;&amp;nbsp; code into&amp;nbsp;LPC1125' embed ram,then I run the&amp;nbsp;LPC1125 core by ARM debug port(SWD).The run entry address is the location of __asm("bkpt"),and the bit0 should be 1.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I find that the LPC1125 core can execute&amp;nbsp;__asm("bkpt") ok and the core can be halted again.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/*&lt;STRONG&gt;Test2 code&lt;/STRONG&gt; start*/&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __asm("bkpt");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /*Test2code end*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;It looks that&amp;nbsp;LPC1125 can not run the code&amp;nbsp;__asm("MOV R0,#0xAA")&amp;nbsp; ok since it will trigger an exception.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp;What should I do to recover the health(normal) running environment to execute the code&amp;nbsp; __asm("MOV R0,#0xAA") ok?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Is there any way to write some registers to recover the device through SWD interface?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Show the detail command sequence on SWD interface will be best.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Thanks.&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 10:08:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1939185#M56695</guid>
      <dc:creator>Guo2024</dc:creator>
      <dc:date>2024-08-23T10:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1125 run code exception</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1940093#M56712</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239489"&gt;@Guo2024&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend you low PIO0_1 pin when reset the chip. Then it run into ISP mode. Erase all flash, it can recovered to normal.&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>Mon, 26 Aug 2024 07:39:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1940093#M56712</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-08-26T07:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1125 run code exception</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1940111#M56713</link>
      <description>&lt;P&gt;Hi,&lt;SPAN&gt;Alice,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Thanks for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Also I know what you said.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; But it is not easy to do it since the device has been mounted on the PCB and there is no test point for&amp;nbsp;&amp;nbsp;PIO0_1 pin.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Would you help me find the solution only using the SWD interface?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 07:56:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1940111#M56713</guid>
      <dc:creator>Guo2024</dc:creator>
      <dc:date>2024-08-26T07:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1125 run code exception</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1942134#M56729</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239489"&gt;@Guo2024&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean the chip can't be connect with SWD now? Do you have j-link debugger? Or LPC-link with J-LINK probe. If yes, try to use J-link commander to connect.&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>Wed, 28 Aug 2024 10:05:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1125-run-code-exception/m-p/1942134#M56729</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2024-08-28T10:05:05Z</dc:date>
    </item>
  </channel>
</rss>

