<?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>How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840</link><description>Hello to all, 
 We have developed our application &amp;amp; the following platform we are using: 
 
 SDK 15.0, Segger IDE on windows PC 
 Softdevice version is 6.0.0 
 Hardware version nRF52840 SoC. 
 Our product is battery operated , so high power consumption</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jul 2019 15:56:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840" /><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/200146?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 15:56:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc690fa3-2b93-42d9-873c-1eb700569018</guid><dc:creator>helen</dc:creator><description>&lt;p&gt;Hi&amp;nbsp; Simonr:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; There are some document to description this workaround to power down the UARTE。In SDK15.3&amp;nbsp; fix this problem?&lt;/p&gt;
&lt;p&gt;/* Workaround by disabling the UART peripherals due to Nordic SDK15.0 issue */&lt;br /&gt; *(volatile uint32_t *)0x40002FFC = 0; /* Power down UARTE0 */&lt;br /&gt; *(volatile uint32_t *)0x40002FFC; &lt;br /&gt; *(volatile uint32_t *)0x40002FFC = 1; /* Power on UARTE0 so it is ready for next time */&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195969?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 11:53:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0043347-0b19-48ce-a6a2-688bbb3d4850</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I have resolved this issue by calling sleep mode enter in main function by proper way as below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  for (;;) {
    if (sleep_mode_enable == true) {
      sleep_mode_enter();
      sleep_mode_enable = false;
    }
    idle_state_handle();
  }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now our program is working and also optimized sleep mode consumption 38uA to 6uA.&lt;/p&gt;
&lt;p&gt;Just one question for you Is it necessary to ON NRF_LOG_ENABLED and RTT Log in sdk_config.h&lt;/p&gt;
&lt;p&gt;Currently I have enabled this with release build.&lt;/p&gt;
&lt;p&gt;Thank you so much for your great and quick response support..!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195592?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 10:50:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7876d7c4-cd82-49a2-8ede-2d29eaf16dfb</guid><dc:creator>Simonr</dc:creator><description>[quote user="vishal.borle"]Is it necessary to uart_init() before start saadc[/quote]
&lt;p&gt;&amp;nbsp;What do you mean here? You say that it works if you set the WIFI_PIN and nothing about initializing UART. So I don&amp;#39;t see why you would think UART is required. What exactly fails if you don&amp;#39;t set the WIFI_PIN? I&amp;#39;m guessing you&amp;#39;re using the WIFI_PIN somewhere in your code before you set it.&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195507?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 06:59:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e6286f7-c487-45ea-99a3-a1c9b0c91840</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;We are facing one problem for enable and disable UARTE module if I do below flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it necessary to uart_init() before start saadc because when I enable as below saadc not working:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  memset(&amp;amp;adc_buff, 0, sizeof(adc_buff));
//  nrf_gpio_pin_set(WIFI_PIN);   // ON WIFI Module
  nrf_gpio_pin_set(SENSOR_PIN); // ON Sensor
//  uart_init();
  saadc_sampling_event_init();
  saadc_sampling_event_enable();
  nrf_delay_ms(3000);
  uart_init();
  adc_configure_battery();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I remove comment of&amp;nbsp;nrf_gpio_pin_set(WIFI_PIN);&amp;nbsp; &amp;nbsp;then every thing working fine.&lt;/p&gt;
&lt;p&gt;But I want ON WiFi module after completion of saadc task.&lt;/p&gt;
&lt;p&gt;I am little bit confused why this happening?&lt;/p&gt;
&lt;p&gt;Thanks.....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195144?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 12:47:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93513d2e-e63f-47ea-9444-0593bb6d65cc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Do the timers you have initialized keep running when you go to sleep mode, or do you stop them before going to sleep and restart them once you wake up?&lt;/p&gt;
&lt;p&gt;The RAM is by default set to go off and restart when you wake up from sleep, but you can retain data in RAM while sleeping, at the cost of some current consumption. If you don&amp;#39;t know what this is I assume you are not using it.&lt;/p&gt;
&lt;p&gt;Yes, but the system supports 3 different low-frequency clock sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;32.768 kHz RC oscillator (LFRC)&lt;/li&gt;
&lt;li&gt;32.768 kHz external crystal oscillator (LFXO, also the most power efficient)&lt;/li&gt;
&lt;li&gt;32.768 kHz synthesized from HFCLK (LFSYNT, the least power efficient, as it requires the HFCLK to be on).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Page 94 in the product specification shows you how to set your clock source.&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195131?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 12:17:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a33a2c0d-0d48-4612-beae-6e12d0090ec4</guid><dc:creator>vishal</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/195105"]Your device is sleeping in system ON mode correct?[/quote]
&lt;p&gt;Yes you are correct.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/195105"]Do you have any other peripherals or additional timers running now?[/quote]
&lt;p&gt;No, I have used saadc but i have already disabled. How i can check addition timer if running.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/195105"]Do you use RAM retention?[/quote]
&lt;p&gt;RAM retention means what? In my application RTC running&amp;nbsp;for&amp;nbsp;wake up device as per schedule time.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/195105"]What low-frequency clock is the RTC using (the external one should be most power efficient)?[/quote]
&lt;p&gt;Yes I am using RTC with low frequency clock.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/195105"]What regulator(s) are you using, DCDC or LDO?&amp;nbsp;[/quote]
&lt;p&gt;I have enabled DCDC regulator in soft and hardware components also.&lt;/p&gt;
&lt;p&gt;Here is my timer_inti() function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void timers_init(void) {
  ret_code_t err_code = app_timer_init();
  APP_ERROR_CHECK(err_code);
  // Create twice press switch timer.
  err_code = app_timer_create(&amp;amp;twice_press_timer_id, APP_TIMER_MODE_SINGLE_SHOT, button_twice_timeout_handler);
  APP_ERROR_CHECK(err_code);
  // Create advertising timeout timer
  err_code = app_timer_create(&amp;amp;advertising_timeout_timer_id, APP_TIMER_MODE_SINGLE_SHOT, deep_sleep_timeout_handler);
  APP_ERROR_CHECK(err_code);
  // Create http request send time out timer
  err_code = app_timer_create(&amp;amp;request_send_timer_id, APP_TIMER_MODE_SINGLE_SHOT, device_state_request_send);
  APP_ERROR_CHECK(err_code);
  // Create WiFi response check time out timer
  err_code = app_timer_create(&amp;amp;wifi_resp_timer_id, APP_TIMER_MODE_SINGLE_SHOT, server_WiFi_resp_timeout_handler);
  APP_ERROR_CHECK(err_code);
    // Create server response check time out timer
  err_code = app_timer_create(&amp;amp;Server_resp_timer_id, APP_TIMER_MODE_SINGLE_SHOT, server_WiFi_resp_timeout_handler);
  APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks......&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195105?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 11:13:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:460d3bc0-a1a1-4d39-a8ee-f770531a9914</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Ok, I&amp;#39;m glad we finally were able to solve that one! Yes, this seems like the correct way to go shut down the UARTE0.&lt;/p&gt;
&lt;p&gt;A few questions to help us narrow down what&amp;#39;s drawing this extra current:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your device is sleeping in system ON mode correct?&lt;/li&gt;
&lt;li&gt;Do you have any other peripherals or additional timers running now?&lt;/li&gt;
&lt;li&gt;Do you use RAM retention?&lt;/li&gt;
&lt;li&gt;What is the wake-up condition of your device?&lt;/li&gt;
&lt;li&gt;What low-frequency clock is the RTC using (the external one should be most power efficient)?&lt;/li&gt;
&lt;li&gt;What regulator(s) are you using, DCDC or LDO?&amp;nbsp;&lt;/li&gt;
&lt;/ul&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195051?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 08:50:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f69c3a0-bbdf-488e-a656-772fffda087d</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Finally I am able to enabled and disabled UART peripheral as below is this right way:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void disabled_uart(void) {
  uint32_t err_code = app_uart_close();
//  APP_ERROR_CHECK(err_code);
  NRF_UARTE0-&amp;gt;TASKS_STOPTX = 1;
  NRF_UARTE0-&amp;gt;TASKS_STOPRX = 1;
  NRF_UARTE0-&amp;gt;ENABLE = 0;
  /* Workaround by disabling the UART peripherals due to Nordic SDK15.0 issue */
  *(volatile uint32_t *)0x40002FFC = 0; /* Power down UARTE0 */
  *(volatile uint32_t *)0x40002FFC;     
  *(volatile uint32_t *)0x40002FFC = 1; /* Power on UARTE0 so it is ready for next time */
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For enabled UART call&amp;nbsp;uart_init(); function is this correct but it working.&lt;/p&gt;
&lt;p&gt;Now it will significantly improve battery life.&lt;/p&gt;
&lt;p&gt;Now we measure power consumption 37.74uA, but still this also high&amp;nbsp;because&amp;nbsp;data sheet mentioned 1uA to 10uA in sleep mode with RTC running.&lt;/p&gt;
&lt;p&gt;Can you give me suggestions for reduced this sleep mode consumption?&lt;/p&gt;
&lt;p&gt;Thank you so much for your great help and quick response...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/195002?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 06:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fd6cf10-ebca-4136-8223-ebb604c24cf1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;When using this workaround to power down the UARTE, you have to reconfigure and reinitialize UARTE when turning it on again (when waking up).&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/194999?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 06:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e1fefd4-436a-41bc-85fe-aa4e27b8ea0a</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Currently I want to use UARTE because to access direct RAM buffer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In our application I have interfaced external WiFi module to nRF52840 using UART One device goes into sleep mode then I have completely shut down Wi-FI module.&lt;/p&gt;
&lt;p&gt;But not able to ON UART module. Still getting same problem and it looks like somewhere strange for understanding.&lt;/p&gt;
&lt;p&gt;When i disabled UART module using my above snippet with workaround that time UART OFF But not ON when sensor device wake up.&lt;/p&gt;
&lt;p&gt;Here is below screen shot of current consumption&amp;nbsp;in sleep mode with UART disabled:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/870x600/__key/communityserver-discussions-components-files/4/PPK_5F00_1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Will you please provide suggestion for How I can enable UARTE when sensor wake up.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Normally what is the proper way to enable and disabled UART or UARTE in application using nRF52840 sdk v15.0.&lt;/p&gt;
&lt;p&gt;Thanks.......&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/194216?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2019 06:35:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:030258c1-7273-4f6a-8a74-95838b6d84a8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;The main difference between UART and UARTE is that UARTE implements EasyDMA. EasyDMA is an AHB bus master similar to CPU that&amp;#39;s connected to the AHB multilayer interconnect for direct access to Data RAM. You can read &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Feasydma.html&amp;amp;resultof=%22%65%61%73%79%64%6d%61%22%20"&gt;more on EasyDMA here&lt;/a&gt;. Also, &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30997/understand-uart-uarte-and-getting-it-to-work-with-ppi"&gt;this post&lt;/a&gt; by my colleague explains the UART(E) drivers very well and provides quite a few helpful links that you should read if you&amp;#39;re not certain on which peripheral to use (don&amp;#39;t mind the PPI implementation part, as the rest is what you&amp;#39;ll find useful).&lt;/p&gt;
&lt;p&gt;How exactly does the UART &amp;quot;hang&amp;quot; if you disable EasyDMA?&lt;/p&gt;
&lt;p&gt;From what I know about your application, it seems as if UART should do the job, but I can&amp;#39;t be sure as I haven&amp;#39;t seen your project. If you find out that you need any of the EasyDMA features, you will have to use the UARTE driver. If you can manage without it, the UART driver should be somewhat more energy efficient and will probably increase the battery lifetime somewhat.&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/194142?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 14:27:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b5378fc-3c26-439a-9480-1f65305311b9</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;Thanks for quick reply...&lt;/p&gt;
&lt;p&gt;I have tried to disabled this ESY_DMA in sdk_config.h, but my UART is not work properly sometime stuck and hang. When i revert the changes from sdk_config.h That time UART working properly.&lt;/p&gt;
&lt;p&gt;I read questions and answer reading UART and UARTE. and observed UARTE recommended.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Will you please tell me what is difference between them? Which UART i need to use in my project?&lt;/p&gt;
&lt;p&gt;We need to optimize current consumption asap because we need to finalized battery model with good life?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/194107?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 12:26:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:975f9030-2346-405e-846d-9d1caba9924c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;It seems we&amp;#39;ve missed something in your sdk_config.h file. Could you set UART_EASY_DMA_SUPPORT and UART0_CONFIG_USE_EASY_DMA to 0? I think &lt;span&gt;UART0_CONFIG_USE_EASY_DMA is the culprit here which sets EasyDMA as default.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/194072?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 11:15:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d3af02d-e24c-4f8f-aace-b2556068f2ed</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have&lt;span&gt;&amp;nbsp;&lt;/span&gt;commented&lt;span&gt;&amp;nbsp;&lt;/span&gt;the last half UARTE from my code.&lt;/p&gt;
&lt;p&gt;But still switched into&amp;nbsp;nrfx_uarte_uninit(&amp;amp;p_instance-&amp;gt;uarte) function please see below image:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2654.Capture.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I have checked in ble_app_uart example from SDK 15.3 version in this example also when i call to close UART it will switch into UARTE function not a UART function.&lt;/p&gt;
&lt;p&gt;I think is by default enabled UARTE because i have checked in freash downloaded SDK v15.3.&lt;/p&gt;
&lt;p&gt;Thanks....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193985?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2019 05:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ad8cbb3-84c0-4ffb-ba0e-bd1406586942</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;It&amp;#39;s very hard for me to guess where you have set UARTE enabled, but let&amp;#39;s start at the top. Does your main.c contain these defines at the top? If it does, could you remove the last half (UARTE_PRESENT) and include nrf_uarte.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if defined (UART_PRESENT)
#include &amp;quot;nrf_uart.h&amp;quot;
#endif
#if defined (UARTE_PRESENT)
#include &amp;quot;nrf_uarte.h&amp;quot;
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You could also check if this function still takes you to UARTE if you switch places on the two. If not, make sure to switch back to keep the function the same as the SDK.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;void nrf_drv_uart_uninit(nrf_drv_uart_t const * p_instance)
{
if (NRF_DRV_UART_USE_UART)
{
nrfx_uart_uninit(&amp;amp;p_instance-&amp;gt;uart);
}
else if (NRF_DRV_UART_USE_UARTE)
{
nrfx_uarte_uninit(&amp;amp;p_instance-&amp;gt;uarte);
}
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Simon&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193869?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2019 10:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84070f18-14a5-475c-b376-36821c5a3050</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I trying to find where exactly UARTE enabled but still not find. When I called app_uart_close();&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void nrf_drv_uart_uninit(nrf_drv_uart_t const * p_instance)
{
    if (NRF_DRV_UART_USE_UARTE)
    {
        nrfx_uarte_uninit(&amp;amp;p_instance-&amp;gt;uarte);
    }
    else if (NRF_DRV_UART_USE_UART)
    {
        nrfx_uart_uninit(&amp;amp;p_instance-&amp;gt;uart);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I set break point for both but in my project it will going to&amp;nbsp;nrfx_uarte_uninit(&amp;amp;p_instance-&amp;gt;uarte); not in second condition.&lt;/p&gt;
&lt;p&gt;I have also changed&amp;nbsp;&lt;span&gt;NRF_UART_BAUDRATE_115200 in my init function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Will you please suggest me how i can find where exactly UARTE enabled?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193615?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 10:36:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47d0915d-ab00-4e46-b30b-acba120cd95d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Seeing as the workaround still is required to disable the UART properly, you are enabling UARTE somewhere in your code. For instance, .baud_rate = NRF_UARTE_BAUDRATE_115200 should be .baud_rate = NRF_UART_BAUDRATE_115200. This could be the only one, but please go through your project and make sure there aren&amp;#39;t any other oversights.&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193599?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 09:11:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2bb77b9-0527-457d-abb4-cedd598fc88e</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have disabled&amp;nbsp;NRFX_UARTE_ENABLED 0&amp;nbsp; but got same problem. When I used below function for disabled UART consumption goes down:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void disabled_uart(void) {
//  uint32_t err_code = app_uart_close();
//  APP_ERROR_CHECK(err_code);
  NRF_UARTE0-&amp;gt;TASKS_STOPTX = 1;
  NRF_UARTE0-&amp;gt;TASKS_STOPRX = 1;
  NRF_UARTE0-&amp;gt;ENABLE = 0;
  /* Workaround by disabling the UART peripherals due to Nordic SDK15.0 issue */
  *(volatile uint32_t *)0x40002FFC = 0; /* Power down UARTE0 */
  *(volatile uint32_t *)0x40002FFC;     
  *(volatile uint32_t *)0x40002FFC = 1; /* Power on UARTE0 so it is ready for next time */
}

void Enable_Uart(void)
{
	
NRF_UARTE0-&amp;gt;ENABLE = 8; // also tried here set 1 but not enable UART
NRF_UART0-&amp;gt;TASKS_STARTTX = 1;
NRF_UART0-&amp;gt;TASKS_STARTRX = 1;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But this uart_enabled() function not working.&lt;/p&gt;
&lt;p&gt;here is my below uart_inti()&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void uart_init(void) {
  uint32_t err_code;
  app_uart_comm_params_t const comm_params =
  {
    .rx_pin_no = RX_PIN_NUMBER, //RX_PIN_NUMBER,
    .tx_pin_no = TX_PIN_NUMBER, //TX_PIN_NUMBER,
    .rts_pin_no = RTS_PIN_NUMBER,
    .cts_pin_no = CTS_PIN_NUMBER,
    .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
    .use_parity = false,
#if defined(UART_PRESENT)
    .baud_rate = NRF_UARTE_BAUDRATE_115200
#else
    .baud_rate = NRF_UARTE_BAUDRATE_115200
#endif
  };

  APP_UART_FIFO_INIT(&amp;amp;comm_params,
      UART_RX_BUF_SIZE,
      UART_TX_BUF_SIZE,
      uart_event_handle,
      APP_IRQ_PRIORITY_LOWEST,
      err_code);
  APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am getting very difficult to understand where exactly issue for enable and disabled UART properly.&lt;/p&gt;
&lt;p&gt;Thanks..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193577?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2019 08:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73283cbf-e146-46f5-ba5c-f97afb48c18e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;Could you try setting the UARTE_ENABLED define in your sdk_config.h file to 0? I don&amp;#39;t see why it should, but maybe it prevents the UART from closing properly. Overall, your config file looks good though.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you mind sharing how you initialize the UART as well?&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193492?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 16:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59843639-2899-45bd-9c6f-c06979492c5c</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/193447"]Also, could you check the return value of the app_uart_close() function? [/quote]
&lt;p&gt;Yes I have already checked and value is 0 means NRF_SUCCESS.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/193447"]after you close the UART. Have you tried commenting out that, [/quote]
&lt;p&gt;I was remove this but still nothing any change in power consumption.&lt;/p&gt;
&lt;p&gt;I have attached my project sdk_config.h file here.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0181.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../0181.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;here is my below updated functions:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void stop_adc() {
  nrf_drv_timer_disable(&amp;amp;m_timer);
  nrf_drv_timer_uninit(&amp;amp;m_timer);
  nrf_drv_ppi_channel_disable(m_ppi_channel);
  nrf_drv_ppi_uninit();
  NRF_SAADC-&amp;gt;TASKS_STOP = 1;
  nrf_drv_saadc_uninit();
}

void stop_ble() {
  uint32_t err_code;
    err_code = sd_ble_gap_adv_stop(m_conn_handle); // stop BLE advertising
    APP_ERROR_CHECK(err_code);
}

/**@brief Function for putting the chip into sleep mode.
 *
 * @note This function will not return.
 */
void sleep_mode_enter() {
  uint32_t err_code;
  NRF_LOG_INFO(&amp;quot;Sleep mode Enter&amp;quot;);
  flash_data_sending = false;
  start_measurement = false;
  if ((strcmp((char *)s_info.config_flag, &amp;quot;true&amp;quot;) == 0)) { /*Check if config mode enter and called sleep_mode_enter when server request status completed */
    nrf_gpio_pin_set(WIFI_PIN); /*ON WIFI module*/
  } else {
    nrf_gpio_pin_clear(WIFI_PIN); /*OFF WiFi module*/
  }
  nrf_gpio_pin_clear(SENSOR_PIN);  // OFF Sensor
  nrf_gpio_pin_set(GREEN_LED_PIN); // OFF Green LED
  nrf_gpio_pin_set(BLUE_LED_PIN);  // OFF BLUE LED
  stop_adc();
  err_code = app_uart_close();
  APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Let me know your suggestions?&lt;/p&gt;
&lt;p&gt;Thanks..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193447?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 13:17:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc9bb991-73e0-4778-ae1d-c43c84c76045</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;Sure, the config file might help, I&amp;#39;ll at least be able to look through it and make sure you haven&amp;#39;t missed anything. Would you like me to make the case private anyway? I see that in your original post you call &amp;quot;NRF_LOG_INFO(&amp;quot;UART close: %d&amp;quot;, err_code);&amp;quot; after you close the UART. Have you tried commenting out that, maybe that logger function uses the logging module and stops the UART from closing properly? Just a shot in the dark though.&lt;/p&gt;
&lt;p&gt;Also, could you check the return value of the app_uart_close() function? Does it return NRF_SUCCESS or something else?&amp;nbsp;&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193436?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 12:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72b6b9b7-56ff-4857-9aed-e568fccb1e4a</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have disabled NRF log module in sdk_config.h as below:&lt;/p&gt;
&lt;p&gt;#define NRF_LOG_ENABLED 0&lt;/p&gt;
&lt;p&gt;#define NRF_LOG_BACKEND_RTT_ENABLED 0&lt;/p&gt;
&lt;p&gt;But nothing any affect on sleep mode consumption. Sorry Simonr I am not able to share our main.c file to here I can share sdk_config.h&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is any other solution?&lt;/p&gt;
&lt;p&gt;Thanks for helping...!!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193177?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 12:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95d9b1a1-0be0-4d9e-8e3b-60c806b96655</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;Yes, of course, we had narrowed the issue down to the UART. Sorry about the oversight!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The UART might not be closing properly because the logging module is&amp;nbsp;using it when you call app_uart_close();. Could you make sure the logging module is not using UART when you close it?&lt;/p&gt;
&lt;p&gt;If this doesn&amp;#39;t help, I think the next step would be to upload your main.c and sdk_config.h file here, so I can have a look at what exactly is happening, as I&amp;#39;m having a hard time figuring it out without having a better overview. If you don&amp;#39;t want to share these files with the community, please tell me before you upload, and I will set this case to private so that only Nordic engineers will be able to see this post.&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: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193134?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 10:35:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65190a3b-fcda-4a82-b4cb-8a064e92e449</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I have check in my project sdk_config.h setting&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#define NRFX_UARTE_ENABLED 0&lt;/p&gt;
&lt;p&gt;#define NRFX_UART_ENABLED 1&lt;/p&gt;
&lt;p&gt;#define UART_ENABLED 1&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/45355/how-optimize-high-current-consumption-in-sleep-mode-using-nrf52840/193100"]do you at any point disable the radio?[/quote]
&lt;p&gt;Yes I have disabled radio by calling&amp;nbsp;&lt;span&gt;sd_ble_gap_adv_stop(). Radio is disabled no any issue. But problem getting of UART.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am still facing this issue. Should I need to migrate my project in SDK 15.3 Version? Any other solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks...&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How optimize high current consumption in sleep mode using nRF52840?</title><link>https://devzone.nordicsemi.com/thread/193100?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 09:08:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e55fd2c-478e-4c0f-ac88-77fb6c087670</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vishal&lt;/p&gt;
&lt;p&gt;Have you gone through your project to make sure that you&amp;#39;re only using UART and &lt;strong&gt;not UARTE?&amp;nbsp;&lt;/strong&gt;I still think you are mixing these two functions. Also, do you at any point disable the radio? This can be done by for example calling&amp;nbsp;&lt;span&gt;sd_ble_gap_adv_stop(). Have you tried this? Sorry if I&amp;#39;m getting some details wrong, but it&amp;#39;s been quite some time since the last time I looked at this case, so please tell me if I got something wrong.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>