<?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>Kinetis MicrocontrollersのトピックRe: FFT Metering on Cortex-M4</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713497#M43822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Shmuel,&lt;/P&gt;&lt;P&gt;can you tell me&amp;nbsp; which api functions you tested? what are the core clock frequency for both Cortex-M0 and Cortex-M4 cores?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Oct 2017 06:45:51 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2017-10-27T06:45:51Z</dc:date>
    <item>
      <title>FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713494#M43819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any information about the&amp;nbsp;function performance for the&amp;nbsp;FFT-Based Metering Algorithms using the Cortex-M4?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AN4255 only has info for&amp;nbsp;CM0+ and&amp;nbsp;CM0+ with MMAU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me that the performance is far worse on the M4 than on the M0+ with MMAU.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most noticeably the following functions seem to be taking a long time:&lt;/P&gt;&lt;P&gt;METERLIBFFT3PH_GetMagnitudesPh&lt;/P&gt;&lt;P&gt;METERLIBFFT3PH_GetPhasesPh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 22:37:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713494#M43819</guid>
      <dc:creator>sbranover</dc:creator>
      <dc:date>2017-10-23T22:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713495#M43820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Shmuel,&lt;/P&gt;&lt;P&gt;As you know that we use Kinetis KM family in the energy metering application, the KM family integrates PGA, SAR-ADC, AFE ADC, so almost all application notes and reference code are based on Cortex-M0 plus, because KM family use Cortex-M0 plus as core. Unfortunately, we have not the doc which compares the performance difference between cortex-M0 and cortex-M4 core. But the cortex-M4 has higher performance especially FFT, beacuse the cortex-M4 have a lot of single cycle computation assembly instructions, but it is depemdent on the assembly instructions of api function which executes.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;B R&lt;/P&gt;&lt;P&gt;xiangjun rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 07:50:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713495#M43820</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-10-24T07:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713496#M43821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if the FFT metering library makes use of the&amp;nbsp;optimizations available&amp;nbsp;on the Cortex-M4? As the library is supplied without the source code it is hard to tell without going through the disassembly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measuring performance time with&amp;nbsp;an oscilloscope it seems that the library&amp;nbsp;takes longer (almost 2 x clock cycles) on the CM4 compared to the CM0+ with MMAU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Oct 2017 15:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713496#M43821</guid>
      <dc:creator>sbranover</dc:creator>
      <dc:date>2017-10-24T15:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713497#M43822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Shmuel,&lt;/P&gt;&lt;P&gt;can you tell me&amp;nbsp; which api functions you tested? what are the core clock frequency for both Cortex-M0 and Cortex-M4 cores?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 06:45:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713497#M43822</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2017-10-27T06:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713498#M43823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;It is the Cortex-M0 w MMAU&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Signals are 64 samples&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Signals used from inputdata.h:&lt;/P&gt;&lt;P&gt;u1 -&amp;nbsp;sin_64s_6e6_5h_10p&lt;/P&gt;&lt;P&gt;u2 - sin_64s_6e6_5h_10p_121deg&lt;/P&gt;&lt;P&gt;u3 - sin_64s_6e6_5h_10p_239deg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i1 - sin_64s_4e6_5h_40p_sh_offs&lt;/P&gt;&lt;P&gt;i2 - sin_64s_1e6_5h_10p&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i3 - sin_64s_4e6_5h_40p_sh_offs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Core Clock Frequency:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Cortex-M0 -&amp;nbsp;71.991296 MHz&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cortex-M4 - 120.0 MHz&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Running Times&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;METERLIBFFT3PH_CalcMain() without phase shift&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cortex-M0 -&amp;nbsp;1.97&amp;nbsp;mS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cortex-M4 - 1.76&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;mS&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&g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t;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Cortex-M0 - 0.49 mS&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Cortex-M4&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;- 1.13 mS&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 11:59:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713498#M43823</guid>
      <dc:creator>sbranover</dc:creator>
      <dc:date>2017-10-27T11:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713499#M43824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shmuel,&lt;/P&gt;&lt;P&gt;please refer to fraclib_inlines.h and fraclib.h header files in FFT library installation folder for information regarding math type used in library for different core platforms.&lt;/P&gt;&lt;P&gt;There are two defines in fraclib_inlines.h:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;#define USE_MMAU&lt;/LI&gt;&lt;LI&gt;#define USE_FRACLIB_MUL32&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Those defines were used as follows:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Library for CM0+ core w/o MMAU:&amp;nbsp; math code base compiled with define&amp;nbsp;&lt;SPAN&gt;USE_FRACLIB_MUL32&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Library for CM0+ core w/ MMAU:&amp;nbsp; math code base compiled with define&amp;nbsp;&lt;SPAN&gt;USE_MMAU&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Library for CM4:&amp;nbsp; code base compiled with&lt;SPAN&gt;&amp;nbsp;none of defines&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;Note that faster computing of the metering algorithm with CM0+ w/ MMAU vs. CM4 is expected because instruction set of the MMAU has been tailored to the power metering use-case. Some more information available from here:&amp;nbsp;&lt;A href="https://community.nxp.com/docs/DOC-105857"&gt;FTF-SCE-F1516.pdf&lt;/A&gt;.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Martin M.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/ludek"&gt;ludek&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 08:23:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713499#M43824</guid>
      <dc:creator>MarMi</dc:creator>
      <dc:date>2017-11-02T08:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: FFT Metering on Cortex-M4</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713500#M43825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems a floating point implementation would be best for the CM4.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Nov 2017 17:11:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/FFT-Metering-on-Cortex-M4/m-p/713500#M43825</guid>
      <dc:creator>sbranover</dc:creator>
      <dc:date>2017-11-06T17:11:28Z</dc:date>
    </item>
  </channel>
</rss>

