<?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>FPU Power Consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49062/fpu-power-consumption</link><description>Hi everybody, 
 I&amp;#39;m using nRF52832 on a custom board mounting a BME680 sensor. 
 I&amp;#39;m running a third party library for the usage of the sensor (namely BSEC Library), and it uses floating point calculations. 
 I&amp;#39;m experiencing a ∼6 mA power consumption</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jun 2019 14:24:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49062/fpu-power-consumption" /><item><title>RE: FPU Power Consumption</title><link>https://devzone.nordicsemi.com/thread/195193?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 14:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73467f12-cb1c-4ca3-9f51-136187674cb0</guid><dc:creator>Lorenzo</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;thanks for your answer. I&amp;#39;ve tried your solution (note that &lt;strong&gt;__set_FPSCR()&lt;/strong&gt; and &lt;strong&gt;__get_FPSCR()&amp;nbsp;&lt;/strong&gt;require two initial underscores):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void idle_state_handle(void)
{   
    if (NRF_LOG_PROCESS() == false)
    {  
       #if (__FPU_USED == 1)
        __set_FPSCR(__get_FPSCR() &amp;amp; ~(0x0000009F)); 
        (void) __get_FPSCR();
        NVIC_ClearPendingIRQ(FPU_IRQn);
      #endif
      __WFE();
      nrf_pwr_mgmt_run();
    }
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I had another problem, I was using nrf_delay_ms() to delay readings, now I&amp;#39;ve used a timer and everything is low power. Thanks again for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FPU Power Consumption</title><link>https://devzone.nordicsemi.com/thread/195190?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 14:18:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42af613c-77c6-4ecf-897c-75a86b46a0c9</guid><dc:creator>Lorenzo</dc:creator><description>&lt;p&gt;Hi awneil, yeah that&amp;#39;s from Bosch, however it needs to be used together with their BSEC Library (coming as a binary blob where I cannot do much) to get some special functions such as IAQ calculation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FPU Power Consumption</title><link>https://devzone.nordicsemi.com/thread/195165?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 13:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67e5a023-239f-42a0-907d-87164b03c511</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Gino&lt;/p&gt;
&lt;p&gt;This is an &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=/errata_nRF52832_Rev2/ERR/nRF52832/Rev2/latest/anomaly_832_87.html&amp;amp;anchor=anomaly_832_87"&gt;erratum in our nRF52832 chips where the CPU is awoken from System ON Idle after FPU has been used&lt;/a&gt;. To prevent unexpected wake-ups from System ON Idle, you have to add this code snippet before entering sleep:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if (__FPU_USED == 1)
 _set_FPSCR(_get_FPSCR() &amp;amp; ~(0x0000009F)); 
 (void) __get_FPSCR();
 NVIC_ClearPendingIRQ(FPU_IRQn);
#endif
 __WFE();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FPU Power Consumption</title><link>https://devzone.nordicsemi.com/thread/195099?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 11:04:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5ba16bd-4b78-41f6-8643-98be23f4de57</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;That&amp;#39;s Bosch, isn&amp;#39;t it?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve not used that one, but for some others, their low-level driver doesn&amp;#39;t require FP.&lt;br /&gt;Or they might have some non-FP code in app notes?&lt;/p&gt;
&lt;p&gt;But I am also interested in the FPU question ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>