<?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 Configuring PLL on K24 with 16MHz oscillator using the clocks tool  in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716660#M43976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I’m trying to use the clocks tool on the MCUXpresso page and the generated code isn’t working for me. I’m looking to generate&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;Clock_config.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;Clock_config.h&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I started with an example project for the K64 Freedom board using a 50MHz crystal. Now I would like the same code to run on a K24 with a 16MHz oscillator. I have attached the generated files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I get stuck on line 1503 of fsl_clock.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;/* Wait for CLKST clock status bits to show clock source is ext ref clk */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;On a bit of a side note here, I removed the clock configuration all together in an attempt to move forward on some other things but when I try to write to the PORTA-&amp;gt;PSOR register I get a JLINK error &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;"Could not start CPU core (error code: -1)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I'm hoping this has something to do with not configuring the clocks but I'm not sure. Any idea what this might be? I have ungated the PORTA clock in the system integration module. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Feb 2018 14:08:12 GMT</pubDate>
    <dc:creator>ryanlush</dc:creator>
    <dc:date>2018-02-05T14:08:12Z</dc:date>
    <item>
      <title>Configuring PLL on K24 with 16MHz oscillator using the clocks tool</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716660#M43976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I’m trying to use the clocks tool on the MCUXpresso page and the generated code isn’t working for me. I’m looking to generate&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;Clock_config.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;Clock_config.h&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I started with an example project for the K64 Freedom board using a 50MHz crystal. Now I would like the same code to run on a K24 with a 16MHz oscillator. I have attached the generated files.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I get stuck on line 1503 of fsl_clock.c&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;/* Wait for CLKST clock status bits to show clock source is ext ref clk */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;On a bit of a side note here, I removed the clock configuration all together in an attempt to move forward on some other things but when I try to write to the PORTA-&amp;gt;PSOR register I get a JLINK error &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;"Could not start CPU core (error code: -1)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0.0001pt; font-size: 12pt; color: #000000; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 11pt;"&gt;I'm hoping this has something to do with not configuring the clocks but I'm not sure. Any idea what this might be? I have ungated the PORTA clock in the system integration module. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 14:08:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716660#M43976</guid>
      <dc:creator>ryanlush</dc:creator>
      <dc:date>2018-02-05T14:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring PLL on K24 with 16MHz oscillator using the clocks tool</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716661#M43977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ryan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't find the referenced code in the attached files but it may be that you are specifying a 16MHz "oscillator" instead of a 16MHz "crystal" in which case the oscillator enable will be missing and switching to an external source would hang.&lt;BR /&gt;The generation tools may or may not work - I have seen them fail in some cases so it makes sense to understand the operation you need so you can patch when necessary.&lt;BR /&gt;&lt;SPAN&gt;I have written an overview at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FMCG.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/MCG.html&lt;/A&gt;&lt;SPAN&gt; which explains the switch controls, modes and sequences that should be respected, including some register switch positions that make it more logical than the Kinetis user's manual (as well as some hidden switches that are not really described in their context).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your port issue will not be related to the clock if you just run at the chips default rate (about 21MHz). The JTAG signals are on PORTA so beware that you don't have code switching them to different functions and losing JTAG connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You still have 20 minutes free remote desktop consultancy left in case you need a quick fix ;-)&lt;/EM&gt;&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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Kinetis: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;BR /&gt;Kinetis K21/K22/K24:&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K21D50M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K21D50M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K21F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K21F120M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-K22F.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-K22F.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K22F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K22F120M.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FBLAZE_K22.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/BLAZE_K22.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;- &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FTWR-K24F120M.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/kinetis/TWR-K24F120M.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Free Open Source solution: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FuTasker%2FuTasker-Kinetis" rel="nofollow" target="_blank"&gt;https://github.com/uTasker/uTasker-Kinetis&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Working project in 15 minutes video: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fyoutu.be%2FK8ScSgpgQ6M" rel="nofollow" target="_blank"&gt;https://youtu.be/K8ScSgpgQ6M&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fsupport.html" rel="nofollow" target="_blank"&gt;http://www.utasker.com/support.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 16:27:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716661#M43977</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-02-05T16:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring PLL on K24 with 16MHz oscillator using the clocks tool</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716662#M43978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a DSX321G crystal resonator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.scanti.com/images/products/kds/DSX321G.pdf" target="test_blank"&gt;http://www.scanti.com/images/products/kds/DSX321G.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does appear that the clock tool thinks I'm using an oscillator. I'll try&lt;/P&gt;&lt;P&gt;to figure out how to change that. I have hand cranked all of the clock&lt;/P&gt;&lt;P&gt;configuration in GCC just using the reference manual but I would really&lt;/P&gt;&lt;P&gt;like to get the KSDK functions to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the port issue I was having trouble with the GPIO_PinInit function&lt;/P&gt;&lt;P&gt;which configures a pin as an input/output and sets the value (I know you&lt;/P&gt;&lt;P&gt;don't use KSDK). PA4 (also the NMI/EzPort CS) was causing an issue so then&lt;/P&gt;&lt;P&gt;I tried PA6 which still caused me to lose communication. I don't have any&lt;/P&gt;&lt;P&gt;trouble with PORTB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm saving those 20 minutes! You have been my most valuable Kinetis&lt;/P&gt;&lt;P&gt;resource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Mon, Feb 5, 2018 at 11:27 AM, mjbcswitzerland &amp;lt;admin@community.nxp.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 17:56:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716662#M43978</guid>
      <dc:creator>ryanlush</dc:creator>
      <dc:date>2018-02-05T17:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring PLL on K24 with 16MHz oscillator using the clocks tool</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716663#M43979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had it configured for an external clock rather than a crystal. Thanks so&lt;/P&gt;&lt;P&gt;much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 18:01:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-PLL-on-K24-with-16MHz-oscillator-using-the-clocks/m-p/716663#M43979</guid>
      <dc:creator>ryanlush</dc:creator>
      <dc:date>2018-02-05T18:01:46Z</dc:date>
    </item>
  </channel>
</rss>

