<?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: Clock Settings</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473431#M28722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bernadett,&lt;/P&gt;&lt;P&gt;I'd highly recommend that you can go to download the sample code of the FRDM-KE02.&lt;/P&gt;&lt;P&gt;In the sample code, the ics.c and ics.h files contain the sort of mode transition functions and you can refer to them for details.&lt;/P&gt;&lt;P&gt;The link of the sample code is below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cache.nxp.com/files/32bit/software/KE02-SC.zip" title="https://cache.nxp.com/files/32bit/software/KE02-SC.zip"&gt;https://cache.nxp.com/files/32bit/software/KE02-SC.zip&lt;/A&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2016 01:33:01 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2016-03-15T01:33:01Z</dc:date>
    <item>
      <title>Clock Settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473430#M28721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have started to work with FRDMKE02Z Board. I would like to change the settings of main clock from external oscillator configuration to internal and from 10 MHz to 8MHz. Is there any example available or any appropriate dokumentation about the clock settings. (I have read the reference manual, but at the first sight it is not that simple.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Bernadett&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 08:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473430#M28721</guid>
      <dc:creator>bernadettmarton</dc:creator>
      <dc:date>2016-03-14T08:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473431#M28722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bernadett,&lt;/P&gt;&lt;P&gt;I'd highly recommend that you can go to download the sample code of the FRDM-KE02.&lt;/P&gt;&lt;P&gt;In the sample code, the ics.c and ics.h files contain the sort of mode transition functions and you can refer to them for details.&lt;/P&gt;&lt;P&gt;The link of the sample code is below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cache.nxp.com/files/32bit/software/KE02-SC.zip" title="https://cache.nxp.com/files/32bit/software/KE02-SC.zip"&gt;https://cache.nxp.com/files/32bit/software/KE02-SC.zip&lt;/A&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 01:33:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473431#M28722</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-03-15T01:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Settings</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473432#M28723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The ICS in the KE02 is very simple and the best place to start is with the clock distribution block diagram that is found in its user's manual:&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/22934i4EB933DA222D1BBA/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is a practial discussion of the MCG as found in the more powerful K parts 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="noopener noreferrer" target="_blank"&gt;http://www.utasker.com/kinetis/MCG.html&lt;/A&gt;&lt;SPAN&gt;, whereby the MCG is still a sort of a super-set of the ICS and so most principles hold true.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the uTasker project the FRDM-KE02Z settings are simply set by a few defines:&lt;/P&gt;&lt;P&gt;To run at 8MHz from the internal 32 kHz IRC:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14580105135159098 jive_text_macro" data-renderedposition="767_8_1192_48" jivemacro_uid="_14580105135159098"&gt;&lt;P&gt;#define RUN_FROM_DEFAULT_CLOCK&amp;nbsp; // default mode is FLL Engaged Internal - the 31.25kHz IRC is multiplied by FLL factor of 1024 to obtain 32MHz nominal frequency&lt;/P&gt;&lt;P&gt;#define SYSTEM_CLOCK_DIVIDE&amp;nbsp; 4&amp;nbsp; // divide the FLL output to give the system clock (maximum 20MHz) (/1, 2, 4, 8, 16, 32, 64 or 128 possible)&lt;/P&gt;&lt;P&gt;#define BUS_CLOCK_DIVIDE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; // divide by 1 or 2 to give bus and flash clock (maximum 20MHz)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is verified in the uTasker FRDM-KE02Z simulator as shown below.&lt;/P&gt;&lt;P&gt;&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/22891iE9411F27C85F5162/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;If you need to know the exact code it is simply two lines:&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14580103200169773 jive_text_macro" data-renderedposition="1512_8_1192_0" jivemacro_uid="_14580103200169773"&gt;&lt;/PRE&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14580103540203771 jive_macro_code jive_text_macro" data-renderedposition="1511_8_1192_47" jivemacro_uid="_14580103540203771"&gt;&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;SIM_BUSDIV = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;// bus clock is equal to the system clock (ICSOUTCLK)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;ICS_C2 = _SYSCLK__DIV;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;// set system clock frequency (ICSOUTCLK) once the bus/flash divider has been configured&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#define _SYSCLK__DIV&amp;nbsp;&amp;nbsp; (ICS_C2_BDIV_4)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;for the 8MHz case, which is controlled by the original setting.&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;SPAN&gt;See also &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=http%3A%2F%2Fwww.utasker.com%2Fkinetis%2FFRDM-KE02Z.html" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://www.utasker.com/kinetis/FRDM-KE02Z.html&lt;/A&gt;&lt;SPAN&gt; for a complete solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:25:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clock-Settings/m-p/473432#M28723</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-11-02T13:25:25Z</dc:date>
    </item>
  </channel>
</rss>

