<?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 MK22FN512 NXP_Kinetis_Bootloader_2_0_0&amp;#160; jump to APP sometimes successful sometimes failure. in MCU Bootloader</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/MK22FN512-NXP-Kinetis-Bootloader-2-0-0-160-jump-to-APP-sometimes/m-p/626735#M210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I use the device MK22FN512,want &amp;nbsp;using boot NXP_Kinetis_Bootloader_2_0_0, &amp;nbsp;jump to APP, but APP sometimes successful, sometimes failure.&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0 compiler environment: Kinetis Design Studio Version: 3.2.0&amp;nbsp;&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0 program start address: 0x0000,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The following is the address configuration：&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;MEMORY&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;{&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;NXP_Kinetis_Bootloader_2_0_0 clock I have not modified.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&lt;SPAN style="border: 0px;"&gt;APP&amp;nbsp;compiler environment: &lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;Kinetis Design Studio Version: 3.2.0&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;following is the address configuration for APP：&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Entry Point */&lt;BR /&gt;ENTRY(__thumb_startup)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Highest address of the user mode stack */&lt;BR /&gt;_estack = 0x20010000; /* end of m_data */&lt;BR /&gt;__SP_INIT = _estack;&lt;BR /&gt;__stack = _estack;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Generate a link error if heap and stack don't fit into RAM */&lt;BR /&gt;__heap_size = 0x00; /* required amount of heap */&lt;BR /&gt;__stack_size = 0x0400; /* required amount of stack */&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;MEMORY {&lt;BR /&gt;m_interrupts (RX) : ORIGIN = 0x0000A000, LENGTH = 0x00000198&lt;BR /&gt;m_text (RX) : ORIGIN = 0x0000A410, LENGTH = 0x00075BF0&lt;BR /&gt;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&lt;BR /&gt;m_cfmprotrom (RX) : ORIGIN = 0x0000A400, LENGTH = 0x00000010&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;APP uses the clock mode: PEE, the external crystal is 10MHz&lt;BR /&gt;From the NXP_Kinetis_Bootloader_2_0_0 start and then jump to the APP failed, through the emulator to observe, the error at the following address (CPU_Init.c):&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170457_170457.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122574i5BF2E7C974443092/image-size/large?v=v2&amp;amp;px=999" role="button" title="170457_170457.png" alt="170457_170457.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8726i606505809EE2EB89/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;When the APP program address is 0x0000, the following configuration does not have the above problem.&lt;/P&gt;&lt;P style="border: 0px;"&gt;/* Entry Point */&lt;BR /&gt;ENTRY(__thumb_startup)&lt;/P&gt;&lt;P style="border: 0px;"&gt;/* Highest address of the user mode stack */&lt;BR /&gt;_estack = 0x20010000; /* end of m_data */&lt;BR /&gt;__SP_INIT = _estack;&lt;BR /&gt;__stack = _estack;&lt;/P&gt;&lt;P style="border: 0px;"&gt;/* Generate a link error if heap and stack don't fit into RAM */&lt;BR /&gt;__heap_size = 0x00; /* required amount of heap */&lt;BR /&gt;__stack_size = 0x0400; /* required amount of stack */&lt;/P&gt;&lt;P style="border: 0px;"&gt;MEMORY {&lt;BR /&gt;m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000198&lt;BR /&gt;m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x00075BF0&lt;BR /&gt;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&lt;BR /&gt;m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;BR /&gt;}&lt;/P&gt;&lt;P style="border: 0px;"&gt;The following is a APP clock configuration：&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170458_170458.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122575iC815AF5C01BF782A/image-size/large?v=v2&amp;amp;px=999" role="button" title="170458_170458.png" alt="170458_170458.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8727iEAF178107A85671D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170459_170459.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122576i8EFE6567163DCB04/image-size/large?v=v2&amp;amp;px=999" role="button" title="170459_170459.png" alt="170459_170459.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8728iE2E244D45FF478F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DDv5h6Nv08L1KlC2CqpDA_g4m2_UbX5Adzikx1K6X3BjMNCIBGhByQmMtDH9yE-7GiyHZaeNihSdg-2PgplXMJie64yAKEvF6yz1YolikRZ7%26wd%3D%26eqid%3D86fc4ffe0001768a0000000658379831" rel="nofollow" target="_blank"&gt;APP project on attachment&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;How is the cause of this problem?&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Thanks &amp;amp; regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Andy ,China&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338546"&gt;LED_DEMO.7z.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Nov 2016 03:16:21 GMT</pubDate>
    <dc:creator>andypeng</dc:creator>
    <dc:date>2016-11-26T03:16:21Z</dc:date>
    <item>
      <title>MK22FN512 NXP_Kinetis_Bootloader_2_0_0  jump to APP sometimes successful sometimes failure.</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/MK22FN512-NXP-Kinetis-Bootloader-2-0-0-160-jump-to-APP-sometimes/m-p/626735#M210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I use the device MK22FN512,want &amp;nbsp;using boot NXP_Kinetis_Bootloader_2_0_0, &amp;nbsp;jump to APP, but APP sometimes successful, sometimes failure.&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0 compiler environment: Kinetis Design Studio Version: 3.2.0&amp;nbsp;&lt;BR /&gt;NXP_Kinetis_Bootloader_2_0_0 program start address: 0x0000,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The following is the address configuration：&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;MEMORY&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;{&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;NXP_Kinetis_Bootloader_2_0_0 clock I have not modified.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&lt;SPAN style="border: 0px;"&gt;APP&amp;nbsp;compiler environment: &lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;Kinetis Design Studio Version: 3.2.0&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px;"&gt;following is the address configuration for APP：&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Entry Point */&lt;BR /&gt;ENTRY(__thumb_startup)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Highest address of the user mode stack */&lt;BR /&gt;_estack = 0x20010000; /* end of m_data */&lt;BR /&gt;__SP_INIT = _estack;&lt;BR /&gt;__stack = _estack;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;/* Generate a link error if heap and stack don't fit into RAM */&lt;BR /&gt;__heap_size = 0x00; /* required amount of heap */&lt;BR /&gt;__stack_size = 0x0400; /* required amount of stack */&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;MEMORY {&lt;BR /&gt;m_interrupts (RX) : ORIGIN = 0x0000A000, LENGTH = 0x00000198&lt;BR /&gt;m_text (RX) : ORIGIN = 0x0000A410, LENGTH = 0x00075BF0&lt;BR /&gt;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&lt;BR /&gt;m_cfmprotrom (RX) : ORIGIN = 0x0000A400, LENGTH = 0x00000010&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;APP uses the clock mode: PEE, the external crystal is 10MHz&lt;BR /&gt;From the NXP_Kinetis_Bootloader_2_0_0 start and then jump to the APP failed, through the emulator to observe, the error at the following address (CPU_Init.c):&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170457_170457.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122574i5BF2E7C974443092/image-size/large?v=v2&amp;amp;px=999" role="button" title="170457_170457.png" alt="170457_170457.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8726i606505809EE2EB89/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;When the APP program address is 0x0000, the following configuration does not have the above problem.&lt;/P&gt;&lt;P style="border: 0px;"&gt;/* Entry Point */&lt;BR /&gt;ENTRY(__thumb_startup)&lt;/P&gt;&lt;P style="border: 0px;"&gt;/* Highest address of the user mode stack */&lt;BR /&gt;_estack = 0x20010000; /* end of m_data */&lt;BR /&gt;__SP_INIT = _estack;&lt;BR /&gt;__stack = _estack;&lt;/P&gt;&lt;P style="border: 0px;"&gt;/* Generate a link error if heap and stack don't fit into RAM */&lt;BR /&gt;__heap_size = 0x00; /* required amount of heap */&lt;BR /&gt;__stack_size = 0x0400; /* required amount of stack */&lt;/P&gt;&lt;P style="border: 0px;"&gt;MEMORY {&lt;BR /&gt;m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000198&lt;BR /&gt;m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x00075BF0&lt;BR /&gt;m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000&lt;BR /&gt;m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;BR /&gt;}&lt;/P&gt;&lt;P style="border: 0px;"&gt;The following is a APP clock configuration：&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170458_170458.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122575iC815AF5C01BF782A/image-size/large?v=v2&amp;amp;px=999" role="button" title="170458_170458.png" alt="170458_170458.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8727iEAF178107A85671D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="170459_170459.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122576i8EFE6567163DCB04/image-size/large?v=v2&amp;amp;px=999" role="button" title="170459_170459.png" alt="170459_170459.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/8728iE2E244D45FF478F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.baidu.com%2Flink%3Furl%3DDv5h6Nv08L1KlC2CqpDA_g4m2_UbX5Adzikx1K6X3BjMNCIBGhByQmMtDH9yE-7GiyHZaeNihSdg-2PgplXMJie64yAKEvF6yz1YolikRZ7%26wd%3D%26eqid%3D86fc4ffe0001768a0000000658379831" rel="nofollow" target="_blank"&gt;APP project on attachment&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;How is the cause of this problem?&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Thanks &amp;amp; regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Andy ,China&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338546"&gt;LED_DEMO.7z.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Nov 2016 03:16:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/MK22FN512-NXP-Kinetis-Bootloader-2-0-0-160-jump-to-APP-sometimes/m-p/626735#M210</guid>
      <dc:creator>andypeng</dc:creator>
      <dc:date>2016-11-26T03:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: MK22FN512 NXP_Kinetis_Bootloader_2_0_0  jump to APP sometimes successful sometimes failure.</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/MK22FN512-NXP-Kinetis-Bootloader-2-0-0-160-jump-to-APP-sometimes/m-p/626736#M211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to replace the clock_switch() function in clock_config_K22F512.c with below one, hope it could be helpful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void clock_mode_switch(const target_clock_mode_t currentMode, const target_clock_mode_t expectedMode)&lt;BR /&gt;{&lt;BR /&gt; // Note: here only implements clock switch between FEI and FEE,&lt;BR /&gt; // The other modes are not supported.&lt;BR /&gt; assert(currentMode == kClockMode_FEE || currentMode == kClockMode_FEI);&lt;BR /&gt; assert(expectedMode == kClockMode_FEE || expectedMode == kClockMode_FEI);&lt;/P&gt;&lt;P&gt;if (currentMode == expectedMode)&lt;BR /&gt; {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;if (expectedMode == kClockMode_FEE)&lt;BR /&gt; {&lt;BR /&gt; uint8_t tmp;&lt;BR /&gt; /* Switch to FEE mode */&lt;BR /&gt; tmp = MCG-&amp;gt;C2;&lt;BR /&gt; tmp &amp;amp;= (uint8_t)~MCG_C2_RANGE_MASK;&lt;BR /&gt; tmp |= MCG_C2_RANGE(2);&lt;BR /&gt; MCG-&amp;gt;C2 = tmp; /* MCG_C2: RANGE = 2 */&lt;/P&gt;&lt;P&gt;tmp = MCG-&amp;gt;C1;&lt;BR /&gt; tmp &amp;amp;= (uint8_t) ~(MCG_C1_FRDIV_MASK | MCG_C1_IREFS_MASK);&lt;BR /&gt; tmp |= MCG_C1_FRDIV(6);&lt;BR /&gt; MCG-&amp;gt;C1 = tmp; // FRDIV=6, RANGE=2, divide IRC48M with 1280, switch to external reference clock.&lt;/P&gt;&lt;P&gt;tmp = MCG-&amp;gt;C4;&lt;BR /&gt; tmp &amp;amp;= (uint8_t)~MCG_C4_DRST_DRS_MASK;&lt;BR /&gt; tmp |= MCG_C4_DRST_DRS(1);&lt;BR /&gt; MCG-&amp;gt;C4 = tmp; // Multiply with 1280, MCGOUTCLK is 48Mhz&lt;/P&gt;&lt;P&gt;tmp = MCG-&amp;gt;C7;&lt;BR /&gt; tmp &amp;amp;= (uint8_t)~MCG_C7_OSCSEL_MASK;&lt;BR /&gt; tmp |= MCG_C7_OSCSEL(2);&lt;BR /&gt; MCG-&amp;gt;C7 = tmp; // Select IRC48M as Oscillator.&lt;/P&gt;&lt;P&gt;while (MCG-&amp;gt;S &amp;amp; MCG_S_IREFST_MASK)&lt;BR /&gt; ; // Wait until external reference clock is ready.&lt;BR /&gt; }&lt;BR /&gt; else if (expectedMode == kClockMode_FEI)&lt;BR /&gt; {&lt;BR /&gt; MCG-&amp;gt;C1 |= MCG_C1_IREFS_MASK; // Switch to internal reference clock.&lt;BR /&gt; while (!(MCG-&amp;gt;S &amp;amp; MCG_S_IREFST_MASK))&lt;BR /&gt; ;&lt;/P&gt;&lt;P&gt;// Wait until internal reference clock is ready.&lt;/P&gt;&lt;P&gt;// Wait 2 cycles of the slow IRC + 2 cycles of OSCERCLK after MCG[IREFS]&lt;BR /&gt; // has been set to 1.&lt;BR /&gt; for (volatile uint32_t delay_cnt=0; delay_cnt &amp;lt; 16 * 1000; delay_cnt++)&lt;BR /&gt; {&lt;BR /&gt; __NOP();&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; // Restore registers to default value out of reset.&lt;BR /&gt; MCG-&amp;gt;C1 = 0x04U;&lt;BR /&gt; MCG-&amp;gt;C2 = 0x80U;&lt;/P&gt;&lt;P&gt;MCG-&amp;gt;C4 &amp;amp;= (uint8_t)MCG_C4_DRST_DRS_MASK;&lt;BR /&gt; MCG-&amp;gt;C7 = 0;&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Fan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 15:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/MK22FN512-NXP-Kinetis-Bootloader-2-0-0-160-jump-to-APP-sometimes/m-p/626736#M211</guid>
      <dc:creator>ramboyang</dc:creator>
      <dc:date>2016-12-06T15:01:53Z</dc:date>
    </item>
  </channel>
</rss>

