<?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>MPC5xxx中的主题 Re: Using the CMU on the MPC5744 for IRCOSC Measurement</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632278#M5928</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;If you changed the MD, what is then a FD value you read after measurement is finished?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MD specifies a number of IRC clock cycles to be measured.&lt;/P&gt;&lt;P&gt;The FD is loaded with number of XOSC clock cycles counted during measurement period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Sep 2016 11:36:48 GMT</pubDate>
    <dc:creator>PetrS</dc:creator>
    <dc:date>2016-09-20T11:36:48Z</dc:date>
    <item>
      <title>Using the CMU on the MPC5744 for IRCOSC Measurement</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632277#M5927</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;According to the MPC5744 reference manual&amp;nbsp;( Rev. 5, 04/2014 ):&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="164747_164747.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122245i29248F246A4AB04C/image-size/large?v=v2&amp;amp;px=999" role="button" title="164747_164747.PNG" alt="164747_164747.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5761i2DB3E57CE79FD646/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt.PNG" alt="Unbenannt.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am using CMU_0 for the IRCOSC measurement and the reference clock is the XOSC. &lt;BR /&gt;&lt;BR /&gt;When I write the value 0x64 in CMU_MDR[MD] register, I get the correct frequency which is, as per the above formula, 16 MHz given that the XOSC frequency is 40MHz. &lt;BR /&gt;&lt;BR /&gt;When I write any other value in CMU_MDR[MD] register, I get incorrect values of the IRCOSC frequency. Do you have any explanation for this ? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note: Also according to the reference manual, &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="164748_164748.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122246iE0BE51DAB25FC07C/image-size/large?v=v2&amp;amp;px=999" role="button" title="164748_164748.PNG" alt="164748_164748.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5806i6666E4AD98FA2D68/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt.PNG" alt="Unbenannt.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MDR field&amp;nbsp;is R/W and from my understanding we write into this register the number of clock cycles during which IROSC frequency measurement is done. Is that correct ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 07:11:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632277#M5927</guid>
      <dc:creator>ahmedsoubky</dc:creator>
      <dc:date>2016-09-20T07:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using the CMU on the MPC5744 for IRCOSC Measurement</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632278#M5928</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;If you changed the MD, what is then a FD value you read after measurement is finished?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MD specifies a number of IRC clock cycles to be measured.&lt;/P&gt;&lt;P&gt;The FD is loaded with number of XOSC clock cycles counted during measurement period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 11:36:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632278#M5928</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-09-20T11:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using the CMU on the MPC5744 for IRCOSC Measurement</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632279#M5929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The FD value that I read after measurement&amp;nbsp;was a&amp;nbsp;normal value in the debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the&amp;nbsp;problem was not waiting enough time&amp;nbsp;for the measurement to be finished successfully and it was resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another question regarding the setting CMU_CSR register, as per the manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Unbenannt.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5491i9B1C0C011A917FB1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Unbenannt.PNG" alt="Unbenannt.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CMU_CSR[CKSEL1]&amp;nbsp; values 00 and 11, do both values select CLKMT0_RMN ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Best Regards, &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:52:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632279#M5929</guid>
      <dc:creator>ahmedsoubky</dc:creator>
      <dc:date>2016-09-20T14:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using the CMU on the MPC5744 for IRCOSC Measurement</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632280#M5930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per my testing the IRC is always measured regardless of CKSEL1 setting.&lt;/P&gt;&lt;P&gt;I was using this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float IRC_measure(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; float IRC;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t measDur = 50000;&amp;nbsp;&amp;nbsp; /* 0 – 1 048 575 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CMU_0.CSR.B.CKSEL1 = 0;&amp;nbsp;&amp;nbsp; /* Measure IRC */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CMU_0.MDR.R = measDur;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CMU_0.CSR.B.SFM = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(CMU_0.CSR.B.SFM==1){};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRC = (float)((40.0 * measDur) / CMU_0.FDR.R);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return IRC;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2016 08:42:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Using-the-CMU-on-the-MPC5744-for-IRCOSC-Measurement/m-p/632280#M5930</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2016-09-21T08:42:43Z</dc:date>
    </item>
  </channel>
</rss>

