<?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>NXP DesignsのトピックRe: Issue in Jumping from Bootloader to Application</title>
    <link>https://community.nxp.com/t5/NXP-Designs/Issue-in-Jumping-from-Bootloader-to-Application/m-p/1029421#M362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first point which I recommend to everyone - make sure that you have disabled all interrupts before jump (on all levels: in the core and also by local enable bits in peripherals) and it's good practice to put everything back to default state before jumping to application. This can save a lot of troubles.&lt;/P&gt;&lt;P&gt;Does r1 contain correct entry point address? Is bit[0] set to '1'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98194i4EA416CE51A05DDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2020 08:04:58 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2020-03-18T08:04:58Z</dc:date>
    <item>
      <title>Issue in Jumping from Bootloader to Application</title>
      <link>https://community.nxp.com/t5/NXP-Designs/Issue-in-Jumping-from-Bootloader-to-Application/m-p/1029420#M361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using S32K144, i have custom Boot loader project and Application project separately which have separate linker file. My Application starts from 0x1000 to 0xC000. I am facing issue while jumping from bootloder to Application.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define&amp;nbsp;&lt;SPAN&gt;APP_VECTOR_TABLE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;void JumpToUserApplication(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;if(APP_RESET_ADDRESS == 0xFFFFFFFF){&lt;BR /&gt; return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;S32_SCB-&amp;gt;VTOR = (uint32_t)APP_VECTOR_TABLE;&lt;BR /&gt; JumpApplication(*((uint32_t*)APP_VECTOR_TABLE), *((uint32_t*)(APP_VECTOR_TABLE + 4)));&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;void JumpApplication( unsigned int userSP, unsigned int userStartup)&lt;BR /&gt;{&lt;BR /&gt; /* Check if Entry address is erased and return if erased */&lt;/P&gt;&lt;P&gt;/* Set up stack pointer */&lt;BR /&gt; __asm("ldr r0,=0x1000");&lt;BR /&gt; __asm("msr msp, r0");&lt;BR /&gt; __asm("msr psp, r0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Jump to application PC (r1) */&lt;BR /&gt; __asm("ldr r1,=0x1005");&lt;BR /&gt; __asm("blx r1");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything seems ok until right before the branch (blx r1) then it is jumping to 0x1478 and stucks here.&lt;/P&gt;&lt;P&gt;/* Disassembly */&lt;/P&gt;&lt;P&gt;0000146d: strb r0, [r0, #0]&lt;BR /&gt;0000146f: movs r0, #0&lt;BR /&gt;00001471: push {r0, r2, r6, r7}&lt;BR /&gt;00001473: movs r0, r0&lt;BR /&gt;00001475: cbz r1, 0x14de&lt;BR /&gt;00001477: movs r0, r0&lt;BR /&gt;00001479: b.w 0x1478&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;------------&amp;nbsp; &amp;nbsp;PC is not come out of this&lt;BR /&gt;0000147d: cbnz r3, 0x1494&lt;BR /&gt;0000147f: cbnz r2, 0x1494&lt;BR /&gt;00001481: cmp r1, #0&lt;BR /&gt;00001483: it eq&lt;BR /&gt;00001485: cmpeq r0, #0&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where i Did Mistake?&lt;/P&gt;&lt;P&gt;Please help me to sort out this issue.&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Mar 2020 14:44:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NXP-Designs/Issue-in-Jumping-from-Bootloader-to-Application/m-p/1029420#M361</guid>
      <dc:creator>lakshmi_s</dc:creator>
      <dc:date>2020-03-14T14:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Jumping from Bootloader to Application</title>
      <link>https://community.nxp.com/t5/NXP-Designs/Issue-in-Jumping-from-Bootloader-to-Application/m-p/1029421#M362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first point which I recommend to everyone - make sure that you have disabled all interrupts before jump (on all levels: in the core and also by local enable bits in peripherals) and it's good practice to put everything back to default state before jumping to application. This can save a lot of troubles.&lt;/P&gt;&lt;P&gt;Does r1 contain correct entry point address? Is bit[0] set to '1'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98194i4EA416CE51A05DDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2020 08:04:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NXP-Designs/Issue-in-Jumping-from-Bootloader-to-Application/m-p/1029421#M362</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2020-03-18T08:04:58Z</dc:date>
    </item>
  </channel>
</rss>

