<?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: K64 Custom Bootloader not loading to user application every time. in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791507#M48166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while debugging, bootloader works fine until the jump statement to 0x40000. Same issue there, not always loading the custom app from the address 0x40000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Nov 2018 04:23:57 GMT</pubDate>
    <dc:creator>aromal_pj</dc:creator>
    <dc:date>2018-11-23T04:23:57Z</dc:date>
    <item>
      <title>K64 Custom Bootloader not loading to user application every time.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791505#M48164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have designed a custom bootloader for Freedom K64F board (MCU Expresso, FreeRTOS)with following components.&lt;/P&gt;&lt;P&gt;1. USB Mass Storage Support&lt;/P&gt;&lt;P&gt;2. GPIO for turning Off and On Leds&lt;/P&gt;&lt;P&gt;3. Flash Support&lt;/P&gt;&lt;P&gt;4. Console Support (UART0)&lt;/P&gt;&lt;P&gt;5. Hardware Timer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code for jumping user app ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void LaunchAppFirmware()&lt;BR /&gt;{&lt;BR /&gt; uint8_t ucIndex = 0;&lt;BR /&gt; void (*FwCodeEntry)(void);&lt;BR /&gt; uint8_t ucSerRoutineAddr;&lt;BR /&gt; uint32_t *pulStartFlashPointer = NULL;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; USB_OsaEnterCritical(&amp;amp;ucSerRoutineAddr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SCB-&amp;gt;VTOR = MAIN_FW_IMAGE_BASE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; pulStartFlashPointer = (uint32_t *)(MAIN_FW_IMAGE_BASE + 4);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; FwCodeEntry = (void *) *pulStartFlashPointer;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; ClearLed(); // Stopping Timer and Clear GPIO Bit&lt;BR /&gt; USB_HostDeinit(g_HostHandle);&lt;BR /&gt; DbgConsole_Deinit();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Clear Enabled IRQs&lt;BR /&gt; for(ucIndex = 0 ; ucIndex &amp;lt; 16; ucIndex++)&lt;BR /&gt; {&lt;BR /&gt; NVIC-&amp;gt;ICER[ucIndex] = 0xFFFFFFFF;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;//Clear All Pending Interrupts&lt;BR /&gt; for(ucIndex = 0 ; ucIndex &amp;lt; 16; ucIndex++)&lt;BR /&gt; {&lt;BR /&gt; NVIC-&amp;gt;ICPR[ucIndex] = 0xFFFFFFFF;&lt;BR /&gt; }&lt;BR /&gt;SYSTICK_CM4_CSR_REG &amp;amp;= (~1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Jump to user application&lt;BR /&gt; FwCodeEntry();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am jumping to my custom application (FreeRTOS, KDS IDE) in 0x40000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem i am facing is bootloader cannot jump to the &lt;SPAN&gt;custom application every time&lt;/SPAN&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If&amp;nbsp;I manually press reset button couple of times, it will jump and work the custom application from (0x40000).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2018 10:45:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791505#M48164</guid>
      <dc:creator>aromal_pj</dc:creator>
      <dc:date>2018-11-22T10:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: K64 Custom Bootloader not loading to user application every time.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791506#M48165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What happens if you try to step through it in the debugger?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2018 18:36:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791506#M48165</guid>
      <dc:creator>scottm</dc:creator>
      <dc:date>2018-11-22T18:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: K64 Custom Bootloader not loading to user application every time.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791507#M48166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;while debugging, bootloader works fine until the jump statement to 0x40000. Same issue there, not always loading the custom app from the address 0x40000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2018 04:23:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791507#M48166</guid>
      <dc:creator>aromal_pj</dc:creator>
      <dc:date>2018-11-23T04:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: K64 Custom Bootloader not loading to user application every time.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791508#M48167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aromal PJ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please download the app code to 0X40000 at first, then debug your bootloader code.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Check the address 0X40000 data, whether it is the same data as the app.hex you downloaded, you must make sure your bootloader code size is smaller than 0x40000.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Debug your bootloader, if it can't jump to the 0X40000, where it will jump ? Step the code, why it can't jump to 0X40000.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Besides, you also can refer to KBOOT2.0 code for K64, that code works OK:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.nxp.com/kboot"&gt;www.nxp.com/kboot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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>Fri, 23 Nov 2018 08:21:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-Custom-Bootloader-not-loading-to-user-application-every-time/m-p/791508#M48167</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-11-23T08:21:44Z</dc:date>
    </item>
  </channel>
</rss>

