<?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>Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/94576/linking-zephyr-logging-to-uart-powerdown</link><description>During the testing phase of my device I use the Zephyr (uart) logging module and the Zephyr shell module(CONFIG_SHELL_LOG_BACKEND=y). Shell is mostly disabled, and is enabled by placing a jumper. Because the device is battery powered the UART needs to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jan 2025 13:03:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/94576/linking-zephyr-logging-to-uart-powerdown" /><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/519300?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 13:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1f47f3d-fa6e-4640-8180-ad977e15054a</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;Thank you &lt;a href="https://devzone.nordicsemi.com/members/kme"&gt;Kenneth&lt;/a&gt;&amp;nbsp;this worked&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/519020?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2025 10:03:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efd9b8bc-4643-4249-aa2b-b83723696fd1</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Old case, but can you try something like:&lt;/p&gt;
&lt;p&gt;&amp;amp;uart0{&amp;nbsp;disable-rx;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/518836?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2025 12:07:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fa8c902-3354-4b25-b165-7677cf442269</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/kme"&gt;Kenneth&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Do you know if anything like this has been implemented for zephyr yet?&lt;/p&gt;
&lt;p&gt;We&amp;#39;re also looking for a way to disable UART in sleep when logs are not needed to save power.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/399731?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2022 14:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6570ed7-e9b1-47bc-b3a6-2c5a1416d58d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I made an internal jira to look into this for future. Sorry that I can&amp;#39;t do anything more. You may to contact the zephyr community also on this topic:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/introduction/index.html#resources"&gt;https://docs.zephyrproject.org/latest/introduction/index.html#resources&lt;/a&gt;&amp;nbsp;Nice if you updated the case if you find this is already possible.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/399573?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2022 08:24:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5c1c3ac-665b-4b90-a43e-3615185454c6</guid><dc:creator>allard.p</dc:creator><description>&lt;p&gt;It would be a nice feature for a next release.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t want to edit something in my nrf connect/zephyr repository, so I guess I need to copy shell_log_backend.c to my project, and then need to do some CMake magic to override the file? Could you provide an example on how to do this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/399506?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 16:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:444d90c2-382f-4715-818d-f5fcebd9736d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;I tried looking at the uart log backend, and I could not find that there is any good way to implement what you want. So I don&amp;#39;t see any other way than to for instance &amp;quot;hack&amp;quot; the log_backend_uart.c such that&amp;nbsp;you for instance do a resume&amp;nbsp;when entering char_out() and suspend before you return.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/399326?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2022 07:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68131a9e-03bd-4cdf-aa44-6be7c1c31405</guid><dc:creator>allard.p</dc:creator><description>&lt;p&gt;I&amp;#39;m using the latest stable release (NCS 2.1.2). If the system waits for all logs to leave the UART it would be handy to get a callback before the system decides to got to sleep, and when the system wakes up again. In these callbacks the UART would be enabled/disabled.&lt;/p&gt;
&lt;p&gt;I did try something like this in attempt four: registering two callbacks with &lt;span class="w"&gt;&lt;/span&gt;&lt;em&gt;&lt;span class="sig-name descname"&gt;&lt;span class="n"&gt;&lt;span class="pre"&gt;pm_notifier_register.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span class="sig-name descname"&gt;&lt;span class="n"&gt;&lt;span class="pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;But these callbacks never get called, does Nordic use a custom implementation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Linking Zephyr logging to UART powerdown</title><link>https://devzone.nordicsemi.com/thread/399287?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 22:03:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d1b420e-d3d7-49ac-9147-dfa1b10db293</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You are not stating which ncs version you are using, I think there may have been changes in the power management, and I was under the impression that the system should not go to sleep if there was any logs to process. However, if this is not handled, would checking&amp;nbsp;log_buffered_cnt() before trying to disable UART help?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>