<?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>ColdFire/68K Microcontrollers and Processors中的主题 Re: How do I set Coldfire V1 MCG registers properly ?</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547560#M12886</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which CPU model, exactly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got the MCF51EM256 manual open, and a search for "MCG" (which means "Melbourne Cricket Ground" to me :-) doesn't find anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you've tried to program it and are having trouble, post a section of your code and what you're measuring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jul 2016 07:46:56 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2016-07-29T07:46:56Z</dc:date>
    <item>
      <title>How do I set Coldfire V1 MCG registers properly ?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547559#M12885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a 4MHz external crystal and want the CPUCLOCK = 32MHz and BUSCLOCK = 16MHz so both the SCI and RTC can use the bus clock for timing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 22:21:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547559#M12885</guid>
      <dc:creator>bob2</dc:creator>
      <dc:date>2016-07-28T22:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set Coldfire V1 MCG registers properly ?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547560#M12886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which CPU model, exactly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got the MCF51EM256 manual open, and a search for "MCG" (which means "Melbourne Cricket Ground" to me :-) doesn't find anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you've tried to program it and are having trouble, post a section of your code and what you're measuring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2016 07:46:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547560#M12886</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2016-07-29T07:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set Coldfire V1 MCG registers properly ?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547561#M12887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom Evans,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for responding to my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given the following:&lt;/P&gt;&lt;P&gt;Processor: MCF51JM128EVLK &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired Reference clock: 4MHz external crystal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When set correctly, the CPU clock frequency will be 32MHz and the BUS clock will be 16MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is this&lt;/P&gt;&lt;P&gt;I believe I need to change the clock settings from FEI mode which uses the internal reference clock;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To FEE mode which uses the external crystal oscillator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me what values to load into the MCG module registers:&lt;/P&gt;&lt;P&gt;MCGC1, MCGC2, MCGC3, MCGC4, etc. and&lt;/P&gt;&lt;P&gt;Please tell me the sequence, ie: which register to load: 1st, 2nd, 3rd, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also indicate if I need to read, write, or pause until certain bits are set in the MCGSC ( Status / Control ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lastly, tell me what effect my debugging using the PE Micro BDM interface will have on these clock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou for your help !   Have a super day !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob Reichenbach            bob@minimusspine.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minimus Spine, Inc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Austin, TX.  78750&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jul 2016 13:37:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547561#M12887</guid>
      <dc:creator>bob2</dc:creator>
      <dc:date>2016-07-30T13:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I set Coldfire V1 MCG registers properly ?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547562#M12888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.73;"&gt;Here's a snippet from an old JM128 project of mine:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;// Clock generator setup - external 12 MHz reference crystal, 48 MHz PLL
// MCGOUT must be 48 MHz for USB operation (PLL engaged external)
// 12 MHz / 8 = 1.5 MHz, * 32 = 48 MHz
MCGC2 = 0x36;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // High range, high gain, osc on, MCGERCLK active, BDIV=1
while ((MCGSC &amp;amp; 2) == 0);
MCGC1 = 0b10011000; // External reference, RDIV=8
while ((MCGSC &amp;amp; 0x10) != 0);
while ((MCGSC &amp;amp; 0x0c) != 0x08);
MCGC3 = 0x48; // PLL selected, VDIV=32
while ((MCGSC &amp;amp; 0x20) == 0);
while ((MCGSC &amp;amp; 0x40) == 0);
MCGC1 = 0b00011000; // Switch to PLL, RDIV=8 &lt;/PRE&gt;&lt;P&gt;This was set up for a 12 MHz reference crystal and produces a 48 MHz bus clock, so it should give you your 16 MHz bus clock from 4 MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're using CodeWarrior, I'd suggest checking the Processor Expert tool.&amp;nbsp; It does a pretty good job on ColdFire.&amp;nbsp; Even if you don't want to use PE in your project, you can create a dummy project and use the clock configuration tool to generate code you can reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a couple of P&amp;amp;E Cyclone PROs and a couple of Multilink BDMs and they haven't needed any special setup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jul 2016 18:25:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/How-do-I-set-Coldfire-V1-MCG-registers-properly/m-p/547562#M12888</guid>
      <dc:creator>scottm</dc:creator>
      <dc:date>2016-07-30T18:25:44Z</dc:date>
    </item>
  </channel>
</rss>

