<?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 Processor runs at different speed in debug in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307772#M13103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;We are using Codewarrior 10.6. The processor is MK20DX128VLH7, 64 pin package, using Processor expert, with GCC toolchain.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;Having many problems getting this project to work. I have used the HC05,08,9S08, Coldfire for years, the ARM stuff is giving fits..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;In the effort to trouble shoot our actual project, we created a new dummy project with 1 bean that toggles an I/O pin in an endless loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;The frequency of this toggling is about 2.5 times faster in debug mode than when the unit is just powered up. (it's about 1Mhz in Debug and 390Khz in run mode).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;Why does the processor run at a different speed in debug than standalone?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 May 2014 21:34:25 GMT</pubDate>
    <dc:creator>randenewberry</dc:creator>
    <dc:date>2014-05-28T21:34:25Z</dc:date>
    <item>
      <title>Processor runs at different speed in debug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307772#M13103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;We are using Codewarrior 10.6. The processor is MK20DX128VLH7, 64 pin package, using Processor expert, with GCC toolchain.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;Having many problems getting this project to work. I have used the HC05,08,9S08, Coldfire for years, the ARM stuff is giving fits..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;In the effort to trouble shoot our actual project, we created a new dummy project with 1 bean that toggles an I/O pin in an endless loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;The frequency of this toggling is about 2.5 times faster in debug mode than when the unit is just powered up. (it's about 1Mhz in Debug and 390Khz in run mode).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;Why does the processor run at a different speed in debug than standalone?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="j-excerpt-slug"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 21:34:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307772#M13103</guid>
      <dc:creator>randenewberry</dc:creator>
      <dc:date>2014-05-28T21:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Processor runs at different speed in debug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307773#M13104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be that the debugger is 'tweaking' the clock registers. I'm using the KL25/15 parts with SwD.&amp;nbsp; Might be that the debugger configures the clocks to the flash memory to run faster than the default. (Helpful eh?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the K20 is similar to the Kl25 you can configure the CLKOUT pin to put out 'bus clock' Might try that and then see if the bus clock frequency changes in debug vs normal mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 00:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307773#M13104</guid>
      <dc:creator>gibbon1</dc:creator>
      <dc:date>2014-05-29T00:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Processor runs at different speed in debug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307774#M13105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rande&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the debug configuration to see whether it is loading and executing from SRAM. If this is the case it will probably be faster than when located in Flash since the Flash is slower (although compensated to some degree by caching and speculation operation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are having problems with the&amp;nbsp; K20 check out the uTasker project - &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;It gives a complete K20 project out of the box so doesn't require piecing things together and allows you to simulate the Kinetis and the board to make development much faster and simpler. It works with all standard tool chains including CW10.x, KDS, GCC, CooCox, Rowley, IAR and Keil. If you know the Coldfires, it also allows Coldfire and Kinetis projects (any KL or K part or Coldfire V2 part) to be interchanged between the families.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a screen shot of the simulator running the TWR K20N72M board - with UARTs (connected to PC COM ports for real-time operation) as well as USB, SD card (via SPI) etc.&lt;/P&gt;&lt;P&gt;Complete code can be downloaded from &lt;A href="http://www.utasker.com/forum/index.php?topic=1721.0" title="http://www.utasker.com/forum/index.php?topic=1721.0"&gt;KINETIS Project Code&lt;/A&gt; Attached is also a simulation executable that can be started by double clicking uTaskerV1-4_K20_TWR.exe (no installation needed) - it connects to COM 9 and attaching a serial loop back device allows controlling its command line menu, which enables working with the SD card, checking the accelerometer operation, controlling LEDs on the board and various such things.&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;span class="lia-inline-image-display-wrapper" image-alt="TWR-K20N72M.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44392iF5643783F9B7CE7B/image-size/large?v=v2&amp;amp;px=999" role="button" title="TWR-K20N72M.png" alt="TWR-K20N72M.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 00:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307774#M13105</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-05-29T00:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Processor runs at different speed in debug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307775#M13106</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 think all the problems we have stem from some setting that uses SRAM when we want to use FLASH.&lt;/P&gt;&lt;P&gt;We do not see in the debug configurations where we can choose to not use SRAM.&lt;/P&gt;&lt;P&gt;We are using the configuration named FLASH, but it seems to want to run from SRAM.&lt;/P&gt;&lt;P&gt;Is there some setting somewhere that forces both debugging and standalone to always use FLASH (never use SRAM)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 15:09:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307775#M13106</guid>
      <dc:creator>randenewberry</dc:creator>
      <dc:date>2014-05-30T15:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Processor runs at different speed in debug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307776#M13107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rande&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the linker script file being used in your debug configuration. That will be defining the location of code.&lt;/P&gt;&lt;P&gt;I don't know of any other settings - you may like to ask in the Codewarrior forum for CW related questions.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 15:53:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307776#M13107</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-05-30T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Processor runs at different speed in debug</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307777#M13108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do a test with TWR-K20D72M board to toggle PTC9 pin using Processor Expert [BitIO_LDD] component with CodeWarrior v10.6.&lt;/P&gt;&lt;P&gt;From attached scope screen copy, there without any difference when the code run with/without debugging.&lt;/P&gt;&lt;P&gt;I set the K20 core clock/bus clock run at 50MHz and Flash clock run at 25MHz.&lt;/P&gt;&lt;P&gt;The test code also be attached.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="tek00002.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43768i87DF23D96BCB4D15/image-size/large?v=v2&amp;amp;px=999" role="button" title="tek00002.png" alt="tek00002.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="tek00003.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43816iB37D3FE704AFC9FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="tek00003.png" alt="tek00003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Wish it help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Thu, 05 Jun 2014 03:10:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Processor-runs-at-different-speed-in-debug/m-p/307777#M13108</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2014-06-05T03:10:27Z</dc:date>
    </item>
  </channel>
</rss>

