<?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>Kinetis MicrocontrollersのトピックRe: K64 bootloader doesn't run after reset</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1238798#M59770</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183712"&gt;@dimi55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am glad to know&amp;nbsp; that you were able to find out the cause of the issue! &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yours,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;</description>
    <pubDate>Tue, 02 Mar 2021 16:50:33 GMT</pubDate>
    <dc:creator>diego_charles</dc:creator>
    <dc:date>2021-03-02T16:50:33Z</dc:date>
    <item>
      <title>K64 bootloader doesn't run after reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1234259#M59703</link>
      <description>&lt;P&gt;I have been reviving an older bootloader project written in CodeWarrior (later ported to KDS) and now have trouble flashing the binary "permanently". The program is debugging fine, everything works as expected. First run (after reset) from flash runs fine, but upon resetting the MCU or switching the power on/off it doesn't run. There is nothing suspicious in linker script and startup files that I could find. Debugging step by step from entry point also doesn't look suspicious as it goes through all the inits and runs the main just fine.&lt;/P&gt;&lt;P&gt;In system_MK64F12.c only the watchdog gets disabled and everything else is skipped.&lt;/P&gt;&lt;PRE&gt;void SystemInit (void) {&lt;BR /&gt;#if ((__FPU_PRESENT == 1) &amp;amp;&amp;amp; (__FPU_USED == 1))&lt;BR /&gt;SCB-&amp;gt;CPACR |= ((3UL &amp;lt;&amp;lt; 10*2) | (3UL &amp;lt;&amp;lt; 11*2)); /* set CP10, CP11 Full Access */&lt;BR /&gt;#endif /* ((__FPU_PRESENT == 1) &amp;amp;&amp;amp; (__FPU_USED == 1)) */&lt;BR /&gt;#if (DISABLE_WDOG)&lt;BR /&gt;/* WDOG-&amp;gt;UNLOCK: WDOGUNLOCK=0xC520 */&lt;BR /&gt;WDOG-&amp;gt;UNLOCK = WDOG_UNLOCK_WDOGUNLOCK(0xC520); /* Key 1 */&lt;BR /&gt;/* WDOG-&amp;gt;UNLOCK: WDOGUNLOCK=0xD928 */&lt;BR /&gt;WDOG-&amp;gt;UNLOCK = WDOG_UNLOCK_WDOGUNLOCK(0xD928); /* Key 2 */&lt;BR /&gt;/* WDOG-&amp;gt;STCTRLH: ?=0,DISTESTWDOG=0,BYTESEL=0,TESTSEL=0,TESTWDOG=0,?=0,?=1,WAITEN=1,STOPEN=1,DBGEN=0,ALLOWUPDATE=1,WINEN=0,IRQRSTEN=0,CLKsrc=1,WDOGEN=0 */&lt;BR /&gt;WDOG-&amp;gt;STCTRLH = WDOG_STCTRLH_BYTESEL(0x00) |&lt;BR /&gt;WDOG_STCTRLH_WAITEN_MASK |&lt;BR /&gt;WDOG_STCTRLH_STOPEN_MASK |&lt;BR /&gt;WDOG_STCTRLH_ALLOWUPDATE_MASK |&lt;BR /&gt;WDOG_STCTRLH_CLKSRC_MASK |&lt;BR /&gt;0x0100U;&lt;BR /&gt;#endif /* (DISABLE_WDOG) */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something in the procedure (in flashing the bootloader) or linker/startup files are setup wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 09:44:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1234259#M59703</guid>
      <dc:creator>dimi55</dc:creator>
      <dc:date>2021-02-22T09:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader doesn't run after reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1236770#M59745</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183712"&gt;@dimi55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well!&lt;/P&gt;
&lt;P&gt;I am not aware&amp;nbsp; how your bootloader intends to write an image. For example, flash resident bootloaders use to take place the application image after 0xA000. It may be posible that both bootlader image and application image have an overlap and thats may be generating troubles.&lt;/P&gt;
&lt;P&gt;Another thing that I am thinking is that you could check is whether your application can not boot due to an incorrect clock setting in the aplication itsef.&lt;/P&gt;
&lt;P&gt;I am not aware if already cheked the Kinetis Bootloader:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;For using KDS we do have Kinetis bootloader (flash resident and flash loader) implementations&amp;nbsp;&amp;nbsp; This is the link for downloading the&amp;nbsp; &lt;A href="https://www.nxp.com/webapp/Download?colCode=NXP_KINETIS_BOOTLOADER_2_0_0&amp;amp;appType=license" target="_blank" rel="noopener"&gt;Kinetis bootloader 2.0.0&lt;/A&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;You can look at this implementation in this path NXP_Kinetis_Bootloader_2_0_0\targets\MK64F12\kds\&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;The &amp;nbsp;&lt;A href="https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=&amp;amp;ved=2ahUKEwjr6auTwYXvAhVJ-qwKHcC2CsoQFjAAegQIAhAD&amp;amp;url=https%3A%2F%2Fcommunity.nxp.com%2Fpwmxy87654%2Fattachments%2Fpwmxy87654%2Fkinetis%2F37590%2F1%2FKinetis%2520Bootloader%2520v2.0.0%2520Reference%2520Manual.pdf&amp;amp;usg=AOvVaw0_PkZLNzMMbGIXVYEhFf7W" target="_blank" rel="noopener"&gt;Kinetis Bootloader v2.0.0 Reference Manual&lt;/A&gt; also provides information regarding the Kinetis bootloader settings and operation . Also &amp;nbsp;you will also find hints regarding &amp;nbsp;&amp;nbsp;bootloader &amp;nbsp;clocking and &amp;nbsp;memory map under Chapter 10 Kinetis bootloader porting.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;On a side note:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;Kinetis devices are now also supported by the MCUXpresso SDK and MCUXpresso IDE .Actually,&amp;nbsp; the Kinetis bootloader, has been re-branded to &lt;A href="https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuboot-mcu-bootloader-for-nxp-microcontrollers:MCUBOOT" target="_blank" rel="noopener"&gt;MCU boot&lt;/A&gt;. The MCU bootloader provides&amp;nbsp; the same bootloader implementations that I mentioned before, and they are included in the MCUXpresso SDK.&lt;/P&gt;
&lt;P&gt;I hope this could&amp;nbsp; help.&lt;/P&gt;
&lt;P&gt;My apologies for the delay&lt;/P&gt;
&lt;P&gt;Diego.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 17:33:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1236770#M59745</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-02-25T17:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader doesn't run after reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1238769#M59768</link>
      <description>&lt;P&gt;Hi Diego,&lt;/P&gt;&lt;P&gt;Your comment lead me to an answer. The problem was the NMI pin that held the MCU in reset state. Disabling it and EzPort helped. The problem was nothing I suspected but your comment helped me figure it out. It was really an eyeopener.&lt;/P&gt;&lt;P&gt;Thanks Diego!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 15:44:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1238769#M59768</guid>
      <dc:creator>dimi55</dc:creator>
      <dc:date>2021-03-02T15:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: K64 bootloader doesn't run after reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1238798#M59770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183712"&gt;@dimi55&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am glad to know&amp;nbsp; that you were able to find out the cause of the issue! &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yours,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 16:50:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K64-bootloader-doesn-t-run-after-reset/m-p/1238798#M59770</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-03-02T16:50:33Z</dc:date>
    </item>
  </channel>
</rss>

