<?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: K60 MCGOUTCLK gets divided by 4</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265074#M8480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check your register settings.&amp;nbsp; From your code, you have set VDIV0 to a multiply factor of 44.&amp;nbsp; 44 * 10 = 440 MHz which is way out of range to begin with.&amp;nbsp; I'm surprised your PLL is locking.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Oct 2013 21:54:06 GMT</pubDate>
    <dc:creator>chris_brown</dc:creator>
    <dc:date>2013-10-04T21:54:06Z</dc:date>
    <item>
      <title>K60 MCGOUTCLK gets divided by 4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265071#M8477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a &lt;SPAN style="color: #444444; font-family: arial, sans-serif; font-size: small;"&gt;P&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: arial, sans-serif; font-size: small;"&gt;K60FN1M0VLQ12 CPU on the TWR-K60F120M board and I'd like to configure it to run at 120 MHz from the onboard 50 MHz oscillator. I have studied documentation on the MCG and come up with the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13809203550108738 jive_macro_code" jivemacro_uid="_13809203550108738" modifiedtitle="true"&gt;
&lt;P&gt;MCG_C7 &amp;amp;= ~MCG_C7_OSCSEL_MASK;&lt;/P&gt;
&lt;P&gt;MCG_C2 = MCG_C2_RANGE(0x02) | MCG_C2_IRCS_MASK;&lt;/P&gt;
&lt;P&gt;MCG_C1 = MCG_C1_CLKS(0x02) | MCG_C1_FRDIV(0x04) | MCG_C1_IRCLKEN_MASK;&lt;/P&gt;
&lt;P&gt;MCG_C4 &amp;amp;= ~(MCG_C4_DRST_DRS_MASK | MCG_C4_DMX32_MASK);&lt;/P&gt;
&lt;P&gt;MCG_C5 = MCG_C5_PRDIV(0x4);&lt;/P&gt;
&lt;P&gt;MCG_C6 = MCG_C6_VDIV(28);&lt;/P&gt;
&lt;P&gt;while (!(MCG_S &amp;amp; MCG_S_IREFST_MASK));&lt;/P&gt;
&lt;P&gt;while ((MCG_S &amp;amp; MCG_S_CLKST_MASK) != MCG_S_CLKST(2));&lt;/P&gt;
&lt;P&gt;MCG_C6 |= MCG_C6_PLLS_MASK;&lt;/P&gt;
&lt;P&gt;while (!(MCG_S &amp;amp; MCG_S_LOCK_MASK));&lt;/P&gt;
&lt;P&gt;MCG_C1 = MCG_C1_CLKS(0x00) | MCG_C1_FRDIV(0x04) | MCG_C1_IRCLKEN_MASK;&lt;/P&gt;
&lt;P&gt;while ((MCG_S &amp;amp; 0x0CU) != 0x0CU);&lt;/P&gt;
&lt;P&gt;SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIV1(0x00) | SIM_CLKDIV1_OUTDIV2(0x01);&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note lines 5 and 6: with these division/multiplication values, I end up with a 110 MHz clock, as I have verified by enabling MCGCLKOUT output on TRACE_CLKOUT pin hooking it up with a scope. So, the end equation for frequency calculation is: ((50 / 5) * (16 + 28)) / 4 = ((50 / 5) * 44) / 4 = 110 MHz;&lt;/P&gt;&lt;P&gt;I can not understand where the /4 division comes from; the most I could find is a division by 2 in PLL0. Could someone please show me what I missed? I'm using this reference manual: &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K60P144M150SF3RM.pdf" rel="nofollow noopener noreferrer" title="http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K60P144M150SF3RM.pdf" target="_blank"&gt;http://cache.freescale.com/files/microcontrollers/doc/ref_manual/K60P144M150SF3RM.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 21:13:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265071#M8477</guid>
      <dc:creator>age</dc:creator>
      <dc:date>2013-10-04T21:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: K60 MCGOUTCLK gets divided by 4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265072#M8478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is only a divide by two in the path for MCGOUTCLK.&amp;nbsp; You measure a divide by 4 in your Trace clock because there is a second divide by 2 in the path to TRACE_CLKOUT.&amp;nbsp; Please see chapter 5.7.3 in the K60 reference manual.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 21:25:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265072#M8478</guid>
      <dc:creator>chris_brown</dc:creator>
      <dc:date>2013-10-04T21:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: K60 MCGOUTCLK gets divided by 4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265073#M8479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am aware of that, and my scope shows exactly 55 MHz in current configuration, which corresponds to 110 MHz core/system clock.&lt;/P&gt;&lt;P&gt;I could not possibly see 110 MHz on the scope, because that would mean the core running at 220 MHz, which is not supported.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 21:37:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265073#M8479</guid>
      <dc:creator>age</dc:creator>
      <dc:date>2013-10-04T21:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: K60 MCGOUTCLK gets divided by 4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265074#M8480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check your register settings.&amp;nbsp; From your code, you have set VDIV0 to a multiply factor of 44.&amp;nbsp; 44 * 10 = 440 MHz which is way out of range to begin with.&amp;nbsp; I'm surprised your PLL is locking.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 21:54:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265074#M8480</guid>
      <dc:creator>chris_brown</dc:creator>
      <dc:date>2013-10-04T21:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: K60 MCGOUTCLK gets divided by 4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265075#M8481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a Processor Expert project with all thr required settings and indeed my PRDIV/VDIV were wrong; should have done that in the first place. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 22:08:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265075#M8481</guid>
      <dc:creator>age</dc:creator>
      <dc:date>2013-10-04T22:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: K60 MCGOUTCLK gets divided by 4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265076#M8482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NP.&amp;nbsp; Glad I could help.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 22:23:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-MCGOUTCLK-gets-divided-by-4/m-p/265076#M8482</guid>
      <dc:creator>chris_brown</dc:creator>
      <dc:date>2013-10-04T22:23:41Z</dc:date>
    </item>
  </channel>
</rss>

