<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>FFT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119831/fft</link><description>Hi 
 Do you have a small FFT example using the CMSIS DSP library please 
 BSr 
 David</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Mar 2025 11:12:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119831/fft" /><item><title>RE: FFT</title><link>https://devzone.nordicsemi.com/thread/527585?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2025 11:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbcc0eb0-0e83-490d-a950-6911d6bef9db</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;It depends on which SDK and chip you are using now.&lt;/p&gt;
&lt;div&gt;For nRF5 SDK, it includes an FPU FFT example that demonstrates how to use the FPU peripheral with the CMSIS DSP library for FFT calculations.&lt;/div&gt;
&lt;div&gt;The example generates sine data (with and without noise) and processes it with FFT every 1 second. It&amp;#39;s available in the SDK at:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code dir="ltr"&gt;&amp;lt;InstallFolder&amp;gt;\examples\peripheral\fpu_fft&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;To use the CMSIS DSP library for FFT processing:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;Include the&amp;nbsp;&lt;code dir="ltr"&gt;arm_math.h&lt;/code&gt;&amp;nbsp;header&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;Add the precompiled library to your project (e.g.,&amp;nbsp;&lt;code dir="ltr"&gt;libarm_cortexM4lf_math.a&lt;/code&gt;&amp;nbsp;for Cortex-M4 with floating point)&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;The example works with Keil, IAR, and GCC environments, and can be used with or without a SoftDevice. There are also versions with FPU interrupt handling (with _irq postfix) available.&lt;/div&gt;
&lt;div&gt;&lt;a href="https://docs.nordicsemi.com/bundle/sdk_nrf5_v17.1.0/page/fpu_fft_example.html" rel="noopener noreferrer" target="_blank"&gt;FPU FFT Example&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;provides more details on testing the example.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;For Zephyr RTOS, there is no direct FFT sample, but you can refer to a&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/modules/cmsis_dsp/moving_average/README.html#cmsis-dsp-moving-average" rel="noopener noreferrer" target="_blank"&gt;CMSIS-DSP moving average sample&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;that demonstrates using the CMSIS-DSP library, which could be adapted for FFT processing.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Charlie&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>