<?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: S12ZVL PLL configuration with CPMUPLL in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877620#M16320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;Charudatta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set the bus clock for example at 30 MHz after that the range with 4% FM will be 28.8 MHz - 31.2 MHz.&lt;/P&gt;&lt;P&gt;After that, we are in the specified range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At&amp;nbsp;first, I would like to recommend&amp;nbsp;you to follow the steps in the RM rev2.47 below and after that, set the CPMUPLL&amp;nbsp;register.&lt;/P&gt;&lt;P&gt;– Configure the PLL for desired bus frequency.&lt;BR /&gt;– Program the reference divider (REFDIV[3:0] bits) to divide down oscillator frequency if&lt;BR /&gt;necessary.&lt;BR /&gt;– Enable the external oscillator (OSCE bit).&lt;BR /&gt;– Wait for the oscillator to start up (UPOSC=1) and PLL to lock (LOCK=1).&lt;/P&gt;&lt;PRE&gt;if OSCE = 1        f_ref = f_osc / (REFDIV + 1) = 10MHz / (0 + 1) = 10MHz                    
&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;f_vco = 2 * f_ref * (SYNDIV + 1) = 2 * 10MHz * (2 + 1) = 60MHz                                                   
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if LOCK = 1     f_pll = f_vco / (POSTDIV + 1) = 60MHz / (0 + 1) = 60MHz                        
&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;f_bus = f_pll/2     = 30MHz&lt;/PRE&gt;&lt;PRE style="color: #000000;"&gt;CPMUPOSTDIV = 0x00;   
// [4-0] POSTDIV = 0b00000   

CPMUSYNR = 0x42;  
// [7-6] VCOFRQ = 0b01 (48MHz &amp;lt; fVCO &amp;lt;= 64MHz)  
// [5-0] SYNDIV = 0b000010     

CPMUREFDIV = 0x80;  
// [7-6] REFFRQ = 0b10 (6MHz &amp;lt; fREF &amp;lt;= 12MHz)  
// [3-0] REFDIV = 0b0000        

CPMUIFLG = 0xFF;  // clear LOCKIF and OSCIF  
 
CPMUOSC_OSCE = 1;  // enable external oscillator OSCE   

// Wait for oscillator to start up (UPOSC=1) and PLL to lock (LOCK=1).
while (!CPMUIFLG_LOCK){}  
while (!CPMUIFLG_UPOSC){}  
 
CPMUCLKS_PLLSEL = 1;  
while(!CPMUCLKS_PLLSEL){}  
 
CPMUPLL = 0x30; // FM +-4%   
while (!CPMUIFLG_LOCK){}  
while (!CPMUIFLG_UPOSC){}&lt;/PRE&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;MagniV PLL calculator can be useful if you want to calculate&amp;nbsp;the value of PLL registers.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-341785" rel="nofollow noopener noreferrer" target="_blank"&gt;MagniV PLL Calculator&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2019 08:44:41 GMT</pubDate>
    <dc:creator>dianabatrlova</dc:creator>
    <dc:date>2019-02-21T08:44:41Z</dc:date>
    <item>
      <title>S12ZVL PLL configuration with CPMUPLL</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877617#M16317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know appropriate place to configure CPMUPLL in clock configuration.&lt;/P&gt;&lt;P&gt;Currently we are using the given below configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CPMUOSC_OSCE=0x01U; /* select external OSC. 10Mhz */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; CPMUREFDIV_REFDIV=0x04U; /* select reference divider value */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; CPMUREFDIV_REFFRQ=0x00U; /* select REFCLK frequency range Fref &amp;lt;= 2 Mhz */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; CPMUSYNR_SYNDIV = 0x0FU; /* set VCO to 64 MHz (bus clock 32 MHz) */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; CPMUSYNR_VCOFRQ = 0x01U; /* select VCOCLK frequency range 48Mhz &amp;lt; Fvco &amp;lt;= 64 Mhz */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CPMUPLL_FM0 = 0x1U;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Enable frequency modulation amplitude 4 % */&lt;BR /&gt;CPMUPLL_FM1 = 0x1U;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CPMUPOSTDIV_POSTDIV = 0x00U; /* PLL clock = 64 Mhz , divide by 2 (bus clock 32 MHz)*/&lt;BR /&gt; &lt;BR /&gt; while (CPMUIFLG_LOCK == 0U){ /* To solve compiler warning { } added */ }; /* wait till PLL gets locked */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is&amp;nbsp;CPMUPLL configuration place appropriate. ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let us know if any suggestion&amp;nbsp;to improve&amp;nbsp;our clock configuration.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks &amp;amp;&amp;nbsp; Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Charudatta&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 11:38:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877617#M16317</guid>
      <dc:creator>charudattaingal</dc:creator>
      <dc:date>2019-02-20T11:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL PLL configuration with CPMUPLL</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877618#M16318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;Charudatta&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If FM function is enabled it must be taken that maximum&amp;nbsp;bus frequency is not exceeded.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The maximum bus clock frequency for the S12ZVL is 32 MHz.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, if you have the bus clock 32 MHz and FM is set at 4%&amp;nbsp;you should consider that the bus clock frequency will be in the range&amp;nbsp;30.72 MHz&amp;nbsp;-&amp;nbsp;33.28 MHz. So, in this case, we are not in the specified range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the bus clock should be set less than&amp;nbsp;32 MHz when FM is enabled.&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 13:43:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877618#M16318</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2019-02-20T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL PLL configuration with CPMUPLL</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877619#M16319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Diana&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the Ideal bus clock values, when we configure/Enable&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;FM&lt;SPAN&gt;&amp;nbsp; 1, 2 and 4 %.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt; background: white; vertical-align: baseline;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Are we configuring CPMUPLL at right place after configuring VCOCLK frequency?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: transparent; color: #51626f;"&gt;Best&lt;/SPAN&gt;&lt;SPAN style="color: #51626f;"&gt;&amp;nbsp;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;Charudatta&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 14:23:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877619#M16319</guid>
      <dc:creator>charudattaingal</dc:creator>
      <dc:date>2019-02-20T14:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVL PLL configuration with CPMUPLL</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877620#M16320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;Charudatta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set the bus clock for example at 30 MHz after that the range with 4% FM will be 28.8 MHz - 31.2 MHz.&lt;/P&gt;&lt;P&gt;After that, we are in the specified range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At&amp;nbsp;first, I would like to recommend&amp;nbsp;you to follow the steps in the RM rev2.47 below and after that, set the CPMUPLL&amp;nbsp;register.&lt;/P&gt;&lt;P&gt;– Configure the PLL for desired bus frequency.&lt;BR /&gt;– Program the reference divider (REFDIV[3:0] bits) to divide down oscillator frequency if&lt;BR /&gt;necessary.&lt;BR /&gt;– Enable the external oscillator (OSCE bit).&lt;BR /&gt;– Wait for the oscillator to start up (UPOSC=1) and PLL to lock (LOCK=1).&lt;/P&gt;&lt;PRE&gt;if OSCE = 1        f_ref = f_osc / (REFDIV + 1) = 10MHz / (0 + 1) = 10MHz                    
&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;f_vco = 2 * f_ref * (SYNDIV + 1) = 2 * 10MHz * (2 + 1) = 60MHz                                                   
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if LOCK = 1     f_pll = f_vco / (POSTDIV + 1) = 60MHz / (0 + 1) = 60MHz                        
&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;f_bus = f_pll/2     = 30MHz&lt;/PRE&gt;&lt;PRE style="color: #000000;"&gt;CPMUPOSTDIV = 0x00;   
// [4-0] POSTDIV = 0b00000   

CPMUSYNR = 0x42;  
// [7-6] VCOFRQ = 0b01 (48MHz &amp;lt; fVCO &amp;lt;= 64MHz)  
// [5-0] SYNDIV = 0b000010     

CPMUREFDIV = 0x80;  
// [7-6] REFFRQ = 0b10 (6MHz &amp;lt; fREF &amp;lt;= 12MHz)  
// [3-0] REFDIV = 0b0000        

CPMUIFLG = 0xFF;  // clear LOCKIF and OSCIF  
 
CPMUOSC_OSCE = 1;  // enable external oscillator OSCE   

// Wait for oscillator to start up (UPOSC=1) and PLL to lock (LOCK=1).
while (!CPMUIFLG_LOCK){}  
while (!CPMUIFLG_UPOSC){}  
 
CPMUCLKS_PLLSEL = 1;  
while(!CPMUCLKS_PLLSEL){}  
 
CPMUPLL = 0x30; // FM +-4%   
while (!CPMUIFLG_LOCK){}  
while (!CPMUIFLG_UPOSC){}&lt;/PRE&gt;&lt;P style="border: 0px;"&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;MagniV PLL calculator can be useful if you want to calculate&amp;nbsp;the value of PLL registers.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-341785" rel="nofollow noopener noreferrer" target="_blank"&gt;MagniV PLL Calculator&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 08:44:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVL-PLL-configuration-with-CPMUPLL/m-p/877620#M16320</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2019-02-21T08:44:41Z</dc:date>
    </item>
  </channel>
</rss>

