<?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 on nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94471/fft-on-nrf9160</link><description>Hi Everyone, 
 I am wondering if anyone have done FFT with a nRF9160. I found discussion about FFT on nRF52, but nothing on nRF9160. Can it be done? An example would be nice. Thank you in advance. 
 Cheers, 
 Floyd</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Dec 2022 14:06:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94471/fft-on-nrf9160" /><item><title>RE: FFT on nRF9160</title><link>https://devzone.nordicsemi.com/thread/401087?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2022 14:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57cc4aff-a2be-4eee-9435-2fae275c6cdf</guid><dc:creator>flau</dc:creator><description>&lt;p&gt;Thank you.&amp;nbsp; Will give that a try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FFT on nRF9160</title><link>https://devzone.nordicsemi.com/thread/399476?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 14:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fc3bea7-212d-4cc7-a3a4-a170cdd300e8</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Floyd,&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t seen it done so far, but it&amp;#39;s certainly possible!&lt;/p&gt;
&lt;p&gt;Among the nRF52-related discussion you found, you might have seen references to the &lt;a href="https://www.keil.com/pack/doc/CMSIS/DSP/html/index.html"&gt;CMSIS-DSP Library&lt;/a&gt;, which supports performing FFTs. The &lt;a href="https://developer.arm.com/tools-and-software/embedded/cmsis"&gt;CMSIS libraries&lt;/a&gt; are available for many Cortex-M devices, including the Cortex-M33 in the nRF9160.&lt;a href="https://www.keil.com/pack/doc/CMSIS/DSP/html/index.html"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The CMSIS-DSP library had to be added &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/19791"&gt;manually&lt;/a&gt; before, but is now distributed with Zephyr.&lt;/p&gt;
&lt;p&gt;First off, add the following to your prj.conf (taken from &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/51656/how-to-include-math-cmsis-dsp-library-in-nrf9160"&gt;this case&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_CMSIS_DSP=y
CONFIG_NEWLIB_LIBC=y
CONFIG_FPU=y

#if  printf should be able to print float
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then include:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; #include &amp;quot;arm_math.h&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To make the functions available for use.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To keep &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/78458/nrf9160-cmsis-dsp-code-bloat"&gt;space requirements&lt;/a&gt; low, some of the DSP functions might require setting additional Kconfig flags. You can browse those here: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#!CMSIS_DSP"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#!CMSIS_DSP&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For examples on how to perform FFT using the DSP library, I found the following links:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://m0agx.eu/2018/05/23/practical-fft-on-microcontrollers-using-cmsis-dsp/"&gt;Practical FFT on microcontrollers using CMSIS DSP&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=gIh0pPsyGpI"&gt;ARM CMSIS DSP FFT Library - Youtube&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.keil.com/pack/doc/CMSIS/DSP/html/arm_fft_bin_example_f32_8c-example.html"&gt;https://www.keil.com/pack/doc/CMSIS/DSP/html/arm_fft_bin_example_f32_8c-example.html&lt;/a&gt; (example from the library itself)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>