<?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: S12ZVH128 CPU Frequency in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510563#M12451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Axel,&lt;/P&gt;&lt;P&gt;There might be the problem with BDM communication while debugging when MCU bus clock is set to close to maximum bus clock value.&lt;/P&gt;&lt;P&gt;This because the default debug configuration is set in order to the bus clock is used as debug controller clock source.&lt;/P&gt;&lt;P&gt;In order to change this feature, please go to CW project main menu -&amp;gt; Run -&amp;gt; Debug Configurations...&lt;/P&gt;&lt;P&gt;In the Debug Configurations window, find Target Settings -&amp;gt; Connection -&amp;gt; Edit...&lt;/P&gt;&lt;P&gt;In the Hardware or Simulator Connection window, find Connection tab and uncheck the box: 'Use Bus Clock as Debug Controller Clock Source', click OK.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Edit Debug Configuration CW10.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56887i1DA427FDD7B4DB29/image-size/large?v=v2&amp;amp;px=999" role="button" title="Edit Debug Configuration CW10.png" alt="Edit Debug Configuration CW10.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Use Bus clock as Debug Controller Clock Source.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56966i0A1B30C31D5A4F48/image-size/large?v=v2&amp;amp;px=999" role="button" title="Use Bus clock as Debug Controller Clock Source.png" alt="Use Bus clock as Debug Controller Clock Source.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In that case, the debug module will use 1MHz IRC clock for BDM communication instead Bus clock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S12Z clock example codes:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-330238"&gt;https://community.freescale.com/docs/DOC-330238&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2016 08:40:25 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2016-05-11T08:40:25Z</dc:date>
    <item>
      <title>S12ZVH128 CPU Frequency</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510562#M12450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am currently using the TRK S12ZVH128 evolution board for pre-development. &lt;/P&gt;&lt;P&gt;I am trying to set the CPU Bus frequency up to 32Mhz (Max frequency).&lt;/P&gt;&lt;P&gt;Unfortunately the code always crashes when I try to set the CPMUSYNR register. &lt;/P&gt;&lt;P&gt;To eliminate bugs on my code i also tried to generate the CPU init code with processor expert, but it still crashes.&lt;/P&gt;&lt;P&gt;When i reduce the frequency down to 26 Mhz the initialization seems to work.&lt;/P&gt;&lt;P&gt;As i told, we are using the S12ZVH128 for pre-developing. For the product itself a S12zVH64 is planned.&lt;/P&gt;&lt;P&gt;If i run the code with the S12zVH64 it seems to work correctly. Why can't i use the maximum frequency for the S12ZVH128 and is it a problem to use 32Mhz for the S12zVH64?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void _EntryPoint(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*** !!! Here you can place your own code using property "User code before PE initialization" on the build options tab of the CPU compoennt. !!! ***/&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* ### MC9S12ZVH128_144 "Cpu" init code ... */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /*&amp;nbsp; PE initialization code after reset */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* IVBR: IVB_ADDR=0x7FFF,??=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg16(IVBR, 0xFFFEU);&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;/P&gt;&lt;P&gt;&amp;nbsp; /* ECLKCTL: NECLK=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8(ECLKCTL, 0x80U);&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;/P&gt;&lt;P&gt;&amp;nbsp; /*&amp;nbsp; System clock initialization */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* CPMUPROT: ??=0,??=0,??=1,??=0,??=0,??=1,??=1,PROT=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8(CPMUPROT, 0x26U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Disable protection of clock configuration registers */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; /* CPMUCLKS: PSTP=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; clrReg8Bits(CPMUCLKS, 0x40U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; /* CPMUCLKS: PLLSEL=1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8Bits(CPMUCLKS, 0x80U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable the PLL to allow write to divider registers */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; /* CPMUPOSTDIV: ??=0,??=0,??=0,POSTDIV4=0,POSTDIV3=0,POSTDIV2=0,POSTDIV1=0,POSTDIV0=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8(CPMUPOSTDIV, 0x00U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set the post divider register */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Whenever changing PLL reference clock (REFCLK) frequency to a higher value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; it is recommended to write CPMUSYNR = 0x00 in order to stay within specified&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; maximum frequency of the MCU */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* CPMUSYNR: VCOFRQ1=0,VCOFRQ0=0,SYNDIV5=0,SYNDIV4=0,SYNDIV3=0,SYNDIV2=0,SYNDIV1=0,SYNDIV0=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8(CPMUSYNR, 0x00U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; /* CPMUPLL: ??=0,??=0,FM1=0,FM0=0,??=0,??=0,??=0,??=0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8(CPMUPLL, 0x00U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set the PLL frequency modulation */ &lt;/P&gt;&lt;P&gt;&amp;nbsp; /* CPMUSYNR: VCOFRQ1=0,VCOFRQ0=1,SYNDIV5=0,SYNDIV4=1,SYNDIV3=1,SYNDIV2=1,SYNDIV1=1,SYNDIV0=1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; setReg8(CPMUSYNR, 0x5FU);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set the multiplier register */&amp;nbsp; --&amp;gt; Crash&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2016 14:59:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510562#M12450</guid>
      <dc:creator>axhubner</dc:creator>
      <dc:date>2016-05-09T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVH128 CPU Frequency</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510563#M12451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Axel,&lt;/P&gt;&lt;P&gt;There might be the problem with BDM communication while debugging when MCU bus clock is set to close to maximum bus clock value.&lt;/P&gt;&lt;P&gt;This because the default debug configuration is set in order to the bus clock is used as debug controller clock source.&lt;/P&gt;&lt;P&gt;In order to change this feature, please go to CW project main menu -&amp;gt; Run -&amp;gt; Debug Configurations...&lt;/P&gt;&lt;P&gt;In the Debug Configurations window, find Target Settings -&amp;gt; Connection -&amp;gt; Edit...&lt;/P&gt;&lt;P&gt;In the Hardware or Simulator Connection window, find Connection tab and uncheck the box: 'Use Bus Clock as Debug Controller Clock Source', click OK.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Edit Debug Configuration CW10.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56887i1DA427FDD7B4DB29/image-size/large?v=v2&amp;amp;px=999" role="button" title="Edit Debug Configuration CW10.png" alt="Edit Debug Configuration CW10.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Use Bus clock as Debug Controller Clock Source.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/56966i0A1B30C31D5A4F48/image-size/large?v=v2&amp;amp;px=999" role="button" title="Use Bus clock as Debug Controller Clock Source.png" alt="Use Bus clock as Debug Controller Clock Source.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In that case, the debug module will use 1MHz IRC clock for BDM communication instead Bus clock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S12Z clock example codes:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-330238"&gt;https://community.freescale.com/docs/DOC-330238&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 08:40:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510563#M12451</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2016-05-11T08:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: S12ZVH128 CPU Frequency</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510564#M12452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Radek, it works&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 09:31:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12ZVH128-CPU-Frequency/m-p/510564#M12452</guid>
      <dc:creator>axhubner</dc:creator>
      <dc:date>2016-05-11T09:31:07Z</dc:date>
    </item>
  </channel>
</rss>

