<?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: KL03z Runs slower wi KDS</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1486690#M63542</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196751"&gt;@Msanad&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I'm not sure if the code piece you gave here is real or not.&lt;/P&gt;&lt;P&gt;If this is real code, then no wonder that you see a huge difference. And you really never (never!) should write such a thing. Because the compiler simply can optimize it away. If you really want to keep it in place, use 'volatile' for it.&lt;/P&gt;&lt;P&gt;In essence to your question: KDS has an older gcc compiler, while the one in MCUXpresso is newer and optimizes a bit more. But if your turn on optimizations (e.g. -O3) for KDS, you will see the same.&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2022 07:59:12 GMT</pubDate>
    <dc:creator>ErichStyger</dc:creator>
    <dc:date>2022-07-08T07:59:12Z</dc:date>
    <item>
      <title>KL03z Runs slower wi KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1484539#M63511</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I built a project with KL03z board using MCUXpresso IDE, now I have to migrate to KDS. I encountered some problems during the process, so I decided to build from scratch and troubleshoot step by step.&lt;BR /&gt;One major problem is that the processor seems to run at a lower frequency ( I used the same TPM configuration btw) and this damages the functionality of the project. There is at least 7 microseconds between two flags when the TPM handler has nothing to do but clear the flag and toggle a pin. If I have more instructions that must be done between two flags this period grows longer.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So, I used the following function&amp;nbsp;( no TPM used) to toggle a pin an check the frequency with an oscilloscope ;&lt;/P&gt;&lt;P&gt;void delay( unsigned int time_del)&lt;BR /&gt;{&lt;BR /&gt;time_del *= X;&lt;/P&gt;&lt;P&gt;while (time_del--)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;While using MCUXpresso, the value X is around 4.35 to count a million in one second, while in KDS I had to reduce it to 0.7 which is almost 6 times slower than the previuos case.&lt;BR /&gt;I thought maybe it's running in VLPR mode ( I think it doesn't switch from Normal Run unless configuered otherwise) and tried to disable other power modes and had no improvement.&lt;/P&gt;&lt;P&gt;Surely I'm missing something but I can't figure out what it is, so any sort of help would be highly appreciated &lt;LI-EMOJI id="lia_grinning-face-with-smiling-eyes" title=":grinning_face_with_smiling_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;MSanad&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 09:19:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1484539#M63511</guid>
      <dc:creator>Msanad</dc:creator>
      <dc:date>2022-07-05T09:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: KL03z Runs slower wi KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1486435#M63535</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Unfortunately, the KDS IDE is no longer supported, the new IDE is MCUXpresso. I apologize if this may cause an inconvenience.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 22:44:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1486435#M63535</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-07-07T22:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: KL03z Runs slower wi KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1486690#M63542</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196751"&gt;@Msanad&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I'm not sure if the code piece you gave here is real or not.&lt;/P&gt;&lt;P&gt;If this is real code, then no wonder that you see a huge difference. And you really never (never!) should write such a thing. Because the compiler simply can optimize it away. If you really want to keep it in place, use 'volatile' for it.&lt;/P&gt;&lt;P&gt;In essence to your question: KDS has an older gcc compiler, while the one in MCUXpresso is newer and optimizes a bit more. But if your turn on optimizations (e.g. -O3) for KDS, you will see the same.&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 07:59:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1486690#M63542</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2022-07-08T07:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: KL03z Runs slower wi KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1487422#M63549</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/17173"&gt;@ErichStyger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply, your answers are of a&amp;nbsp; great help, and sorry for late reply I just went back to lab.&lt;BR /&gt;I tried 'volatile' but that didn't seem to be the source of my problem.&lt;BR /&gt;After some invistigation I found my mistake, I just had to select the "HIRC clock" as the main clock.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In MCUXpresso there was the function " BOARD_BootClockRUN();" which did the job.&lt;BR /&gt;Without using processor expert in KDS, seems the board selects a lower frequency clock. So, Just typed down:&lt;BR /&gt;MCG -&amp;gt; MC |= MCG_MC_HIRCEN(1);&amp;nbsp;&lt;BR /&gt;MCG -&amp;gt; C1&amp;nbsp; &amp;nbsp;= MCG_C1_CLKS(0) ;&lt;/P&gt;&lt;P&gt;and it all went well &lt;LI-EMOJI id="lia_grinning-face-with-smiling-eyes" title=":grinning_face_with_smiling_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 10:27:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL03z-Runs-slower-wi-KDS/m-p/1487422#M63549</guid>
      <dc:creator>Msanad</dc:creator>
      <dc:date>2022-07-11T10:27:55Z</dc:date>
    </item>
  </channel>
</rss>

