<?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>LPC Microcontrollers中的主题 Re: problem with executing new firmware through bootloader</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562058#M16404</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi , thanks for the replies. i have already&amp;nbsp;tested this function which Tyler suggested but same result.&lt;/P&gt;&lt;P&gt;i think prolem has something with interrupt to do, because as i said program works with my own blinky code without enabling interrupt and for keil sample blinky with enabling intterupt. for any other firmwares program hangs in both cases. thanks for any further suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Aug 2016 06:58:00 GMT</pubDate>
    <dc:creator>alinikfarjam</dc:creator>
    <dc:date>2016-08-29T06:58:00Z</dc:date>
    <item>
      <title>problem with executing new firmware through bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562055#M16401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everybody,&lt;/P&gt;&lt;P&gt;i am designing an ethernet bootloader for LPC1768 keil. so far i wrote a code that recieve new firmware over TCP\Ip and store it in flash memory using IAP, then by&amp;nbsp;setting new sp and pc jump to the address of new firmware.&lt;/P&gt;&lt;P&gt;i tested a simple blinky example&amp;nbsp;which i wrote myself with using this code to&amp;nbsp;jump and it works,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void execute_user_code(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; void (*user_code_entry)(void);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned *p;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __disable_irq();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCB-&amp;gt;VTOR = (IMG_START_SECTOR &amp;amp; 0x1FFFFF80);&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; p = (unsigned *)(IMG_START_SECTOR+4 );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_code_entry = (void (*)()) *p;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; user_code_entry();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tested sample blinky from keil&amp;nbsp;,it didn't work and i just enabled interrupt before jumping ( __enable_irq(); )&amp;nbsp;then it worked.&lt;/P&gt;&lt;P&gt;but for any other little bigger firmwares ,after jumping and executing , program hangs. i looked at&amp;nbsp;the memory of address, which programms hangs on it and most of them are same ( its somthing like EF E7 E7 E7 EF E7 ... )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anybody tell me please what can be a problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 14:12:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562055#M16401</guid>
      <dc:creator>alinikfarjam</dc:creator>
      <dc:date>2016-08-26T14:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: problem with executing new firmware through bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562056#M16402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Ali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see where in your code the stack pointer is being set&amp;nbsp;before jumping to the new firmware. I&amp;nbsp;use the following function for executing a firmware application on LPC17xx in Keil. It sets the stack pointer to the value at offset 0, then jumps to the application address at offset 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;__asm void ExecuteApp(uint32_t address) 
{ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDR SP, [R0, #0] 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ISB 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LDR PC, [R0, #4] 
}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Aug 2016 18:37:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562056#M16402</guid>
      <dc:creator>tyler_drazich</dc:creator>
      <dc:date>2016-08-27T18:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: problem with executing new firmware through bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562057#M16403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Many customers also have the similar issue, and main cause of the issue is the system clock incompatibly.&lt;/P&gt;&lt;P&gt;The initial system clock configuration of the application demo should keep consistent with the bootlaoder demo, or the application definitely hangs after jumps from the bootloader.&lt;/P&gt;&lt;P&gt;I'd also like to suggest that you can try the jump function which is from the Tyler.&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>Mon, 29 Aug 2016 01:55:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562057#M16403</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-08-29T01:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: problem with executing new firmware through bootloader</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562058#M16404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi , thanks for the replies. i have already&amp;nbsp;tested this function which Tyler suggested but same result.&lt;/P&gt;&lt;P&gt;i think prolem has something with interrupt to do, because as i said program works with my own blinky code without enabling interrupt and for keil sample blinky with enabling intterupt. for any other firmwares program hangs in both cases. thanks for any further suggestions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 06:58:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/problem-with-executing-new-firmware-through-bootloader/m-p/562058#M16404</guid>
      <dc:creator>alinikfarjam</dc:creator>
      <dc:date>2016-08-29T06:58:00Z</dc:date>
    </item>
  </channel>
</rss>

