<?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: HCS12, S12X programming speed.</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727050#M14870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="31214" data-username="Eric_t" href="https://community.nxp.com/people/Eric_t" style="color: #5e89c1; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: none; font-size: 11.9994px;"&gt;Eric_t d&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure from your question if you already&amp;nbsp;configured the PLL filter. If yes, could you send me the code with your settings?&lt;/P&gt;&lt;P&gt;If not, for the configuration PLL, I recommend you PLL calculator&amp;nbsp;&lt;A href="https://community.nxp.com/docs/DOC-103954"&gt;S12X PLL (Filter) Calculator&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There you can choose oscillator and BUS clock frequency and calculate the setting of the registers and set it in the PLL_Init function below.&lt;/P&gt;&lt;P&gt;Below you can see example code for the PLL settings of the S12XEP100 MCU, you can use it for the S12XEQ512 and you can be inspired which registers you should set for the S12XDT512.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void PLL_Init(unsigned char synr, unsigned char refdv, unsigned char postdi) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; PLLCTL = 0B00000001; // CME=0,PLLON=0,FM1=0,FM2=0,FSTWKP=0,PRE=0,PCE=0,SCME=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLKSEL = 0B00000011; // PLLSEL=0,PSTP=0,PLLWAI=0,RTIWAI=1,COPWAI=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; SYNR = synr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the multiplier register&lt;/P&gt;&lt;P&gt;&amp;nbsp; REFDV = refdv;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the divider register&lt;/P&gt;&lt;P&gt;&amp;nbsp; POSTDIV = postdiv;&amp;nbsp;&amp;nbsp; // Set the post divider register&lt;/P&gt;&lt;P&gt;&amp;nbsp; PLLCTL_PLLON = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable the Phase Lock Loop&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!CLKSEL_PLLSEL)&amp;nbsp; // PLLSEL=1 check&lt;/P&gt;&lt;P&gt;&amp;nbsp; { while(!CRGFLG_LOCK); // Wait till the PLL VCO is within tolerance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLKSEL_PLLSEL = 1;&amp;nbsp;&amp;nbsp; // Select clock source from PLLCLK&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void main(void) {&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PLL_Init(0xC4,0x83,0x00); // 50MHz BUSCLK from 40MHz OSCCLK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;) {} /* wait forever */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* please make sure that you never leave this function */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&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>Mon, 07 May 2018 10:31:17 GMT</pubDate>
    <dc:creator>dianabatrlova</dc:creator>
    <dc:date>2018-05-07T10:31:17Z</dc:date>
    <item>
      <title>HCS12, S12X programming speed.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727049#M14869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;Hi&lt;BR /&gt; I am using mc9s12xdt512 and mc9sxeq512 controllers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;All of them have 16MHz crystal and xdt512 has PLL filter for 40MHz bus frequency&lt;BR /&gt; Compiler, codewarrior 5.2&lt;BR /&gt; Debugger, multilink universal and multilink FX.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;Windows 10 PC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&lt;BR /&gt; I have an issue with the programming speed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;For mc9s12xdt512:&lt;BR /&gt; The programming speed with 16MHz crystal is 16KB per second.&lt;BR /&gt; I have replaced crystal with 29MHz and the programming speed increased from 16KB per second to 21KB per second.&lt;BR /&gt; So it seems, the internal bus frequency specifies the programming speed.&lt;BR /&gt; Does anyone know, if there is there is a way to activate the PLL during programming, so I can have crystal 16MHz, 40MHz bus frequency, and better programming speed?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;For mc9sxeq512.&lt;BR /&gt; The programming speed with 16MHz crystal is only 9KB per second. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;The programming time of the whole 512KB of firmware, takes ages, making debugging a very painful procedure.&lt;BR /&gt; Does anyone if there is a way to improve the programming speed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 23:22:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727049#M14869</guid>
      <dc:creator>Eric_t</dc:creator>
      <dc:date>2018-05-04T23:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12, S12X programming speed.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727050#M14870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #646464; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="31214" data-username="Eric_t" href="https://community.nxp.com/people/Eric_t" style="color: #5e89c1; background-color: #ffffff; border: 0px; font-weight: 600; text-decoration: none; font-size: 11.9994px;"&gt;Eric_t d&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure from your question if you already&amp;nbsp;configured the PLL filter. If yes, could you send me the code with your settings?&lt;/P&gt;&lt;P&gt;If not, for the configuration PLL, I recommend you PLL calculator&amp;nbsp;&lt;A href="https://community.nxp.com/docs/DOC-103954"&gt;S12X PLL (Filter) Calculator&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There you can choose oscillator and BUS clock frequency and calculate the setting of the registers and set it in the PLL_Init function below.&lt;/P&gt;&lt;P&gt;Below you can see example code for the PLL settings of the S12XEP100 MCU, you can use it for the S12XEQ512 and you can be inspired which registers you should set for the S12XDT512.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void PLL_Init(unsigned char synr, unsigned char refdv, unsigned char postdi) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; PLLCTL = 0B00000001; // CME=0,PLLON=0,FM1=0,FM2=0,FSTWKP=0,PRE=0,PCE=0,SCME=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLKSEL = 0B00000011; // PLLSEL=0,PSTP=0,PLLWAI=0,RTIWAI=1,COPWAI=1&lt;/P&gt;&lt;P&gt;&amp;nbsp; SYNR = synr;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the multiplier register&lt;/P&gt;&lt;P&gt;&amp;nbsp; REFDV = refdv;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the divider register&lt;/P&gt;&lt;P&gt;&amp;nbsp; POSTDIV = postdiv;&amp;nbsp;&amp;nbsp; // Set the post divider register&lt;/P&gt;&lt;P&gt;&amp;nbsp; PLLCTL_PLLON = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Enable the Phase Lock Loop&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!CLKSEL_PLLSEL)&amp;nbsp; // PLLSEL=1 check&lt;/P&gt;&lt;P&gt;&amp;nbsp; { while(!CRGFLG_LOCK); // Wait till the PLL VCO is within tolerance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CLKSEL_PLLSEL = 1;&amp;nbsp;&amp;nbsp; // Select clock source from PLLCLK&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;void main(void) {&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; PLL_Init(0xC4,0x83,0x00); // 50MHz BUSCLK from 40MHz OSCCLK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(;;) {} /* wait forever */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* please make sure that you never leave this function */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&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>Mon, 07 May 2018 10:31:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727050#M14870</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2018-05-07T10:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12, S12X programming speed.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727051#M14871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Batrova.&lt;/P&gt;&lt;P&gt;Sorry for the misunderstanding.&lt;/P&gt;&lt;P&gt;By "programming speed" I mean the time that needs codewarrior to programm the firmware to controller.&lt;/P&gt;&lt;P&gt;The picture below, shows the programming speeds.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23834i06DB91E17922CACB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see, for mc9s12xdt512 with crystal 16MHz, the programming speed is 16kB per second, while with crystal 29MHz is 21kB per second.&lt;/P&gt;&lt;P&gt;For mc9s12xeq512, it is even worst. The programming speed with crystal 16MHz is only 10kB per second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that for large firmwares (almost 512kB), the programming time is way too long and slows down the debugging procedure.&lt;/P&gt;&lt;P&gt;Especially for&amp;nbsp;&lt;SPAN&gt;mc9s12xeq512, the programming time is unacceptable&amp;nbsp;long.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose that there is way to speed up the programming procedure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I understand, during programming procedure, the PLL is OFF and this is the reason of the slow programming times.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made some measures with the following pemicro algorithms for cyclon pro.&lt;/P&gt;&lt;P&gt;-&amp;nbsp; &amp;nbsp;Freescale_9S12XDP512_1x16x256k_512k_Linear_16k_page.12P&lt;/P&gt;&lt;P&gt;-&amp;nbsp; &amp;nbsp;Freescale_9S12XDP512_1x16x256k_512k_Linear_16k_page_pll.12P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The algorithm with the PLL, activates the PLL and gives 25MHz bus frequency, reducing the programming time by 20 seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, my question is, if there is a way to tell codewarrior to activate the PLL when programming the firmware in order to reduce the programming time?&lt;/P&gt;&lt;P&gt;Or is there any other way the reduce programming speed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 15:26:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727051#M14871</guid>
      <dc:creator>Eric_t</dc:creator>
      <dc:date>2018-05-07T15:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: HCS12, S12X programming speed.</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727052#M14872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;programming speed is decided by the&amp;nbsp;&lt;SPAN&gt;crystal,not the pll.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 07:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/HCS12-S12X-programming-speed/m-p/727052#M14872</guid>
      <dc:creator>1326688086</dc:creator>
      <dc:date>2018-12-18T07:57:14Z</dc:date>
    </item>
  </channel>
</rss>

