<?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 about LPUART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93821/power-consumption-about-lpuart</link><description>Hi, 
 I found a topic that discuss the LPUART power consumption. 
 
 In this discussion, it is mentioned that the power consumption of LPUART was introduce by GPIOTE IN, which is about 10~20uA. 
 From the old nRF SDK, we can set the hi_accuracy to false</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Nov 2022 09:41:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93821/power-consumption-about-lpuart" /><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/397344?ContentTypeID=1</link><pubDate>Thu, 24 Nov 2022 09:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:239fdda2-85cb-44d9-a505-39f823679d3d</guid><dc:creator>hogen</dc:creator><description>&lt;p&gt;Hi Stian,&lt;/p&gt;
&lt;p&gt;Add &lt;strong&gt;CONFIG_UART_0_NRF_ASYNC_LOW_POWER=y&amp;nbsp;&lt;/strong&gt;fixed my problem.Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/397266?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 17:26:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b50bdf0-e4ce-4cf1-9063-3f6520dbc6d9</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, I think I know what the problem is. I was testing this on a nRF52840 DK, and the 840 is configured to use UART1, while the nRF52832 is using UART0. The &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/peripheral/lpuart/prj.conf"&gt;prj.conf&lt;/a&gt; file sets only UART1 to low power, but that will not take effect on the nRF52832, since it is using UART0. This should have been fixed in the &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/peripheral/lpuart/boards/nrf52dk_nrf52832.conf"&gt;boards/nrf52dk_nrf52832.conf&lt;/a&gt; file, but it&amp;#39;s missing &lt;strong&gt;CONFIG_UART_0_NRF_ASYNC_LOW_POWER=y&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Try to add this config and see if that fixes the issue. I tested this now on a PCA10040, and I get 2.7 uA during idle:&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/1854.pastedimage1669224485950v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Otherwise, your measurement setup looks good now, and the system off code verifies that the PPK is showing the right current.&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;I also tested on a nRF91 DK, and this is already configured correctly, since it is using UART1. I think the best way to measure on a nRF91 DK is to use the PPK in source meter mode, and set the voltage output to 3.3V or higher (up to 5V). The connections should look as described in this &lt;a href="https://devzone.nordicsemi.com/guides/cellular-iot-guides/b/hardware-design/posts/getting-started-with-current-measurements-on-the-nrf9160"&gt;guide&lt;/a&gt;, under the SMU mode section.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Stian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/396405?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 12:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e246d7f3-0621-4356-88ea-418d74a49dc6</guid><dc:creator>hogen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your clarification. I have change the USB to battery supply, and using&amp;nbsp;&lt;span&gt;ampere meter mode to measure the current.&amp;nbsp;&lt;/span&gt;&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/pastedimage1668773612720v1.png" alt=" " /&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/pastedimage1668775283713v10.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;When I&amp;nbsp;add&amp;nbsp;&lt;span&gt;NRF_POWER-&amp;gt;SYSTEMOFF = 1 to the beginning&amp;nbsp;of main, the average current is 0.57uA.&lt;/span&gt;&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/pastedimage1668774443181v5.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;When I remove&amp;nbsp;&lt;span&gt;NRF_POWER-&amp;gt;SYSTEMOFF = 1 in&lt;/span&gt; LPUART, the&amp;nbsp;idle current is 11.58uA.&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/pastedimage1668775266364v9.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I also do test on 9160dk, t&lt;span&gt;he result is similar.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It looks like that&amp;nbsp;&lt;span&gt;GPIO PORT event in my project doesn&amp;#39;t take effect. Can you share the zephyr.dts in \build_nrf52dk_nrf52832\zephyr directory, and&amp;nbsp;which commit id are you testing based on?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1668775038327v7.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hogen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/396347?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 08:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4faceabf-0f12-4042-8930-8ce479e437a0</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, here is a screenshot of the unmodified example running on&amp;nbsp; a DK:&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/6864.pastedimage1668760185689v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I think there must be something wrong with your measurement setup. Can you please describe how you connect the PPK?&lt;/p&gt;
&lt;p&gt;The nRF52832 DK&amp;nbsp; can be a bit tricky to set up correctly for current measurements. The problem is that if you use the PPK in ampere meter mode and measure the current through the P22 header, there will be noise from the USB and regulators on the DK, giving you an additional current of about 10-20 uA. The workaround is to unplug the USB cable and power the DK from a battery or a stable voltage supply on P21 at 3V.&lt;/p&gt;
&lt;p&gt;Alternatively, you can use the PPK in source meter mode, connecting VOUT to P22 (the pin closest to the debug out header), and GND to GND. Leaving the USB cable connected. The problem with this setup is that the voltage output from the PPK has to match VDD on the DK exactly, which is around 2.7V. Otherwise there will be leakage through the SWD and/or the nRESET lines back to the debugging chip which is powered from VDD.&lt;/p&gt;
&lt;p&gt;To test the measurement setup you can put the chip to system off mode.&lt;/p&gt;
&lt;p&gt;Just add NRF_POWER-&amp;gt;SYSTEMOFF = 1; to the beginning of main. You should now see around 0.3 uA. (in system off it is important to measure over several seconds, and use the average current over this whole period in order to get the correct current, since there will be spikes every ~500ms which are part of the system OFF current.)&lt;/p&gt;
&lt;p&gt;EDIT:&lt;br /&gt;&lt;br /&gt;You can check out&lt;a href="https://devzone.nordicsemi.com/guides/cellular-iot-guides/b/hardware-design/posts/getting-started-with-current-measurements-on-the-nrf9160"&gt; this guide&lt;/a&gt; written for the nRF91 on how to use either Source meter mode, or ampere meter mode. It should be similar for the nRF52832 DK, except that the voltage in source meter mode should be set to 2.7V&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/396341?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 08:02:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b68bec06-b618-4d2f-a410-1856d567da47</guid><dc:creator>hogen</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi, Thanks for your help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have re-tested based on NCSV2.1.2 today, on nrf52DK_52832 hardware.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668757421174v1.png"&gt;/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668757421174v1.png&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My steps are as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Shorted TX (Pin 23) and RX (PIN 22) and req-pin (pin 24) and rdy-pin (pin 25) according to the README, and lte the demo do a loopback test.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.&amp;nbsp; I test the current without modifying the code, and found the average current is about 31uA. The demo sends data every 500+100 milliseconds. From the power consumption&amp;nbsp;pulse diagram of PPK2, it looks like match the demo.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1668757516714v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Then I enable RTT log output. I found the data send every 600ms. It looks like the code is working fine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_LOG=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_CONSOLE=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_USE_SEGGER_RTT=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;CONFIG_UART_CONSOLE=n&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1668757652973v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4. I change the tx data interval from 500ms to 10second. The average current is&amp;nbsp;drop to 21.63uA.&amp;nbsp;&amp;nbsp;I selected the time between the two sending data, it seems that the idle state current seems to be 20.46uA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;static void async(const struct device *lpuart)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;hellip;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; err = uart_tx(lpuart, txbuf, sizeof(txbuf), 10000);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __ASSERT(err == 0, &amp;quot;Failed to initiate transmission&amp;quot;);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k_sleep(K_MSEC(10000));&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uart_poll_out(lpuart, txbuf[0]);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; k_sleep(K_MSEC(100));&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1668757770190v4.png" alt=" " /&gt;&lt;/span&gt;&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/pastedimage1668757863479v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Do you test on nrf52dk_nrf52832?&amp;nbsp; The 3uA current you tested is very small, can you share a screenshot of your current pulse graph?&lt;/p&gt;
&lt;p&gt;Best regard,&lt;/p&gt;
&lt;p&gt;Hogen&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: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/396291?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2022 16:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:845fa6fd-ecbf-430b-8743-ce79e07f88e2</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, I checked the current consumption on the nrf/sample/peripheral/lpuart sample, and seems like PORT event has already been implemented in the LPUART driver as default. The sample will draw about 3 uA in idle without any modifications.&lt;/p&gt;
&lt;p&gt;Which SDK version are you using? I tested this on NCS 2.1.1&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Stian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/396186?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2022 11:59:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b4a5245-3a40-4d86-866e-c194861956ff</guid><dc:creator>hogen</dc:creator><description>&lt;p&gt;Hi, thanks for your suggestion.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I found it failed to send data after I added&amp;nbsp;&lt;span&gt;sense-edge-mask&amp;nbsp;&lt;/span&gt;to the overload file. I test this on nrf/samples/peripheral/lpuart project. In addition, there power consumption is not change (20uA) after add the &lt;span&gt;sense-edge-mask&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;00&amp;gt; [00:00:09.350,646] &amp;lt;err&amp;gt; app: Tx abortedit&lt;br /&gt;00&amp;gt; [00:00:11.350,860] &amp;lt;err&amp;gt; app: Tx aborted&lt;br /&gt;00&amp;gt; [00:00:13.351,074] &amp;lt;err&amp;gt; app: Tx aborted&lt;br /&gt;00&amp;gt; [00:00:15.351,287] &amp;lt;err&amp;gt; app: Tx aborted&lt;br /&gt;00&amp;gt; [00:00:17.351,501] &amp;lt;err&amp;gt; app: Tx aborted&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nrf52dk_nrf52832.overlay file:&lt;/p&gt;
&lt;p&gt;-------------&lt;/p&gt;
&lt;p&gt;&amp;amp;uart0 {&lt;br /&gt; rx-pin = &amp;lt;22&amp;gt;;&lt;br /&gt; tx-pin = &amp;lt;23&amp;gt;;&lt;br /&gt; /delete-property/ rts-pin;&lt;br /&gt; /delete-property/ cts-pin;&lt;br /&gt; compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;&lt;/p&gt;
&lt;p&gt;lpuart: nrf-sw-lpuart {&lt;br /&gt; compatible = &amp;quot;nordic,nrf-sw-lpuart&amp;quot;;&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; label = &amp;quot;LPUART&amp;quot;;&lt;br /&gt; req-pin = &amp;lt;24&amp;gt;;&lt;br /&gt; rdy-pin = &amp;lt;25&amp;gt;;&lt;br /&gt; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;amp;gpio0 {&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt; sense-edge-mask = &amp;lt;((1 &amp;lt;&amp;lt; 22) | (1 &amp;lt;&amp;lt; 25))&amp;gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;};&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;amp;gpiote {&lt;br /&gt; interrupts = &amp;lt;6 NRF_DEFAULT_IRQ_PRIORITY&amp;gt;;&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power consumption about LPUART</title><link>https://devzone.nordicsemi.com/thread/396016?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 14:22:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3c3fc98-9179-4979-ba38-911ca690f05f</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, you can configure the pins to use the PORT event instead of the IN event in NCS as well. This is done through the devicetree and the sense-edge-mask property&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/gpio/nordic,nrf-gpio.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/gpio/nordic,nrf-gpio.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As an example you can configure pins 29 and 30 to use the PORT event in the following way, using an .overlay file:&lt;/p&gt;
&lt;pre&gt;&amp;amp;gpio0 {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sense-edge-mask = &amp;lt;((1 &amp;lt;&amp;lt; 29) | (1 &amp;lt;&amp;lt; 30))&amp;gt;;&lt;br /&gt;};&lt;/pre&gt;
&lt;p&gt;If this is also applicable to the LPUART driver I will have to check, but I assume it is. Will test here and get back to you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Stian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>