<?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>Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109774/expected-current-consumption-in-the-nrf52832-when-using-zephyr-rtos</link><description>Hi, 
 I am using nRF52832 board and I want to understand the current consumption in the board will differs while running the code in zephyr RTOS platform and without zephyr RTOS platform. I want to know analysis behind the current consumption evaluation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jun 2024 11:29:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109774/expected-current-consumption-in-the-nrf52832-when-using-zephyr-rtos" /><item><title>RE: Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/thread/490602?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 11:29:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73b6b318-6252-477a-bce6-26134b8a5ddf</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;HI Naveed,&lt;/p&gt;
&lt;p&gt;That is indeed a bit too large for system off mode.&lt;/p&gt;
&lt;p&gt;Try setting the following in prj.conf file&lt;/p&gt;
&lt;p&gt;disable serial logging:&lt;br /&gt;CONFIG_LOG=n&amp;nbsp;&lt;br /&gt;CONFIG_SERIAL=n&lt;/p&gt;
&lt;p&gt;Enable system and device power management&lt;br /&gt;&lt;span&gt;CONFIG_PM=y&lt;br /&gt;&lt;/span&gt;&lt;span&gt;CONFIG_PM_DEVICE=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Enable DCDC&lt;br /&gt;&lt;/span&gt;&lt;span&gt;CONFIG_BOARD_ENABLE_DCDC=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Swathy&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/thread/488841?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2024 11:02:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4efc6c3-42ad-4d64-8614-3cda968c7325</guid><dc:creator>Naveed</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thankyou for sharing the example code. I have run the &lt;strong&gt;system_of&lt;/strong&gt;f code on my customized nrf52832 board. I am measuring the current consumption using the joules scope(I am not using PPK2 setup). My device consuming around 1mA of current but it should consume&amp;nbsp;0.3&amp;micro;A of current in system off mode.&lt;br /&gt;In the data sheet it is given as attached below,&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/pastedimage1718351577833v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Let me know what might be the reason for the current consumption here.&lt;/p&gt;
&lt;p&gt;I am using the following setup.&lt;br /&gt;Hardware:&amp;nbsp;nRF52832 board.&amp;nbsp;&lt;br /&gt;Software: visual studio. version (1.87.2)&lt;br /&gt;SDK: nRF Connect for Visual Studio. Version (v2.5.2)&lt;/p&gt;
&lt;p&gt;From the ticket I came to know that there is no separate soft device for nRF Connect. As nRF connect is based on the Zephyr RTOS. ticket:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83481/nrf-connect-for-vs-code-and-softdevice"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/83481/nrf-connect-for-vs-code-and-softdevice&lt;/a&gt;&lt;a title="nRF Connect for VS code and soft device" href="https://devzone.nordicsemi.com/f/nordic-q-a/83481/nrf-connect-for-vs-code-and-softdevice"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In my&amp;nbsp;previous code of nRF5 SDK 15.3 I am using the soft device S132. As I am porting into the Zephyr RTOS platform what would be the equivalent changes in the configuration I need to do in the nRF Connect SDK project.&lt;/p&gt;
&lt;p&gt;Can you please let me know what will be the equivalent configuration/API libraries we can use for the following functions in nRF 5 SDK to port the same into the nRF connect SDK Zephyr RTOS platform.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;static void idle_state_handle(void)
{
    if (NRF_LOG_PROCESS() == false)
    {
        nrf_pwr_mgmt_run();
    }
}&lt;/pre&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;pre class="ui-code" data-mode="text"&gt;void powerManagementInit(void)
{
    uint32_t err_code = nrf_pwr_mgmt_init();
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre class="ui-code" data-mode="text"&gt;sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;pre class="ui-code" data-mode="text"&gt; // Initialize the async SVCI interface to bootloader before any interrupts are enabled.
    err_code = bleDfuButtonlessAsyncSvciInit();
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please let me know how to proceed in the nRF Connect SDK Zephyr RTOS in VS code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have testing the following function in the nRF connect SDK, but still the current consumption is around 1mA only.&lt;/p&gt;
&lt;p&gt;Functions tried are,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;k_cpu_idle();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;k_sleep(K_FOREVER);&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;Your input will be appreciated.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Naveed&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/thread/487230?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 07:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be2da5b8-e8fe-48c9-999e-33037486a6da</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Swathy is out of office, so I&amp;#39;m replying instead.&lt;/p&gt;
&lt;p&gt;Based on your measurement, it seems like the CPU is not in idle. I don&amp;#39;t know how your code looks like, but here is a sample you can use for power profiling:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/v3.5.99-ncs1/samples/boards/nrf/system_off"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/v3.5.99-ncs1/samples/boards/nrf/system_off&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/thread/481310?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2024 13:44:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e328c9b-a99d-4195-a99e-e5daa69c6be1</guid><dc:creator>Naveed</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your response. Sorry for the delayed response, I was occupied for other tasks.&lt;/p&gt;
&lt;p&gt;I am trying to create a new project in VS Code in zephyr RTOS platform and I&amp;nbsp;want to measure the current consumption of the device.&lt;/p&gt;
&lt;p&gt;I am using the nRF52832 board, Created a project in VS code&amp;nbsp;with main function and one idle thread(while loop with no functions). In the main function I have disconnected all the GPIO&amp;#39;s in the board which may drive some current.&lt;/p&gt;
&lt;p&gt;I am following the below API&amp;#39;s to disable the GPIO&amp;#39;s in the main.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nrf_gpio_cfg_input&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;NRF_GPIO_PIN_NOPULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrf_gpio_input_disconnect&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrf_gpio_cfg_input&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;NRF_GPIO_PIN_NOPULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrf_gpio_input_disconnect&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrf_gpio_cfg_input&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;30&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;NRF_GPIO_PIN_NOPULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;nrf_gpio_input_disconnect&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;30&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Same steps followed to disable all the other GPIOs. Is this correct, what is the correct way to disable the GPIO?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I am using joule scope to measure the current readings. Below are the current consumption readings observed in the joule scope.&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;For an idle thread with no other GPIOs configured, current consumption is around 4mA.&lt;/li&gt;
&lt;li&gt;&lt;span&gt;For an idle thread with all the GPIOs configured to disconnect state, current consumption is around&amp;nbsp; 5.4mA.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;For single thread with one led blinking continuously, current consumption is around 3.4mA,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;When two led is continuously on-state the current consumption is around 13mA.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Also tried adding the below configuration as well. there is no change in the current readings.&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Adding CONFIG_SERIAL&lt;/span&gt;&lt;span&gt;=n in project config file.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span&gt;Adding&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;CONFIG_PM_DEVICE&lt;/span&gt;&lt;span&gt;=y in&amp;nbsp;project config file.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Please help me to understand what is happening here?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Why the current is increased from 4mA to 5.4mA when all the GPIOs are disconnected and not when led is blinking(it shows 3.4mA)?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;What is the current reading should be expected for an idle thread? (It should be in micro amps?).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;What are the things to be taken care while creating a new project in the visual studio?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;What are the basic configuration setting to be taken in the main function before adding the application code?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;What are the CONFIG macros to be enable or disable in the project config file to minimize the power consumption?&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Naveed&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/thread/477233?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 07:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ba70149-5434-4f49-afef-c7bf4b08a62e</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi Naveed,&lt;/p&gt;
&lt;p&gt;You could use the PPK2 to do this. We already have a blogpost on comparison on power consumption on nRF Connect SDK (based on Zephyr) and nRF 5 SDK (older SDK that dose not support Zephyr) that you can see here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/debunking-misconceptions-a-technical-analysis-of-nrf5-sdk-and-nrf-connect-sdk#:~:text=various%20firmware%20metrics.-,Power%20consumption,-Reducing%20power%20consumption"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/debunking-misconceptions-a-technical-analysis-of-nrf5-sdk-and-nrf-connect-sdk#:~:text=various%20firmware%20metrics.-,Power%20consumption,-Reducing%20power%20consumption&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expected current consumption in the nRF52832 when using Zephyr RTOS.</title><link>https://devzone.nordicsemi.com/thread/476348?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2024 12:13:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e98441a9-0434-44ad-8c98-9592896342dc</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Due to the Easter holidays in Norway, we are less staffed than usual.&amp;nbsp;Y&lt;span&gt;ou can expect an answer sometime next week,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Sorry for the inconvenience and thanks for your patience.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>