<?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>power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105868/power-consumption-is-too-high-on-my-nrf52-soc</link><description>Hi, 
 I am currently trying to decrease my power output, for this purpose I used a power profiler and found this pattern: 
 
 I am using a test firmware that just disables all unused gpio ports, start ble and then goes into while(1){ __WFE();} 
 power</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Nov 2023 08:30:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105868/power-consumption-is-too-high-on-my-nrf52-soc" /><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/457085?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 08:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e563b606-86aa-4c9a-a27a-13af5c608e53</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;alright, thanks so much for your help you provided very valuable input!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/457075?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 07:43:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cb148c9-b7a9-4731-ace7-4ad3fb34fed8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You need to change the way you trigger SAADC sampling if you want to reduce the sleep current. The typ. system current with a TIMER instance running in System ON is around 500 uA (see &lt;a title="TIMER running" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.i_timer.html?cp=5_0_0_4_1_0_8"&gt;TIMER running&lt;/a&gt;). I would recommend just using the app timer and trigger sampling from a timer callback.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456982?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 15:07:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:facb6b53-7a8c-476e-a637-ccd58a094aee</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;what do I need to do in this function to decrease the power consumption:&lt;/p&gt;
&lt;pre&gt;void saadc_sampling_event_init(void)
{
    ret_code_t err_code;

    err_code = nrf_drv_ppi_init();
    APP_ERROR_CHECK(err_code);

    nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
    timer_cfg.bit_width = NRF_TIMER_BIT_WIDTH_32;
    err_code = nrf_drv_timer_init(&amp;amp;m_timer, &amp;amp;timer_cfg, timer_handler);
    APP_ERROR_CHECK(err_code);

    /* setup m_timer for compare event every 400ms */
    uint32_t ticks = nrf_drv_timer_ms_to_ticks(&amp;amp;m_timer, 400);
    nrf_drv_timer_extended_compare(&amp;amp;m_timer,
                                   NRF_TIMER_CC_CHANNEL0,
                                   ticks,
                                   NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK,
                                   false);
    nrf_drv_timer_enable(&amp;amp;m_timer);

    uint32_t timer_compare_event_addr = nrf_drv_timer_compare_event_address_get(&amp;amp;m_timer,
                                                                                NRF_TIMER_CC_CHANNEL0);
    uint32_t saadc_sample_task_addr   = nrf_drv_saadc_sample_task_get();

    /* setup ppi channel so that timer compare event is triggering sample task in SAADC */
    err_code = nrf_drv_ppi_channel_alloc(&amp;amp;m_ppi_channel);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_ppi_channel_assign(m_ppi_channel,
                                          timer_compare_event_addr,
                                          saadc_sample_task_addr);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456974?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 14:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c6faedd-2922-4851-a013-a957826eefff</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;ok thanks so I will leave this out and I also found out that my saadc sampling is responsible for most of the drainage besides that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456874?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 10:47:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca946d84-6acf-4c88-9ab0-2fc012eb6923</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Writing &amp;#39;1&amp;#39; to NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART will start the 32 MHz crystal oscillator, and the crystal oscillator is not automatically released in sleep. The run current with the oscillator active is about 200 uA.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456868?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 10:31:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4330ff86-7b93-421e-8060-ad00ce47b9de</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;still it looks like something is requesting air time every ms, the advertising event only occurs every 500ms as defined, thats whats so weird&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_11_2D00_22-at-11.31.03.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456848?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 09:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30f567b8-daff-43d9-aae5-24675d065e91</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I actually noticed something while investigating, I used the following lines in my ble setup:&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;  NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART  = 1;
  while ( NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);    
&lt;/pre&gt;
&lt;p&gt;and when commenting them , the average went down significantly (at least on the DK, I will test this on my custom PCB later). Though I think I included this because there was a problem with the SD but I cannot pinpoint what exactly it was. What are your thoughts on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456834?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 08:50:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84b4d18d-548b-4de8-b740-76c4dc229f49</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;if i run it on the DK with only the WFE main loop it takes 20uA&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456635?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2023 10:23:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8c385a4-cba7-4531-b38c-4439725583dd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The&amp;nbsp;idle current would not have dropped below the CPU run current if the system did not enter sleep. The CPU run current ranges from approximately 2.8 mA to 6.3 mA depending on the supply and regulator configuration. There might be something that is either requesting system resources, such as the 16 MHz clock in sleep mode, or causing leakage from the IOs.&lt;/p&gt;
&lt;p&gt;Do you measure a different sleep current&amp;nbsp;if you comment out everything except the main loop in your main() function while running on the DK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456490?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 15:06:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b19bf94-02ea-476c-947c-cbdbd9a89082</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I could try to trim it down, its basically only the ble file then anyways, I could send you the params Im using without the services&lt;/p&gt;
&lt;p&gt;how do I know if WFE() actually works? I got the feeling it doesnt really shut down the uC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456475?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:46:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc359012-2c76-4f36-b360-ec4eec9d6e38</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You still have a high idle current, although it&amp;#39;s much less noisy. Either way, I need to know what your code is doing to understand what&amp;#39;s causing this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456474?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a4938fd-458a-4f30-8723-b294377d6679</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_11_2D00_20-at-15.42.34.png" alt=" " /&gt;this is what I get running the exact same code on a PCA10056 DK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456465?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13270d70-172d-4bd6-9db9-bb7d60216c81</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;There wasn&amp;#39;t much to see in that function. Do you have a DK you can try this on? Alternatively, could you share your whole project here or in a private ticket so I can try it here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456461?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b17f550-781c-4a0e-a5cf-ebbebfd3218c</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void) {

  gpio_init();

  ble_init();

  flash_init();

  ble_advertise();

  while (1) {
     __WFE();
  }

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;gpio_init as I said just initializes (clears) some pins, ble_init() does the usual initialization of services etc, in flash init I just read from flash so no further interefering processes from there, I also have no scheduler enabled. I also tried sd_app_evt_wait() but no difference here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456458?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e78c33b8-8e65-4b55-b356-86dd3661584c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Are you able to share your&amp;nbsp;main() function here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456454?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:23:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4fc3a10-12cc-4aec-a096-d0dfcbe26031</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;yeah exactly thats why i made this thread I never see like near 0 current or &amp;#39;real&amp;#39; sleeping intervals its just always like this, my advertising interval is around 300ms&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the event where my arrow is pointing is supposed to be the advertising I think:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_11_2D00_20-at-15.07.55.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456453?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cf09305-bc83-400e-9b1e-9420e4e560e1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You should be able to see the sleep/floor current between advertising events (assuming the spikes are BLE events and not some other noise).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you start an advertiser after you enable BLE? In that case, what interval are you advertising at?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456449?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:08:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac427a1c-c1e3-48f1-ad8a-319449aecb09</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;yes, its 450uA on average if I turn on BLE (as seen in the image provided)&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;without BLE its 220 on average but as I said I want to focus on the BLE problem first.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1700489297356v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456443?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 14:02:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d53bc8d-0b67-417b-9894-3e481b96a9e7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can also see leakage from IOs in System OFF as the GPIO peripheral configurations are retained in OFF mode. Is possible to cut the power to the radar IC, or is it powered with the nRF?&lt;/p&gt;
[quote user="Juliusc"]and thats the current I see then. this still doesnt explain the residual 200uA when using BLE[/quote]
&lt;p&gt;Not sure I understand the relation with BLE. Does the floor current increase when you enable BLE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456425?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:24:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:853e0f2a-118b-4f3e-b478-e5f8f22c084f</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;yeah some leakage comes from there, like around 220uA, I know this, since I also used a fw that just says NRF_POWER-&amp;gt;SYSTEMOFF = 1; and thats the current I see then. this still doesnt explain the residual 200uA when using BLE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456422?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:15:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88a08218-d433-4a13-b7e7-dba80a65f013</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Is the radar chip powered from the power rail as the nRF5, and is it possible that you may say current&amp;nbsp;leakage from this IC if the nRF5 is no driving the pins to a defined state?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456418?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f77fde2-6bee-4153-8717-a82c604b60e7</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;yes I have a radar chip connected to those pins, though this isnt really the problem that I see with my power. Or do you think theres more to that?&lt;/p&gt;
&lt;p&gt;One of the pins is connected with a not-gate maybe this is the reason why some current was drawn through that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456417?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec9a7ae5-6ffc-44fe-8df1-f07ad261791f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. Did you check&amp;nbsp;what pin configuration of those pins were first? Also, are these pins connected to anything on your board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456414?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af2d4377-8646-4067-b925-bf4e33c6bc9d</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;&lt;span&gt;nRF5 SDK&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I see I noticed that the current is a bit higher when I dont set certain gpio pins to clear specifically.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: power consumption is too high on my nrf52 SoC</title><link>https://devzone.nordicsemi.com/thread/456413?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 12:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc9979e2-3fa8-4c01-b702-87d9faeaec1c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Julius,&lt;/p&gt;
&lt;p&gt;Unused pins can be left floating without affecting the sleep current as GPIO pins are configured as inputs with the input buffer disconnect after reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1700485083015v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Are you developing with the nRF Connect SDK or the nRF5 SDK?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>