<?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: Configuring the clock on K10 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466061#M28107</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The uTasker defines are based on the part's user's maual so you can simply check the registers in the user's manual and it should be fully interpretable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They avoid macros since they are often unclear (the field width is not obvious and also the meaning of each value is not clear, plus reading code like REG_MACRO(6) still gives no indication about what the 6 means).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can get the uTasker source code from &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/forum/index.php?topic=1721.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.utasker.com/forum/index.php?topic=1721.0&lt;/A&gt;&lt;SPAN&gt; in case you need to know how anything is defined.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The ones used in the clock configuration code are:&lt;/P&gt;&lt;PRE&gt;#define MCG_C1_CLKS_PLL_FLL&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00
#define MCG_C1_FRDIV_1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x28
#define MCG_C1_CLKS_EXTERN_CLK 0x80
#define MCG_C2_RANGE_8M_32M&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20
#define MCG_C2_LOCRE0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x80
#define MCG_C5_PLLSTEN0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20
#define MCG_C6_PLLS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40
#define MCG_S_CLKST_EXTERN_CLK 0x08
#define MCG_S_CLKST_MASK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0c
#define MCG_S_CLKST_PLL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0c
#define MCG_S_IREFST&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x10
#define MCG_S_PLLST&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20
#define MCG_S_LOCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40&lt;/PRE&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>Fri, 11 Dec 2015 20:13:46 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2015-12-11T20:13:46Z</dc:date>
    <item>
      <title>Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466056#M28102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a bare metal application on a K10 processor&lt;BR /&gt;and must switch from reset clock configuration to using the&lt;BR /&gt;external oscillator with a 50 MHz crystal to clock my MCU at&lt;BR /&gt;100 MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any code samples that tackle this (or a similar) &lt;BR /&gt;task?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 12:50:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466056#M28102</guid>
      <dc:creator>garylynch</dc:creator>
      <dc:date>2015-12-07T12:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466057#M28103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 50MHz clock input (32 MHz is fastest crystal that can be used) the code can be taken from a K60 setup for the TWR board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For 100MHz core/sytem clock, with 50MHz bus and 25MHz flash clocks the following (from the uTasker project) will do it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;#define CLOCK_MUL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32
#define MCG_C6_VDIV0_LOWEST&amp;nbsp;&amp;nbsp; depends on the K10 type used (either 24 or 16 - consult the particular data sheet)
#define CLOCK_DIV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16
#define SYSTEM_CLOCK_DIVIDE&amp;nbsp;&amp;nbsp; 1
#define BUS_CLOCK_DIVIDE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2
#define FLEX_CLOCK_DIVIDE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16 (not important if no Flex Bus)
#define FLASH_CLOCK_DIVIDE&amp;nbsp;&amp;nbsp;&amp;nbsp; 4


MCG_C2 = (MCG_C2_RANGE_8M_32M | MCG_C2_LOCRE0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // select external clock source (with reset on clock loss)
MCG_C1 = (MCG_C1_CLKS_EXTERN_CLK | MCG_C1_FRDIV_1024);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // switch to external input clock (the FLL input clock is set to as close to its input range as possible, although this is not absolutely necessary since the FLL will not be used)
while ((MCG_S &amp;amp; MCG_S_IREFST) != 0) {}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // loop until the FLL source is no longer the internal reference clock
while ((MCG_S &amp;amp; MCG_S_CLKST_MASK) != MCG_S_CLKST_EXTERN_CLK) {}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // loop until the external reference clock source is valid
MCG_C5 = ((CLOCK_DIV - 1) | MCG_C5_PLLSTEN0);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // now move from state FEE to state PBE (or FBE) PLL remains enabled in normal stop modes
MCG_C6 = ((CLOCK_MUL - MCG_C6_VDIV0_LOWEST) | MCG_C6_PLLS);
while ((MCG_S &amp;amp; MCG_S_PLLST) == 0) {}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // loop until the PLLS clock source becomes valid
while ((MCG_S &amp;amp; MCG_S_LOCK) == 0) {}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // loop until PLL locks
SIM_CLKDIV1 = (((SYSTEM_CLOCK_DIVIDE - 1) &amp;lt;&amp;lt; 28) | ((BUS_CLOCK_DIVIDE - 1) &amp;lt;&amp;lt; 24) | ((FLEX_CLOCK_DIVIDE - 1) &amp;lt;&amp;lt; 20) | ((FLASH_CLOCK_DIVIDE - 1) &amp;lt;&amp;lt; 16)); // prepare bus clock divides
MCG_C1 = (MCG_C1_CLKS_PLL_FLL | MCG_C1_FRDIV_1024);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // finally move from PBE to PEE mode - switch to PLL clock
while ((MCG_S &amp;amp; MCG_S_CLKST_MASK) != MCG_S_CLKST_PLL) {}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // loop until the PLL clock is selected&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simulation showing the obtained speeds:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;IMG alt="pastedImage_0.png" src="https://community.nxp.com/t5/image/serverpage/image-id/55979i7CAD4523CF947BFB/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" /&gt;&lt;/SPAN&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466057#M28103</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-11-02T13:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466058#M28104</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;Thanks for the tips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; We are feeding an external, 50 MHz oscillator to the&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; K10. Please forgive the oversimplification.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; As assumed by your comments, we are not using FlexBus. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; I can't figure out the comment: &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; depends on the K10 type used &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; (either 24 or 16 - consult the &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; particular data sheet)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; We are using a 100 MHz K10, which is indicated by a '10' at&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; the end of the part number. I can't find anything that maps&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; to 24 or 16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; After posting, I found code in file system_MK10D10.c, which&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; is auto-generated by KDS and which I presume is executed&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; before entry into main().&amp;nbsp; It contains 2 functions:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - SystemInit(), &amp;amp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - SystemCoreClockUpdate();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; both of which appear to modify the MCG (I haven't figured&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; out everything they do, yet).&amp;nbsp; If my observation is correct,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I will have to disable this section manually to use your&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; code in main(), correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 11:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466058#M28104</guid>
      <dc:creator>garylynch</dc:creator>
      <dc:date>2015-12-08T11:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466059#M28105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also generate code with PE.&lt;/P&gt;&lt;P&gt;The KDS code needs configuring, whereby you will also need to know the register content details since it needs raw settings configured. PE will allow you to not need to understand register settings but the generated code is pretty huge.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;K10 120MHz&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58271i764BE5BFA22C5693/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;K10 100MHz&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/58332i992182D626F56800/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If using KDS you will also need to know this because you have to plug in the raw details, rather than being able to work with the actual divide and multiplications that you ultimately would like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, for your K10 100MHz, a multiplication factor of x47 is 0x17, whereby for a K10 120MHz it is 0x1f.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define MCG_C6_VDIV0_LOWEST&amp;nbsp; 24 // when using K10 100MHz&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;#define MCG_C6_VDIV0_LOWEST&amp;nbsp; 16 // when using K10 120MHz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;allows the user to enter the value that is really required, eg, 47, and automates the actual register content used to match the chip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following article may help de-mystify the MCG and its operation &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/kinetis/MCG.html" rel="nofollow"&gt;http://www.utasker.com/kinetis/MCG.html&lt;/A&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:42:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466059#M28105</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-12-08T13:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466060#M28106</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;More thanks for sorting that out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile I started processing the code snippet you provided. It contains 15 tokens that look like macros that aren't defined in the snippet.&amp;nbsp; Of those I was able to find definitions for 4 in an MK10D10.h header inside PE:&lt;BR /&gt;- MCG_C2_LOCRE0()&lt;BR /&gt;- MCG_C5_PLLSTEN0()&lt;BR /&gt;- MCG_C6_PLLS()&lt;BR /&gt;- MCG_S()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The definitions however have parameters, while the evocations in the sample do not, so I am not sure I have the correct file and I can't find the other tokens anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are they specific to uTasker or some other outside resource?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don't rely much on PE because we have an internal requirement for project portability, i.e. I should be able to check a project into our version control, and another developer check it out and build it on his system without significant fine tuning.&amp;nbsp; I am able to copy projects WITHIN MY WORKSPACE inside KDS, but anything copied by any other means winds up broken in ways I find very difficult to troubleshoot.&amp;nbsp; If there is a way to use these tools to generate portable projects, I would love to hear about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 15:13:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466060#M28106</guid>
      <dc:creator>garylynch</dc:creator>
      <dc:date>2015-12-11T15:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466061#M28107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The uTasker defines are based on the part's user's maual so you can simply check the registers in the user's manual and it should be fully interpretable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They avoid macros since they are often unclear (the field width is not obvious and also the meaning of each value is not clear, plus reading code like REG_MACRO(6) still gives no indication about what the 6 means).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can get the uTasker source code from &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.utasker.com/forum/index.php?topic=1721.0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.utasker.com/forum/index.php?topic=1721.0&lt;/A&gt;&lt;SPAN&gt; in case you need to know how anything is defined.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The ones used in the clock configuration code are:&lt;/P&gt;&lt;PRE&gt;#define MCG_C1_CLKS_PLL_FLL&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00
#define MCG_C1_FRDIV_1024&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x28
#define MCG_C1_CLKS_EXTERN_CLK 0x80
#define MCG_C2_RANGE_8M_32M&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20
#define MCG_C2_LOCRE0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x80
#define MCG_C5_PLLSTEN0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20
#define MCG_C6_PLLS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40
#define MCG_S_CLKST_EXTERN_CLK 0x08
#define MCG_S_CLKST_MASK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0c
#define MCG_S_CLKST_PLL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0c
#define MCG_S_IREFST&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x10
#define MCG_S_PLLST&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x20
#define MCG_S_LOCK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x40&lt;/PRE&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>Fri, 11 Dec 2015 20:13:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466061#M28107</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2015-12-11T20:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring the clock on K10</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466062#M28108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works like a hose!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Mark!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 09:29:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Configuring-the-clock-on-K10/m-p/466062#M28108</guid>
      <dc:creator>garylynch</dc:creator>
      <dc:date>2015-12-15T09:29:04Z</dc:date>
    </item>
  </channel>
</rss>

