<?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>S12 / MagniV MicrocontrollersのトピックRe: S12G64  PLL Oscillator</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364386#M10657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply, I have found why the PLL did not work.&lt;/P&gt;&lt;P&gt;I&amp;lt;mc9s12g family reference manual and data sheet&amp;gt; ,page 354&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;The Phase Locked Loop (PLL) has the following features:&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• highly accurate and phase locked frequency multiplier&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Configurable internal filter for best stability and lock time.&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Frequency modulation for defined jitter and reduced emission&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Automatic frequency lock detector&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Interrupt request on entry or exit from locked condition&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Reference clock &lt;STRONG style="text-decoration: underline;"&gt;either external (crystal)&lt;/STRONG&gt; or internal square wave (1MHz IRC1M) based.&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• PLL stability is sufficient for LIN communication, even if using IRC1M as reference clock&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;I changed the &lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;Oscillator to &lt;SPAN style="color: #000000; font-family: Times-Roman; font-size: 16.363636016845703px;"&gt;crystal&lt;/SPAN&gt;, then the PLL works. &lt;BR style="text-align: -webkit-auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jan 2015 03:33:45 GMT</pubDate>
    <dc:creator>刘广扩</dc:creator>
    <dc:date>2015-01-21T03:33:45Z</dc:date>
    <item>
      <title>S12G64  PLL Oscillator</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364384#M10655</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 a problem with PLL, follows are the program:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void PLL_Init(void) &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUOSC_OSCE = 1; /* enable ext osc */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;/*&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;　　Initialise the system clock from a 16 MHz Crystal，&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;　　24 MHz Bus CLK （48 MHz VCO， 48 MHz PLL）&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUSYNR = 0x00 | 0x05; /* VCOFRQ［7:6］， SYNDIV［5:0］ */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUREFDIV = 0x00 | 0x03; /* REFFRQ［7:6］， REFDIV［3:0］ */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUPOSTDIV = 0x00; /* POSTDIV = 0 FPLL = FVCO */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;while(!CPMUFLG_LOCK); /* wait for VCO to stabilize*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;//Service_WD（）;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUCLKS_PLLSEL = 1; /* Switch clk to use PLL */&lt;/SPAN&gt;&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;It stops at "while(!CPMUFLG_LOCK); " , I have checked the value of REFDIV and SYNDIV, they are right the value programmed, and I have checked the EXTAL pin;&lt;/P&gt;&lt;P&gt;Is something wrong with my program? or something wrong with the hardware?&lt;/P&gt;&lt;P&gt;please help me ! amd sorry for my poor english!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 03:00:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364384#M10655</guid>
      <dc:creator>刘广扩</dc:creator>
      <dc:date>2014-12-19T03:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: S12G64  PLL Oscillator</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364385#M10656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There seems to be problem with incorrectREFFRQ bit fields in the CPMUREFDIV register.&lt;/P&gt;&lt;P&gt;If fOSC=16MHz and&amp;nbsp; REFDIV is 3, then you get fREF=4MHz. In this case REFFRQ[1:0] = 01 (see Table 10-2. in the S12G ref manual), but you have it '00' there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUSYNR = 0x05;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUREFDIV = 0x83;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;CPMUPOSTDIV = 0x00; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In the main code you can use a codeline which will route the bus clock to the external pin ECLK, so you can check the signal on scope:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; ECLKCTL_NECLK = 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; &lt;/TD&gt;&lt;TD&gt;// enable ECLK output (bus clock is visible on pin PB0 for TWR-S12G128, PS7 for TWR-S12GN32)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;// default clock setup after reset is PEI mode 6.25MHz BUSCLK&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Also you can check appnote AN4455 which comes with the SW packt. There you can find Demo Labs such as the one demonstrating how to configure System Clocks.&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455.pdf" title="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455.pdf"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455SW.zip" title="http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455SW.zip"&gt;http://cache.freescale.com/files/microcontrollers/doc/app_note/AN4455SW.zip&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;iggi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 15:16:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364385#M10656</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2015-01-05T15:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: S12G64  PLL Oscillator</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364386#M10657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply, I have found why the PLL did not work.&lt;/P&gt;&lt;P&gt;I&amp;lt;mc9s12g family reference manual and data sheet&amp;gt; ,page 354&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;The Phase Locked Loop (PLL) has the following features:&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• highly accurate and phase locked frequency multiplier&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Configurable internal filter for best stability and lock time.&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Frequency modulation for defined jitter and reduced emission&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Automatic frequency lock detector&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Interrupt request on entry or exit from locked condition&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• Reference clock &lt;STRONG style="text-decoration: underline;"&gt;either external (crystal)&lt;/STRONG&gt; or internal square wave (1MHz IRC1M) based.&lt;BR /&gt;&lt;SPAN style="font-size: 12pt;"&gt;• PLL stability is sufficient for LIN communication, even if using IRC1M as reference clock&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;I changed the &lt;SPAN style="font-family: Times-Roman; font-size: 12pt; color: #000000;"&gt;Oscillator to &lt;SPAN style="color: #000000; font-family: Times-Roman; font-size: 16.363636016845703px;"&gt;crystal&lt;/SPAN&gt;, then the PLL works. &lt;BR style="text-align: -webkit-auto;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 03:33:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12G64-PLL-Oscillator/m-p/364386#M10657</guid>
      <dc:creator>刘广扩</dc:creator>
      <dc:date>2015-01-21T03:33:45Z</dc:date>
    </item>
  </channel>
</rss>

