<?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: KL05 clocking difficulty</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249805#M6989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pedro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The information about the FLL is useful. I have been working with the FLL operating at 48MHz (exactly from the 32kHz crystal) and found that stopping the oscillator (eg. short circuiting it) doesn't stop the FLL from operating but does sometimes change its frequences by up to 50%. This is no problem - just confusing originally since I thought that removing the clock would probably stop all activity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have had no success with is moving to any other direct internal clock (rather than the FLL output) since any change to the clock configuration immediately stops anything working (processor hangs and debugger fails). Therefore I simply do the same as the reference code does -&lt;/P&gt;&lt;P&gt;- start the oscillator&lt;/P&gt;&lt;P&gt;- set a new FLL divide so that the clock ramps up from about 25MHz to 48MHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There doesn't seem to be any problem with doing this although the user's manual suggests moving to a different configuration to allow the FLL to stabilise, which is what I originally wanted to do but found it failed.&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>Thu, 27 Feb 2014 09:24:08 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2014-02-27T09:24:08Z</dc:date>
    <item>
      <title>KL05 clocking difficulty</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249803#M6987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The KL05 doesn't have a PLL and I am trying, for the first time, to work with the FLL, whereby I would like to use the external 32.768kHz crystal as oscillator to generate 48MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment I can't explain the followig behaviour:&lt;/P&gt;&lt;P&gt;1. - Out of reset the FLL output is being used, which is seen by the rate that the SYSTICK is firing (around 21.05MHz). &lt;EM&gt;This is expected&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;2. - If I configure &lt;STRONG&gt;MCG_C2&lt;/STRONG&gt; ready for the 32kHz crystal and clear the &lt;STRONG&gt;IREFS&lt;/STRONG&gt; bit in &lt;STRONG&gt;MCG_C1&lt;/STRONG&gt; the crystal circuit starts to oscillate. &lt;STRONG&gt;OSCINIT&lt;/STRONG&gt; is seen being set in &lt;STRONG&gt;MCG_S&lt;/STRONG&gt; and the &lt;STRONG&gt;IREFST&lt;/STRONG&gt; is cleared (meaning that the oscillator is ready and the source of the FLL is now the "external reference clock"). &lt;EM&gt;This seems good&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, since the external crystal is more accurate than the internal reference clock I would have expected the FLL output to now be more accurate (32.768kHz x 640 = 20.97MHz) but there was no change in it (&lt;EM&gt;but maybe difficult to measure&lt;/EM&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a test, I short circuited the 32kHz crystal so that it was no longer supplying a clock &lt;SPAN style="text-decoration: underline;"&gt;but the SYSTICK continued to operate and I could also look at the registers with the debugge&lt;/SPAN&gt;r. I could step code and the MCG status still showed the same state - suggesting FEE mode (FLL engaged external) "&lt;EM&gt;In FEE, MCGOUTCLK is derived from the FLL clock (DCOCLK) that is controlled by the external reference clock&lt;/EM&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None of this is presently making sense. The MCG is confirming that it is using the external reference clock but this can't be the case because the processor still runs when this is physically removed. Since there was no operating frequency change it is quite certainly still using the FLL output, but derived from the internal 32kHz instead.&lt;/P&gt;&lt;P&gt;Furthermore, when attempting to move to any state not using the FLL output (CLKS not 0) the processor immediately "hangs"; debugger stops working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an explanation as to what is actually going on??&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;Mmark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 00:15:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249803#M6987</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-02-21T00:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: KL05 clocking difficulty</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249804#M6988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the FLL to provide a precise output frequency [32.768KHz * 732= 24MHz], you need to set the DMX32 bit field as [1], the FLL is fine tuned to work with 32.768KHz XTALs, if you leave the field as [0], the accuracy will drop; providing an output frequency in a range between 20MHz - 25MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the "strange" phenomenon in which the FLL keeps providing a valid output, it is caused as a byproduct of the closed loop FLL circuitry, the feedback loop feeds a valid reference to the FLL input gate, the DCO then provides a valid output and so on; however when you try to switch the MCG mode the DCO loses its valid reference, thus leaving the core without a valid CLK signal to keep working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 20:43:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249804#M6988</guid>
      <dc:creator>apanecatl</dc:creator>
      <dc:date>2014-02-25T20:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: KL05 clocking difficulty</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249805#M6989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pedro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The information about the FLL is useful. I have been working with the FLL operating at 48MHz (exactly from the 32kHz crystal) and found that stopping the oscillator (eg. short circuiting it) doesn't stop the FLL from operating but does sometimes change its frequences by up to 50%. This is no problem - just confusing originally since I thought that removing the clock would probably stop all activity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have had no success with is moving to any other direct internal clock (rather than the FLL output) since any change to the clock configuration immediately stops anything working (processor hangs and debugger fails). Therefore I simply do the same as the reference code does -&lt;/P&gt;&lt;P&gt;- start the oscillator&lt;/P&gt;&lt;P&gt;- set a new FLL divide so that the clock ramps up from about 25MHz to 48MHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There doesn't seem to be any problem with doing this although the user's manual suggests moving to a different configuration to allow the FLL to stabilise, which is what I originally wanted to do but found it failed.&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>Thu, 27 Feb 2014 09:24:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/KL05-clocking-difficulty/m-p/249805#M6989</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-02-27T09:24:08Z</dc:date>
    </item>
  </channel>
</rss>

