<?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: Re: The question about K64 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374116#M19545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;The source code of the PLL configuration for&amp;nbsp; both &lt;SPAN style="color: #666666; line-height: 107%; font-family: 'Helvetica','sans-serif'; font-size: 10.5pt;"&gt;bootloader (1) and &lt;/SPAN&gt;&lt;STRONG&gt;Bootloader 2&amp;nbsp; is the same. The source code is in the attachment.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Sep 2014 01:11:32 GMT</pubDate>
    <dc:creator>小勇邹</dc:creator>
    <dc:date>2014-09-18T01:11:32Z</dc:date>
    <item>
      <title>The question about K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374114#M19543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My device is &lt;SPAN style="color: #1f497d;"&gt;MK64FN1M0VMD12.The hardware is TWR-K64F120M. My compiler is IAR 7.2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have write a bootloader.&lt;/P&gt;&lt;P&gt;There are two parts for my program.&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="padding: 0px 5.4pt; border: currentColor;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="2" style="padding: 0px 5.4pt; border: 1pt solid windowtext;" valign="top" width="755"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;STRONG style="line-height: 150%; font-size: 10pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 宋体;"&gt;Boot loader 1&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;INTERRUPT VECTOR TABLE&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;1KB($00000000-$000003FF)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;NONVOLATILE REGISTERS(FLASH CONFIGURATION)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;16 bytes ($00000400-$0000040F)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;BOOT LOADER 1&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;3056 bytes($00000410-$00000FFF)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="2" style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0px 5.4pt;" valign="top" width="755"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;STRONG style="line-height: 150%; font-size: 10pt; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 宋体;"&gt;Boot loader 2&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;RELOCATED INTERRUPT VECTOR TABLE&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;1KB($00001000-$000013FF)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentColor windowtext windowtext; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;BOOT LOADER 2&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentColor windowtext windowtext currentColor; padding: 0px 5.4pt;" valign="top" width="378"&gt;&lt;BR /&gt;&amp;nbsp; &lt;P style="margin-bottom: 3pt;"&gt;&lt;SPAN style="line-height: 150%; font-family: 'Times New Roman','serif'; font-size: 10pt; mso-fareast-font-family: 宋体;"&gt;31KB($00001400-$00008FFF)&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I write the program in the &lt;STRONG&gt;Boot loader 1 to jump to Boot loader 2.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; #define RELOCATED_VECTORS 0x1000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCB_VTOR =&lt;BR /&gt;RELOCATED_VECTORS;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;JumpToUserApplication(*((unsigned&lt;BR /&gt;long*)RELOCATED_VECTORS), *((unsigned long*)(RELOCATED_VECTORS+4)));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;void JumpToUserApplication(LWord userSP, LWord userStartup)&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// set up stack&lt;BR /&gt;pointer&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; __asm("msr msp, r0");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; __asm("msr psp, r0");&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; // Jump to PC (r1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; __asm("mov pc, r1"); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before I adding the source code(as follow shown). The &lt;STRONG&gt;Boot loader 1 &lt;/STRONG&gt;jumps to &lt;STRONG&gt;Boot loader 2 &lt;/STRONG&gt;normally.&lt;/P&gt;&lt;P&gt;__root const unsigned char FlashCheck1_user @ 0x2fff ;&lt;/P&gt;&lt;P&gt; __root const unsigned char FlashCheck2_user @ 0x4fff;&lt;/P&gt;&lt;P&gt; __root const unsigned char FlashCheck3_user @ 0x6fff;&lt;/P&gt;&lt;P&gt; __root const unsigned char FlashCheck4_user @ 0x8fff;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I adding the source code(as follow above). The &lt;STRONG&gt;Boot loader 1 &lt;/STRONG&gt;can not&amp;nbsp; jumps to &lt;STRONG&gt;Bootloader 2 &lt;/STRONG&gt;normally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the program runs normally.But sometimes the program cannot run normally.It stops in&lt;BR /&gt;the source code(as shown below) of Boot loader 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while((MCG-&amp;gt;S &amp;amp; MCG_S_LOCK0_MASK) == 0x00U) { /* Wait&lt;BR /&gt;until PLL is locked*/&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me the reason? Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 06:37:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374114#M19543</guid>
      <dc:creator>小勇邹</dc:creator>
      <dc:date>2014-09-17T06:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: The question about K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374115#M19544</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;If your boot loader (1) configures the PLL you may need to be sure that the code in the application (boot loader 2) used to configure it (again) doesn't 'assume' that the PLL control (clock state) is in its reset state. It needs to be able to handle starting in one of the other clock states.&lt;/P&gt;&lt;P&gt;Therefore I would review the PLL configuration code in the application to see whether it can reliably handle thiks.&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;P.S. If the boot loader (1) is configuring the PLL to the frequency needed by the apllication the application doesn't need any PLL configuration code of its own.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 13:38:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374115#M19544</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-09-17T13:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re: The question about K64</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374116#M19545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mark,&lt;/P&gt;&lt;P&gt;The source code of the PLL configuration for&amp;nbsp; both &lt;SPAN style="color: #666666; line-height: 107%; font-family: 'Helvetica','sans-serif'; font-size: 10.5pt;"&gt;bootloader (1) and &lt;/SPAN&gt;&lt;STRONG&gt;Bootloader 2&amp;nbsp; is the same. The source code is in the attachment.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 01:11:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-question-about-K64/m-p/374116#M19545</guid>
      <dc:creator>小勇邹</dc:creator>
      <dc:date>2014-09-18T01:11:32Z</dc:date>
    </item>
  </channel>
</rss>

