<?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 K60 can't disable watchdog when running from external code memory in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-can-t-disable-watchdog-when-running-from-external-code/m-p/389028#M21105</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running code&amp;nbsp; on a K60FX12VLQ12 in external flash memory through the aliased region of memory.&amp;nbsp; I'm trying to run a demo program and it resets when running the wdog_disable function (it unlocks the the watchdog then clears the wdog enable bit in the control register).&amp;nbsp; I see in the comments that you can't single step through this code because it has to finish within 20 clock cycles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the code in internal RAM or FLASH, it gets by the wdog_disable function every time. When I run the code in external flash it resets before it gets past this section of code.&amp;nbsp; I tried lowering the waitstates from 4 to 2 and it still would reset before making it through.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does the code run too slow in external flash to disable the watchdog?&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using IAR Workbench and did some tests using the CYCLECOUNTER value in the debugger with different builds.&amp;nbsp; I set a breakpoint early in the bootcode where the wdog_disable function is called.&amp;nbsp; I ran the code until it hit the breakpoint and recorded the CYCLECOUNTER for each memory type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code Memory&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; CYCLECOUNTS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Internal RAM&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; 19&lt;/P&gt;&lt;P&gt;Internal FLASH&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; 23&lt;/P&gt;&lt;P&gt;External FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 574&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Incidentally, when I single step through the code it takes 18 counts no matter where the code is running. &lt;STRONG&gt; Does that have to do with the type of breakpoint?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 02:38:10 GMT</pubDate>
    <dc:creator>cktrod</dc:creator>
    <dc:date>2014-08-29T02:38:10Z</dc:date>
    <item>
      <title>K60 can't disable watchdog when running from external code memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-can-t-disable-watchdog-when-running-from-external-code/m-p/389028#M21105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running code&amp;nbsp; on a K60FX12VLQ12 in external flash memory through the aliased region of memory.&amp;nbsp; I'm trying to run a demo program and it resets when running the wdog_disable function (it unlocks the the watchdog then clears the wdog enable bit in the control register).&amp;nbsp; I see in the comments that you can't single step through this code because it has to finish within 20 clock cycles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the code in internal RAM or FLASH, it gets by the wdog_disable function every time. When I run the code in external flash it resets before it gets past this section of code.&amp;nbsp; I tried lowering the waitstates from 4 to 2 and it still would reset before making it through.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Does the code run too slow in external flash to disable the watchdog?&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using IAR Workbench and did some tests using the CYCLECOUNTER value in the debugger with different builds.&amp;nbsp; I set a breakpoint early in the bootcode where the wdog_disable function is called.&amp;nbsp; I ran the code until it hit the breakpoint and recorded the CYCLECOUNTER for each memory type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code Memory&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; CYCLECOUNTS&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Internal RAM&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; 19&lt;/P&gt;&lt;P&gt;Internal FLASH&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; 23&lt;/P&gt;&lt;P&gt;External FLASH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 574&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Incidentally, when I single step through the code it takes 18 counts no matter where the code is running. &lt;STRONG&gt; Does that have to do with the type of breakpoint?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 02:38:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-can-t-disable-watchdog-when-running-from-external-code/m-p/389028#M21105</guid>
      <dc:creator>cktrod</dc:creator>
      <dc:date>2014-08-29T02:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: K60 can't disable watchdog when running from external code memory</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-can-t-disable-watchdog-when-running-from-external-code/m-p/389029#M21106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try to enable the code cache at Local Memory Controller for Flexbus of K60FX12VLQ12.&lt;/P&gt;&lt;P&gt;With the code cache enable, the code execute in external Flash (Flexbus) performance will be enhanced. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it helps.&lt;BR /&gt;best regards &lt;BR /&gt;Ma Hui&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>Wed, 03 Sep 2014 06:18:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-can-t-disable-watchdog-when-running-from-external-code/m-p/389029#M21106</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-09-03T06:18:48Z</dc:date>
    </item>
  </channel>
</rss>

