<?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>Zephyr related - how to disable (uart-) shell during runtime?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116209/zephyr-related---how-to-disable-uart--shell-during-runtime</link><description>Hi, 
 as i would like to use the uart shell for production purposes as well (e.g. setting the devices serial number) - how can i turn off the shell at runtime (in order to enter low power mode and measure the device&amp;#39;s current consumption)? As the shell</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Nov 2024 13:25:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116209/zephyr-related---how-to-disable-uart--shell-during-runtime" /><item><title>RE: Zephyr related - how to disable (uart-) shell during runtime?</title><link>https://devzone.nordicsemi.com/thread/509684?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 13:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45ac36d8-ae11-479d-b909-7dfcfb7f8dc7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Sorry,&amp;nbsp;I misread the function name and thought you were using the UARTE HAL to write to the UARTE-&amp;gt;ENABLE register.&amp;nbsp;&lt;span&gt;rx_disable -&amp;gt;&amp;nbsp;&lt;/span&gt;uarte_nrfx_rx_disable() will properly disable UART reception and cause the idle current to drop to around 20 uA. Note that&amp;nbsp;PM_DEVICE_ACTION_SUSPEND will also disable the peripheral, which should reduce the idle current further.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr related - how to disable (uart-) shell during runtime?</title><link>https://devzone.nordicsemi.com/thread/509682?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 13:12:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7269af1e-9d67-4c90-bca1-a92eb5ffcb08</guid><dc:creator>uknoblic</dc:creator><description>&lt;p&gt;Thank you Vidar, i was already using CONFIG_PM_DEVICE&amp;nbsp; / PM_DEVICE_ACTION_SUSPEND, but calling uart_rx_disable finaly solved this issue ;-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr related - how to disable (uart-) shell during runtime?</title><link>https://devzone.nordicsemi.com/thread/509681?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 13:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d3895cf-ff80-4e13-b2c5-1c866c777f35</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update. Calling rx_disable() is not always sufficient to ensure low power when using &amp;#39;nordic,nrf-uart&lt;strong&gt;e&amp;#39;&lt;/strong&gt;&amp;nbsp;(the HF clock request may not be released - ref.&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52840/page/uarte.html#ariaid-title8"&gt;Low power&lt;/a&gt;). A workaround can be to enable CONFIG_PM_DEVICE=y in your project configuration and run PM_DEVICE_ACTION_SUSPEND on the UART device after un-initializing the shell:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/4040aa0bf581206dd68beb0758b39096342ee7e0/drivers/serial/uart_nrfx_uarte.c#L1891"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/4040aa0bf581206dd68beb0758b39096342ee7e0/drivers/serial/uart_nrfx_uarte.c#L1891&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/101650/how-to-put-the-uart-to-sleep-low-power-mode/435323"&gt;RE: How to put the UART to sleep (low power mode)&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr related - how to disable (uart-) shell during runtime?</title><link>https://devzone.nordicsemi.com/thread/509664?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2024 11:43:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:681dff60-b5af-41a8-a63a-1b82b122fba1</guid><dc:creator>uknoblic</dc:creator><description>&lt;p&gt;Hi, i found the reason for this - if the ASYNC api is used, rx is not disabled when the uart instance is un-initialized (shell_uninit() -&amp;gt; instance_uninit() -&amp;gt; async_uninit() (which is empty)). Need to call rx_disable on the device manually to fully disable the shell.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>