<?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 do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76087/how-do-i-reduce-power-consumption-on-the-uart-interface</link><description>In one of my projects, UART interface is used for the communication of external sensors. During the power consumption test, I found that when 9160 enters the idle state, its average current is about 600uA. However, after I turn off UART, the average current</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jun 2021 13:28:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76087/how-do-i-reduce-power-consumption-on-the-uart-interface" /><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/316758?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 13:28:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74ee804b-2501-44ed-a6f3-9dc32c70aadf</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Have you solved the issue? If not could you upload your application as a zipped file and I can take a look at 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 do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/315990?ContentTypeID=1</link><pubDate>Fri, 18 Jun 2021 03:07:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52fc446b-96bb-4ca7-94b9-65996c1f0dd3</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;&lt;span class="transSent highlight"&gt;&lt;span&gt;In fact, I only set the value of one variable in the timer callback function and nothing more.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="transSent"&gt;&lt;span&gt; Later, I tried various operations and thought it was a system anomaly caused by the thread for some reason, because I found that everything was fine when the timer was sleeping the UART, but there was a problem waiting for me to wake the uart up again. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/315814?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2021 10:04:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4be756ad-4466-4207-bb64-b84fe5647a3a</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I would not recommend you to do much processing in timer interrupts. See this answer for more details:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/support-private/support/271094#permalink=669503"&gt;https://devzone.nordicsemi.com/support-private/support/271094#permalink=669503&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Instead you should offload it to a work queue (like done &lt;a href="https://github.com/too1/ncs-peripheral-uart-adc/blob/d575cdb9a2e0d7e5f0984a6a228bcb0d3a6f1a7c/src/main.c#L564"&gt;here&lt;/a&gt;) or offload it to another thread usin k_sem_give()/k_sem_take().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/315739?ContentTypeID=1</link><pubDate>Thu, 17 Jun 2021 05:41:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:367b1015-7693-4b2d-ae03-aa37a1a7fb9c</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;&lt;span&gt;Now, i can confirm that it wasn&amp;#39;t the&amp;nbsp;log that caused the crash, it was the timer I used to make the UART sleep automatically, but strangely enough, if I hadn&amp;#39;t set sleep in the timer timeout callback, this problem wouldn&amp;#39;t have occurred, which is very strange! &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/315500?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 02:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd8b0507-9074-4c46-bcc4-5cbae686ea90</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;&lt;span&gt;Maybe it has something to do with Log sending, because after I shut down all the logs, this problem doesn&amp;#39;t seem to appear again, but I found a new problem, that is, if I use the timer to automatically hibernate the UART, and then press the button to wake up the UART, it will still enter the crash state, why? &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/315499?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 02:56:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c525215f-901d-4285-bd90-4cae3f3c05b9</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;Yes,&amp;nbsp;&lt;span&gt;I did send some&amp;nbsp;log information to the PC, not via uart, but set up&amp;nbsp;rtt to use&amp;nbsp;swd interface.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/314976?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 16:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fad2ff7b-88a7-4b38-938c-a017c719b98f</guid><dc:creator>Simon</dc:creator><description>[quote user="duxinglang"]I executed several keystrokes[/quote]
&lt;p&gt;&amp;nbsp;What do you mean by this? Are you trying to send data from the computer to the device over UART while it&amp;#39;s disabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/314428?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 10:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2ca77ce-2cda-4c6c-94db-065004d4b2aa</guid><dc:creator>duxinglang</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried to call a function to let the uart enter sleep and wake up to reduce the power consumption, but I found that when my uart entered the state of low power consumption, I executed several keystrokes and the system crashed. Why? &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is my code:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void uart_sleep_out(void)
{
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
	int err;

	err = device_set_power_state(uart_ble, DEVICE_PM_ACTIVE_STATE, NULL, NULL);
	if(err)
		LOG_INF(&amp;quot;uart set active fail!\n&amp;quot;);
	else
		LOG_INF(&amp;quot;uart set active success!\n&amp;quot;);
#endif
}

void uart_sleep_in(void)
{
#ifdef CONFIG_DEVICE_POWER_MANAGEMENT
	int err;

	err = device_set_power_state(uart_ble, DEVICE_PM_SUSPEND_STATE, NULL, NULL);
	if(err)
		LOG_INF(&amp;quot;uart set low power fail!\n&amp;quot;);
	else
		LOG_INF(&amp;quot;uart set low power success!\n&amp;quot;);
#endif
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/314153?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 09:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b671458e-650f-493c-9c0f-f141932ba769</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The link provided by Adeel is a useful one, take a look at that. The reason UART uses that much power is&amp;nbsp;because the RX pin is constantly on (don&amp;#39;t know when the connected device will send data), which needs the HF-clock. The HF-clock uses about 500uA-1mA. If you don&amp;#39;t need the RX pin (e.g. only using uart for logging) you can simply disable it like explained here:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64532/nrf52840-peripheral_uart-low-power-ncs-1-3-0/279199#279199"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/64532/nrf52840-peripheral_uart-low-power-ncs-1-3-0/279199#279199&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another option is to use the &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/7d87b16d43a10f37fa30d25be7911f499b96342f/drivers/serial"&gt;low power uart driver&lt;/a&gt;, which will make the slave send a signal to a pin before transmitting and RX can be turned off while not in use. Check out the &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.5.1/samples/peripheral/lpuart"&gt;Low Power UART sample&lt;/a&gt;, which demonstrate how to use this driver.&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 do I reduce power consumption on the UART interface</title><link>https://devzone.nordicsemi.com/thread/313902?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 11:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c942a7a-df02-4c7a-b600-c656ef11640d</guid><dc:creator>Adeel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This thread could help :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/69534/thingy91-power-consumption"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/69534/thingy91-power-consumption&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can turn off and turn on the uart during run time and conserve power.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Adeel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>