<?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 Re: K22 Clock Setup in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664888#M7296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you tell me the package type of the K22? if you use 121 pins K22, the PTC3 is multiplexed with CLKOUT, of course your code is correct.&lt;/P&gt;&lt;P&gt;But if you use MK22DX128VLF5, MK22DX256VLF5, the PTC3 is not multiplexed with CLKOUT.&lt;/P&gt;&lt;P&gt;Pls have a check.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/13865iA34916A3BC38BBE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Feb 2017 08:20:09 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2017-02-06T08:20:09Z</dc:date>
    <item>
      <title>K22 Clock Setup</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664886#M7294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;have 16MHz external crystal for K22.&lt;/P&gt;&lt;P&gt;I am using KSDK v2.1.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've configured the clock to run in FEE:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void BootClockRUN_FEE(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;const sim_clock_config_t simConfig = {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.pllFllSel = 0U, .er32kSrc = 3U, .clkdiv1 = 0x01340000U,&lt;BR /&gt; };&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLOCK_SetSimSafeDivs();&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BOARD_InitOsc0();&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLOCK_BootToFeeMode(kMCG_OscselOsc, 4U, kMCG_Dmx32Default, kMCG_DrsMidHigh, BOARD_FllStableDelay);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLOCK_SetInternalRefClkConfig(kMCG_IrclkEnable, kMCG_IrcSlow, 0U);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLOCK_SetSimConfig(&amp;amp;simConfig);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SystemCoreClock = 80000000U;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After initializing the Clock management, I try to use PTC3 pin to scope the output of the flash clock to verify the SystemCoreClock is correct.&lt;/P&gt;&lt;P&gt;#define SIM_SCGC5_REG(base) ((base)-&amp;gt;SCGC5)&lt;BR /&gt;#define SIM_SOPT2_REG(base) ((base)-&amp;gt;SOPT2)&lt;BR /&gt;#define PORT_PCR_REG(base,index) ((base)-&amp;gt;PCR[index])&lt;/P&gt;&lt;P&gt;#define SIM_SOPT2 SIM_SOPT2_REG(SIM)&lt;BR /&gt;#define SIM_SCGC5 SIM_SCGC5_REG(SIM)&lt;BR /&gt;#define PORTC_PCR3 PORT_PCR_REG(PORTC,3)&lt;BR /&gt;#define PORTC_PCR4 PORT_PCR_REG(PORTC,4)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SIM_SCGC5|=0x800;&lt;BR /&gt; PORTC_PCR3&amp;amp;=~(0x700);&lt;BR /&gt; PORTC_PCR3|=5&amp;lt;&amp;lt;8;&lt;BR /&gt; SIM_SOPT2|=2&amp;lt;&amp;lt;5;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am expecting 16Mhz out for PTC3. &amp;nbsp;Nothing is coming out.&lt;/P&gt;&lt;P&gt;Any ideas on where I went wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2017 04:49:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664886#M7294</guid>
      <dc:creator>anbui</dc:creator>
      <dc:date>2017-02-03T04:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: K22 Clock Setup</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664887#M7295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi An Bui,&lt;/P&gt;&lt;P&gt;for KSDK 2.x there is Clocks tool available allowing to generate clock initialization for K22. The tool is provided both as a web version (on MCUXpresso web site) and also as desktop version (download installer on NXP.com), free of charge. The tool supports graphical configuration with validations and then generates complete clock initialization function (source code), that you can download or copy-paste into your application.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2017 07:57:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664887#M7295</guid>
      <dc:creator>MarekTrmac</dc:creator>
      <dc:date>2017-02-03T07:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: K22 Clock Setup</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664888#M7296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you tell me the package type of the K22? if you use 121 pins K22, the PTC3 is multiplexed with CLKOUT, of course your code is correct.&lt;/P&gt;&lt;P&gt;But if you use MK22DX128VLF5, MK22DX256VLF5, the PTC3 is not multiplexed with CLKOUT.&lt;/P&gt;&lt;P&gt;Pls have a check.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/13865iA34916A3BC38BBE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2017 08:20:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664888#M7296</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-02-06T08:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: K22 Clock Setup</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664889#M7297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marek,&lt;/P&gt;&lt;P&gt;I just migrated to 2.0 and the new clock tool helped a great deal. &amp;nbsp;I even used it to reevaluate older 1.3.0 projects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xiangjun,&lt;/P&gt;&lt;P&gt;Our package is the &amp;nbsp;64 pin LQFP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2017 18:42:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K22-Clock-Setup/m-p/664889#M7297</guid>
      <dc:creator>anbui</dc:creator>
      <dc:date>2017-02-06T18:42:31Z</dc:date>
    </item>
  </channel>
</rss>

