<?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>High PSM current during queue mode with LwM2M Client sample</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92454/high-psm-current-during-queue-mode-with-lwm2m-client-sample</link><description>Hello there, 
 I am currently testing queue mode within the LwM2M example with the nrf9160. Now I have made some measurements with the PPK2. Thereby I was surprised that the floor current, while the client should be in PSM, is very high with about 400</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Jan 2024 14:42:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92454/high-psm-current-during-queue-mode-with-lwm2m-client-sample" /><item><title>RE: High PSM current during queue mode with LwM2M Client sample</title><link>https://devzone.nordicsemi.com/thread/465085?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 14:42:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6e4f385-b88e-4cf4-80c3-a8307c4d0de6</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;After some experimenting I have found code that works for me to deactivate UART in the first line of the main function.&lt;/p&gt;
&lt;p&gt;Maybe one of theses steps is redundant, but I set CONFIG_PM_DEVICE=y in an overlay&lt;/p&gt;
&lt;p&gt;and included &lt;/p&gt;
&lt;div style="background-color:#272822;color:#f8f8f2;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#f92672;"&gt;#include&lt;/span&gt;&lt;span style="color:#f8f8f2;"&gt; &lt;/span&gt;&lt;span style="color:#e6db74;"&gt;&amp;lt;zephyr/pm/device.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;at the top of the main file.&lt;/p&gt;
&lt;p&gt;I did these two things to make the new code work in SDK Version 2.4.2&lt;/p&gt;
&lt;p&gt;The new code is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;const struct device *uart0_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_shell_uart));
ret = pm_device_action_run(uart0_dev, 0);
if (ret &amp;lt; 0) {
    LOG_ERR(&amp;quot;Failed to disable UART (%d)&amp;quot;, ret);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You could probably write &lt;code&gt;PM_DEVICE_ACTION_SUSPEND&lt;/code&gt; instead of 0 in the pm_device_action_run() function.&lt;/p&gt;
&lt;p&gt;Hope this helps someone in the future.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am now getting short periods (~1 second) of 7 uA in between some long periods of ~530 uA during downtime. So there is still something sucking a lot of electricity, but at least we can see the potential minimum draw when idle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High PSM current during queue mode with LwM2M Client sample</title><link>https://devzone.nordicsemi.com/thread/464987?ContentTypeID=1</link><pubDate>Fri, 19 Jan 2024 09:56:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:094b402f-9252-4a83-a94d-ac748d2fbd27</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Stian&lt;/p&gt;
&lt;p&gt;We have pretty much the exact same situation, but on SDK Version 2.4.2.&lt;/p&gt;
&lt;p&gt;However, the solution code is deprecated and doesn&amp;#39;t work anymore. Could you please post the current code or any other option for completely disabling UART in the LWM2M Client sample? Maybe it is possible with CONFIG options now?&lt;/p&gt;
&lt;p&gt;Your help would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Alan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High PSM current during queue mode with LwM2M Client sample</title><link>https://devzone.nordicsemi.com/thread/389264?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 17:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eedd4df-a5f0-4e19-b157-5e9ba4edc85c</guid><dc:creator>Kurt Simon</dc:creator><description>&lt;p&gt;Hi Stian,&lt;/p&gt;
&lt;p&gt;thank you very much for your solution. I now&amp;nbsp;get about 2 uA in the PSM, which is great.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Kurt Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High PSM current during queue mode with LwM2M Client sample</title><link>https://devzone.nordicsemi.com/thread/389044?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 15:38:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa727ad3-ce99-4050-8c81-c4e6dae0b16f</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, I tested the example here and I get around 600 uA because UART0 is active.&lt;/p&gt;
&lt;p&gt;Add this to the beginning of&lt;code&gt; main()&lt;/code&gt; (after&lt;code&gt; LOG_INF(APP_BANNER);&lt;/code&gt; ):&lt;/p&gt;
&lt;p&gt;&lt;code&gt;const struct device *uart0_dev = device_get_binding(DT_LABEL(DT_CHOSEN(zephyr_console)));&lt;br /&gt;ret = pm_device_action_run(uart0_dev, PM_DEVICE_ACTION_SUSPEND);&lt;br /&gt;if (ret &amp;lt; 0) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOG_ERR(&amp;quot;Failed to disable UART (%d)&amp;quot;, ret);&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Include &amp;lt;pm/device.h&amp;gt; to &lt;strong&gt;main.c.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add &lt;code&gt;CONFIG_PM_DEVICE=y&lt;/code&gt; to &lt;strong&gt;prj.conf&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This will turn off UART0. If you need to use UART0 you must look into implementing the&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/drivers/uart_nrf_sw_lpuart.html"&gt; Lower power UART driver &lt;/a&gt;and use flow control.&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: High PSM current during queue mode with LwM2M Client sample</title><link>https://devzone.nordicsemi.com/thread/388743?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2022 11:00:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d5d020f-c070-4903-a7ca-d8bf3394b1b2</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, I will try to run the LWM2M sample here, and check if I see the same thing. My first thought is that this is caused by one of the UARTs being enabled. You can try to turn it off by using CONFIG_SERIAL=n in the prj.conf file, but that only works if the sample itself doesn&amp;#39;t use the UART actively (except for logging). I&amp;#39;m not so familiar with that sample so I can&amp;#39;t tell you right now, but I will test 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>