<?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>Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65112/optimisation-level-in-ses---nrf52832-icm20948</link><description>Hi, 
 
 I am developing an ESB application with 1 central (nrf52832 DK) and several peripheral. The peripheral are nrf52832 + ICM 20948. Development is done with Segger embedded studio (SES) . 
 I am using SDK16, the latest. 
 
 Application on the peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Aug 2020 08:36:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65112/optimisation-level-in-ses---nrf52832-icm20948" /><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266393?ContentTypeID=1</link><pubDate>Wed, 26 Aug 2020 08:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb2fd3a8-d471-4e80-8915-907e0f410f3f</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You need the HFCLK for ESB operation, I suggest you rather disable ESB than the HFCLK as that should also clean up any resources like HFCLK.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266306?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 15:49:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae1d2d6-8dba-4ee5-ba0b-4efd73bf01fb</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;Hi, I have found that the main culprit is the HFCLK used for&amp;nbsp;the ESB. &amp;nbsp;I have to do more measurement and testing today. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_drv_clock_hfclk_release(); // does nothing&lt;/p&gt;
&lt;pre&gt;NRF_CLOCK-&amp;gt;TASKS_HFCLKSTOP = 1;  //  power consumption drop from 200&amp;micro;A to almost nothing, less than 40&amp;micro;A.  Its time to get my scope to get more precise data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now the problem is that I don&amp;#39;t know how to restart the clock.&lt;br /&gt;&lt;br /&gt;Calling the clocks_start routine does not do the trick.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;void clocks_start( void )
{
    NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
    while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);

}&lt;/pre&gt;
&lt;p&gt;Any suggestion ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266131?ContentTypeID=1</link><pubDate>Tue, 25 Aug 2020 08:33:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:470965c1-fbb0-45ef-b2cc-0f51981f8812</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I might be able to see what it is that is using the excess power from the waveform.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Are you using a custom board or a DK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266050?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 15:21:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ec5c4fd-6396-4ecf-a725-217753f5aae6</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;Yes I do have a scope, but my voltmeter gave me the same value (an average of the voltage). &amp;nbsp;I am measuring voltage across a 10 ohm resistor (ground connection) on my external board. &amp;nbsp;I have open tread about that, but found no obvious solution. &amp;nbsp;The next step will be&amp;nbsp;to strip the program to the basic and had section by section and see were it goes wrong. &amp;nbsp;I will get there...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266035?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 14:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:948b07be-fdc2-4921-9af5-85c42356d109</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Yeah, that&amp;#39;s not right. Do you have a proper scope of the current consumption?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266029?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 14:23:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:021ec5b6-912e-42c9-9a9a-60472a8549d2</guid><dc:creator>SL06</dc:creator><description>&lt;p&gt;Problem solved. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have forgot to set the printf option to float in the new build configuration.&lt;/p&gt;
&lt;p&gt;The other&amp;nbsp;problem was likely with the application size. &amp;nbsp;Removing an unused large matrix variable solved the issue and now the compiled program run normally, using optimisation level 1 or 2. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I still have to work on the power consumption, &amp;nbsp;200&amp;micro;A in resting mode. &amp;nbsp;I should be able to do better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Optimisation level in SES - nrf52832 + ICM20948</title><link>https://devzone.nordicsemi.com/thread/266024?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 14:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3776866f-8e87-4ab7-ae70-b46e5f51d7b1</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Can you share the relevant code?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best guess is a loop where the conditional check uses a variable that is not declared as volatile.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>