<?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 bootloader in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449191#M26591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Aaron Dunkin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is your project going? Any new findings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possible cause would be the watchdog, if it is not disabled then the MCU would reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the application and bootloader are not developed in CW, you could at least load the bootloader + application and start a "&lt;STRONG&gt;Connect&lt;/STRONG&gt;" session with CodeWarrior to inspect the &lt;STRONG&gt;RCM_SRSx&lt;/STRONG&gt; registers to find the cause of the reset. See the tutorial from colleague Erich Styger:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:smileyinfo: Debug configurations interface has changed a little, but the process is the same.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="http://mcuoneclipse.com/2012/10/10/attach-connect-download/" title="http://mcuoneclipse.com/2012/10/10/attach-connect-download/"&gt;Hot-Sync: Attach, Connect &amp;amp; Download | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know your progress.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Aug 2015 01:53:55 GMT</pubDate>
    <dc:creator>Jorge_Gonzalez</dc:creator>
    <dc:date>2015-08-21T01:53:55Z</dc:date>
    <item>
      <title>K64 bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449188#M26588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using UVision 5 with a Kinetis K64.&amp;nbsp; I am working on porting the Codewarrior USB host bootloader to the Keil environment.&amp;nbsp; I have successfully done this for K60 and am nearing completion for the K64.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the bootloader, I am successfully recognizing the device attached, erasing the application sector space, and loading the new application.&amp;nbsp; But upon power up, when the bootloader successfully detects an image is present in flash, it's jumping to the program counter address stored in the 5th-8th byte of the binary, but then the application resets the processor which then enters bootloader mode and continues this in an indefinite reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My method for jumping to the application which is working with the K60 is:&lt;/P&gt;&lt;P&gt;((void (*)(void))New_pc)();&lt;/P&gt;&lt;P&gt;where New_pc is the address of the reset vector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I load the Codewarrior without touching the application, it successfully jumps to the application and runs.&amp;nbsp; The Codewarrior bootloader uses:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; r4,=New_sp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; sp, [r4]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; r4,=New_pc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp; r5, [r4]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blx&amp;nbsp;&amp;nbsp; r5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/P&gt;&lt;P&gt;but as you can see from above, the Keil bootloader does not set up the stack pointer.&amp;nbsp; But it works for K60 and I've read that the application sets up the stack pointer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to set up the stack pointer?&amp;nbsp; If so, why didn't I have to with the Keil K60 bootloader, which works?&amp;nbsp; If not, is the continuous resetting a hint as to what is going on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 16:40:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449188#M26588</guid>
      <dc:creator>ad52655</dc:creator>
      <dc:date>2015-08-18T16:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449189#M26589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aaron&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have always used the following for all K parts (including both K60 and K64).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;extern void start_application(unsigned long app_link_location);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start_application&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ldr sp, [r0,#0]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;; load the stack pointer value from the program's reset vector&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ldr pc, [r0,#4]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;; load the program counter value from the program's reset vector to cause operation to continue from there&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To jump to an application linked to the address 0x4000, the call is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;start_application(0x4000);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is compatible with Keil, IAR, KDS, CW etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I don't "see" the problem in yours but you may like to try the other method if you don't find it.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis: &lt;A href="http://www.utasker.com/kinetis.html" title="http://www.utasker.com/kinetis.html"&gt;µTasker Kinetis support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;K60: &lt;A href="http://www.utasker.com/kinetis/TWR-K60N512.html" title="http://www.utasker.com/kinetis/TWR-K60N512.html"&gt;µTasker Kinetis TWR-K60N512 support&lt;/A&gt;&amp;nbsp; / &lt;A href="http://www.utasker.com/kinetis/TWR-K60D100M.html" title="http://www.utasker.com/kinetis/TWR-K60D100M.html"&gt;µTasker Kinetis TWR-K60D100M support&lt;/A&gt;&amp;nbsp; / &lt;A href="http://www.utasker.com/kinetis/TWR-K60F120M.html" title="http://www.utasker.com/kinetis/TWR-K60F120M.html"&gt;µTasker Kinetis TWR-K60F120M support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;K64: &lt;A href="http://www.utasker.com/kinetis/FRDM-K64F.html" title="http://www.utasker.com/kinetis/FRDM-K64F.html"&gt;µTasker Kinetis FRDM-K64F support&lt;/A&gt;&amp;nbsp; / &lt;A href="http://www.utasker.com/kinetis/TWR-K64F120M.html" title="http://www.utasker.com/kinetis/TWR-K64F120M.html"&gt;µTasker Kinetis TWR-K64F120M support&lt;/A&gt;&amp;nbsp; / &lt;A href="http://www.utasker.com/kinetis/TWR-K65F180M.html" title="http://www.utasker.com/kinetis/TWR-K65F180M.html"&gt;µTasker Kinetis TWR-K65F180M support&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the complete "out-of-the-box" Kinetis experience and faster time to market&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 20:24:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449189#M26589</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-08-18T20:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449190#M26590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was very suspicious of that and looked over the UTasker code and have already pulled that in this afternoon and got the same results.&amp;nbsp; The most recent thing I did was implemented a unique program at flash space 0x10000.&amp;nbsp; Then I loaded another basic program at 0x0 and directly after the initialization jumped to my program at 0x10000 using my original method.&amp;nbsp; It worked flawlessly.&amp;nbsp; This basically proved to me that there is some sort of interrupt or clocking issue that is pending from the bootloader that is causing the reset.&amp;nbsp; I seen your note earlier regarding shutting down the peripherals.&amp;nbsp; My previous attempt at shutting down the peripherals was probably not thorough enough.&amp;nbsp; Thanks you for your feedback.&amp;nbsp; I'll let you know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 21:38:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449190#M26590</guid>
      <dc:creator>ad52655</dc:creator>
      <dc:date>2015-08-18T21:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449191#M26591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Aaron Dunkin:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is your project going? Any new findings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possible cause would be the watchdog, if it is not disabled then the MCU would reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the application and bootloader are not developed in CW, you could at least load the bootloader + application and start a "&lt;STRONG&gt;Connect&lt;/STRONG&gt;" session with CodeWarrior to inspect the &lt;STRONG&gt;RCM_SRSx&lt;/STRONG&gt; registers to find the cause of the reset. See the tutorial from colleague Erich Styger:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:smileyinfo: Debug configurations interface has changed a little, but the process is the same.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="http://mcuoneclipse.com/2012/10/10/attach-connect-download/" title="http://mcuoneclipse.com/2012/10/10/attach-connect-download/"&gt;Hot-Sync: Attach, Connect &amp;amp; Download | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know your progress.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 01:53:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449191#M26591</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-08-21T01:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449192#M26592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jorge, I've double-checked that the watchdog is disabled, but I'll take another look.&amp;nbsp; I'll also check out that tutorial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 20:15:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader/m-p/449192#M26592</guid>
      <dc:creator>ad52655</dc:creator>
      <dc:date>2015-08-25T20:15:15Z</dc:date>
    </item>
  </channel>
</rss>

