<?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>Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19284/turn-off-uart-on-nrf52832</link><description>I noticed that having the UART enabled on my application in a NRF52 (SD132, SDK 11.0.0) takes a lot of current consumption. If I completely disable any UART support on my application the current consumption drops dramatically. I can&amp;#39;t do that, but considering</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Apr 2017 08:24:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19284/turn-off-uart-on-nrf52832" /><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74746?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 08:24:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42ba140e-8644-4aea-95b2-ef5769a01dff</guid><dc:creator>genis</dc:creator><description>&lt;p&gt;I couldn&amp;#39;t replicate the problem with a minimal example but I finally found out the solution. On the project I work in we add a timestamp to any message we log through  the UART. And we calculate that timestamp in seconds using floating point operations. The issue was related to the one in &lt;a href="https://devzone.nordicsemi.com/question/87838/high-power-consumption-when-using-fpu/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;, as I didn&amp;#39;t clear the FPU interrupt flags.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74745?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 14:53:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96c39eaf-e333-4923-9dc4-d05e6a9474e1</guid><dc:creator>genis</dc:creator><description>&lt;p&gt;Sure thing, I&amp;#39;ll send some sample code but it&amp;#39;ll take some time as some other stuff is more urgent. Thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74744?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 14:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:290771b5-cc81-4e4f-9f7b-19f2a4e0923f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;UART should not take more than 55uA current, I would like to see this problem at my desk, so it would be nice if you can reproduce it and give me sample code to test. I could then assist you much faster.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74743?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 10:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:496c468b-01a0-437d-906d-df44710511fa</guid><dc:creator>genis</dc:creator><description>&lt;p&gt;Hello Aryan, now I enable and disable the UART every single time I need to write something in it so I only do the __WFI() on the idle task. Still, I see the same behaviour. We&amp;#39;re talking of about 700uA to 170uA when I completely disable any UART. Though I do not discard a mistake in the code, it looks like when the UART is disabled some hardware is still draining current. I&amp;#39;ll try to make a simpler code sample to reproduce that. Also, the cpu is waken every 500ms by and also by the BLE hardware which advertises.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74742?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 19:29:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92efe570-3179-407c-a4dd-4f2f6e0e20fc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;that depends on how much your system is sleeping which totally depends on your application. How much current difference  are you observing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74741?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 16:53:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cef0da1-3277-458d-9920-5f952e617c96</guid><dc:creator>genis</dc:creator><description>&lt;p&gt;Sorry for the late response. That actually disables and reenables the UART but I still see a lot of current consumption that I don&amp;#39;t see if I totally disable the UART. I use the UART through app_uart_fifo.c library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Turn off UART on nrf52832</title><link>https://devzone.nordicsemi.com/thread/74740?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 09:19:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57cc1aba-eaf2-4349-83a5-5b78ba1385db</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You are mixing up using UART driver and accessing registers directly. This will cause the unpredictable behavior you are seeing now. I recommend you to uninit UART and init again using the driver.  Since you said that it will 99% in idle the overhead for uninit and init everytime it wakes up is negligible.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/* FreeRTOS application idle hook */
void vApplicationIdleHook(void) {   
    // Disable UART transmission and reception
    bool uart_disabled = false;
    if (!nrf_drv_uart_tx_in_progress()) {
        nrf_drv_uart_uninit(uart_instance);
        uart_disabled = true;
    }

    __WFI();

    if (uart_disabled) {
        nrf_drv_uart_init(xxx);
   }    
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I think the reason that writing directly to ENABLE not working is because the pins are still configured to be connected to UART . Anyways, let the driver take care of this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>