<?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 latency problem in nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17574/fft-latency-problem-in-nrf52</link><description>i am working using NRF52, s132, sdk11, freertos. 
 for fft , i used &amp;quot;arm_rfft_fast_f32(...)&amp;quot; in cmsis-dsp library. 
 and i inserted a fpu interrupt. 
 NVIC_SetPriority(FPU_IRQn, APP_IRQ_PRIORITY_LOW);
NVIC_ClearPendingIRQ(FPU_IRQn);
NVIC_EnableIRQ</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Nov 2016 10:04:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17574/fft-latency-problem-in-nrf52" /><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67560?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 10:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:886ce078-7477-4290-a301-1dcca3412b80</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;quote&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;9.1 Floating point interrupt&lt;br /&gt;
The floating point unit (FPU) may generate
exceptions when used due to e.g.
overflow or underflow. These
exceptions will trigger the FPU
interrupt (see Instantiation on page
25). To clear the IRQ line when an
exception has occurred, the relevant
exception bit within the FPSCR
register needs to be cleared. For more
information about the FPSCR or other
FPU registers, see Cortex-M4 Devices
Generic User Guide&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Are you checking for these bits in FPSCR and clearing them ? I do not know the latency for arm_rfft_fast_f32 on nrf52.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67559?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 09:40:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a4a86de-925d-49b8-894e-fe83c82cb6af</guid><dc:creator>bigzero</dc:creator><description>&lt;p&gt;I just inserted for a mcu sleep mode .
I want to advance a fft operation time.
thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67558?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 09:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c90cd2d6-6aa5-4820-b0fc-0f20ea0197ef</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;What are you doing inside FPU ISR? can you paste that code here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67555?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 07:25:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2611063-f7b9-4965-9b86-b56f7329f935</guid><dc:creator>bigzero</dc:creator><description>&lt;p&gt;sorry, i don&amp;#39;t understand  why need to find a value on the stack.
the guide is how to decrease a latency?&lt;/p&gt;
&lt;p&gt;i think that because  FPU Handler is called, the FPU enabled.
and in nrf52.h, the following preprocessor was predefiend
#define __FPU_PRESENT                  1            /*!&amp;lt; FPU present or not&lt;/p&gt;
&lt;p&gt;but, the Handler so many is called.
so, the fft performance is slow , compare to disable a IRQ.&lt;/p&gt;
&lt;p&gt;thank you so much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67554?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 02:33:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cff580b-e3b9-4d4f-b143-0ea96e3b71c8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;FPSCR is stacked as part of the interrupt handler, so masking it doesn&amp;#39;t help you as it&amp;#39;s restored again. You need to find the value on the stack and adjust that so it&amp;#39;s popped back into the FPSCR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67557?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 13:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5369fa70-4344-450f-94a0-dc17a7b1d5d7</guid><dc:creator>bigzero</dc:creator><description>&lt;p&gt;thank you for reply.&lt;/p&gt;
&lt;p&gt;I tried your guides. but my result is same to previous status.&lt;/p&gt;
&lt;p&gt;currently, when i used &amp;quot;NVIC_EnableIRQ(FPU_IRQn)&amp;quot;,  the fft latency(arm_rfft_fast_f32) is 10~12ms in FFT size 1024.
by the way,  in NVIC_DisbleIRQ(FPU_IRQn), it is 2ms .&lt;/p&gt;
&lt;p&gt;i think that the FPU_IRQHandler is so many called. so the latency is long. right?&lt;/p&gt;
&lt;p&gt;i would like to know the fft(arm_rfft_fast_f32) latency in fft size 1024, NRF52.&lt;/p&gt;
&lt;p&gt;i hope that the latency is about 2ms in a FPU_IRQ enable.&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: fft latency problem in nrf52</title><link>https://devzone.nordicsemi.com/thread/67556?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2016 06:48:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fadf0fd-bfbd-4639-92fe-c43db5e33f96</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I think you have enable FPU in ARM core&lt;/p&gt;
&lt;p&gt;Either enable __FPU_USED then the system_nrf52.c file  OR&lt;/p&gt;
&lt;p&gt;do it manually where you want to enable it  like below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SCB-&amp;gt;CPACR |= (3UL &amp;lt;&amp;lt; 20) | (3UL &amp;lt;&amp;lt; 22);
__DSB();
__ISB();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and disable it when you want to save power when you know its being not used by&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SCB-&amp;gt;CPACR = 0; 
__DSB();
__ISB();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In assembly you can do like &lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/BEHBJHIG.html"&gt;this&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>