<?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: Cannot get MCF51AC256 into FEE mode in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176990#M6946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to set ERCLKEN bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try creating new Project and let Device Initialize or Processor Expert initialize MCG for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jan 2011 02:19:39 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2011-01-18T02:19:39Z</dc:date>
    <item>
      <title>Cannot get MCF51AC256 into FEE mode</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176989#M6945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a hardware design where we use an external 32.768KHz crystal oscillator. The output looks like this, measured on the XTAL pin:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://timco.dk/images/clock.jpg" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;&lt;IMG alt="32.768KHz external clock" border="0" height="360" src="http://timco.dk/images/clock.jpg" width="430" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that i cannot get the MCU to switch over to FEE mode! It keeps waiting for MCGSC_OSCINIT, which will never set. Here's the code for clock init:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void initClock()
{
 // BDIV = 0, HGO = 1, EREFS = Oscillator selected
 MCGC2 = 0x14;

 // CLKS = FLL mode, IREFS = External ref. clock
 MCGC1 = 0x00;

 // Wait until external oscillator has initialized
 while(!MCGSC_OSCINIT) { };

 // DMX32 = 1, DRS = 1 =&amp;gt; 39.85MHz CPU clock
 MCGC4 = 0x21;

 // Wait for FLL to acquire new lock
 while(!MCGSC_LOCK) { };
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i don't call the initClock, then my program will run jsut fine on the internal clock. Adding this routine makes the program stop at MCGSC_OSCINIT, waiting for it to be set, but this never happens!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am i doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Kaare Mai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:26:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176989#M6945</guid>
      <dc:creator>Kaare</dc:creator>
      <dc:date>2020-10-29T09:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get MCF51AC256 into FEE mode</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176990#M6946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to set ERCLKEN bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try creating new Project and let Device Initialize or Processor Expert initialize MCG for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 02:19:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176990#M6946</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2011-01-18T02:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get MCF51AC256 into FEE mode</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176991#M6947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think thats the case. According to figure 16-1 MCG block diagram, ERCLKEN only makes the external clock available as MCGERCLK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alos, i can't get processor expert to set the correct settings for DMX32 and DCO. One of them is just not available as a setting, i don't know why.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 14:47:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176991#M6947</guid>
      <dc:creator>Kaare</dc:creator>
      <dc:date>2011-01-18T14:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get MCF51AC256 into FEE mode</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176992#M6948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The device init / processor expert is complete rubbish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't set BDIV, DMX32 and DCO.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, it does not change IREFS to 0 even tho i enable the external clock and set it to crystal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the block diagram IREFS has to be 0 to gate the external clock to the FLL circuit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 15:12:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176992#M6948</guid>
      <dc:creator>Kaare</dc:creator>
      <dc:date>2011-01-18T15:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot get MCF51AC256 into FEE mode</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176993#M6949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally found the solution! It never crossed my mind that the COP watchdog would timeout when i was waiting for the oscillator to lock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also didn't know that i had to write to SOPT and SOPT2 even though i would like to use the default settings. This is documented in the reference manual for MCF51AC section 5-2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Even if the application uses the default reset settings of COPE, COPCLKS, and COPT, the user &lt;STRONG&gt;must&lt;/STRONG&gt; write to the write-once SOPT and SOPT2 registers during reset initialization to lock in the settings."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After disabling the COP or making the code in the OSCINIT wait loop reset the COP, i finally got it to switch to FEE mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jan 2011 16:26:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Cannot-get-MCF51AC256-into-FEE-mode/m-p/176993#M6949</guid>
      <dc:creator>Kaare</dc:creator>
      <dc:date>2011-01-18T16:26:58Z</dc:date>
    </item>
  </channel>
</rss>

