<?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>On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124740/on-demand-start-of-uart-shell-and-dynamic-pin-control</link><description>Hi! We have three different uart applications (two for production use, and the uart shell backend) and three different hardware output paths, but nRF52840 features just two uart controllers. So we would like to be able to pick any two out of the three</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Oct 2025 10:03:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124740/on-demand-start-of-uart-shell-and-dynamic-pin-control" /><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/551914?ContentTypeID=1</link><pubDate>Mon, 20 Oct 2025 10:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27aa97ba-f676-472d-a71a-c2d4beb5561d</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Yes, confirming that adding a delay resolves the problem!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/551476?ContentTypeID=1</link><pubDate>Tue, 14 Oct 2025 15:29:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36386653-5271-43ee-989f-85bdc1a35336</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. So I think the problem is that uart0 is suspended immediately after the uart_rx_disable() call before the RXTO event (mentioned here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/d141a610109b40133b0d0c549a67273e866c8f7f/drivers/serial/uart_nrfx_uarte.c#L1034"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/d141a610109b40133b0d0c549a67273e866c8f7f/drivers/serial/uart_nrfx_uarte.c#L1034&lt;/a&gt;) is triggered. As a result, the&amp;nbsp;&amp;nbsp;async_rx-&amp;gt;discard_fifo flag remains &amp;#39;true&amp;#39; .&lt;/p&gt;
&lt;p&gt;Please add a delay (k_msleep() or k_busy_wait() after the disable call to see if that helps.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/551402?ContentTypeID=1</link><pubDate>Tue, 14 Oct 2025 10:35:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14565969-7951-4835-bc88-3e88efdb9fc2</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Yes, it works after commenting out that line. (I.e., no crash happens when running the PinWiring_Test() and I can interact with the uart shell afterwards.)&lt;br /&gt;&lt;br /&gt;I guess I should clarify that we are on zephyr 3.7.99.0, namely 0bc3393fb11 .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/551383?ContentTypeID=1</link><pubDate>Tue, 14 Oct 2025 09:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:162dda3c-eb59-437b-b472-7a8d0e6abfcd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please try to comment this return at this line&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/37b9a01aa8037dc373465760ee3c64cba2179318/drivers/serial/uart_nrfx_uarte.c#L1956"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/37b9a01aa8037dc373465760ee3c64cba2179318/drivers/serial/uart_nrfx_uarte.c#L1956&lt;/a&gt;&amp;nbsp;and see if it works then. This isn&amp;#39;t a solution or workaround, but it would help us understand whether the only remaining problem is that the shell backend fails to re-enable reception.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/551120?ContentTypeID=1</link><pubDate>Fri, 10 Oct 2025 12:16:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de0b7486-f516-40f5-8d83-61538f578a93</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Thanks for pointers Vidar!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am afraid I am still missing something.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I have reduced the code to a one function that just tries to uninitialize the shell, stop and resume the device, and reinitialize it again:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void PinWiring_Test() {
    // ### Uninitialize the shell
    {
        // uninitialize the shell
        int err;
        const struct shell *sh = NULL;

        LogS(&amp;quot;Uninitializing shell...\n&amp;quot;);

        sh = shell_backend_uart_get_ptr();
        shell_uninit(sh, shell_uninit_cb);

        k_sleep(K_MSEC(500));

        //disable uart rx
        err = uart_rx_disable(uart0.device);
        if (err != 0) {
            LogS(&amp;quot;Failed to disable UART RX: %d\n&amp;quot;, err);
        }
    }

    // ### Suspend uart0
    {
        int ret = pm_device_action_run(uart0.device, PM_DEVICE_ACTION_SUSPEND);
        if (ret != 0) {
            LogS(&amp;quot;Failed to suspend device: %d\n&amp;quot;, ret);
        }
        LogS(&amp;quot;Suspended device %s\n&amp;quot;, uart0.name);
    }
    // ### Resume uart0
    {
        int ret = pm_device_action_run(uart0.device, PM_DEVICE_ACTION_RESUME);
        if (ret != 0) {
            LogS(&amp;quot;Failed to resume device: %d\n&amp;quot;, ret);
        }
        LogS(&amp;quot;Resumed device %s\n&amp;quot;, uart0.name);
    }
    // ### (Re)start the shell
    {
        int ret;
        const struct shell *sh = NULL;

        sh = shell_backend_uart_get_ptr();

        if (!sh) {
            LogS(&amp;quot;Shell backend not found\n&amp;quot;);
            return -ENODEV;
        }

        LogS(&amp;quot;A\n&amp;quot;);

        // (Re)initialize the shell
        bool log_backend = CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL &amp;gt; 0;
        uint32_t level = (CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL &amp;gt; LOG_LEVEL_DBG) ? CONFIG_LOG_MAX_LEVEL : CONFIG_SHELL_BACKEND_SERIAL_LOG_LEVEL;
        k_sleep(K_MSEC(500));

        // ### I am getting the error inside this call:
        ret = shell_init(sh, uart0.device, sh-&amp;gt;ctx-&amp;gt;cfg.flags, log_backend, level);
        if (ret &amp;lt; 0) {
            LogS(&amp;quot;Shell init failed: %d\n&amp;quot;, ret);
            return ret;
        }

        LogS(&amp;quot;A1\n&amp;quot;);

        // Start the shell
        ret = shell_start(sh);
        if (ret &amp;lt; 0) {
            LogS(&amp;quot;Shell start failed: %d\n&amp;quot;, ret);
            return ret;
        }
        LogS(&amp;quot;A2\n&amp;quot;);

        // init our custom commands
        InitShell();
    }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;But this fails with Busy when the shell tries to uart_rx_enable again.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;fatal_error: Resetting system
async RX enable: 0
Uninitializing shell...
Shell uninitialized with result: 0
Suspended device uart0
Resumed device uart0
A
async RX enable: -16
ASSERTION FAIL @ WEST_TOPDIR/zephyr/subsys/shell/backends/shell_uart.c:261 
os: r0/a1:  0x00000004  r1/a2:  0x00000105  r2/a3:  0x20012048
os: r3/a4:  0x00000004 r12/ip:  0x2000f580 r14/lr:  0x0004d929
os:  xpsr:  0x01000000
os: r4/v1:  0xfffffff0  r5/v2:  0x00082468  r6/v3:  0x20014745
os: r7/v4:  0x00000001  r8/v5:  0x00082468  r9/v6:  0x0000030c
os: r10/v7: 0x00000000  r11/v8: 0x00000000    psp:  0x200376e8
os: EXC_RETURN: 0x0
os: Faulting instruction address (r15/pc): 0x00078290
os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
os: Current thread: 0x20012048 (main)
===== PANIC ==
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I.e., calling shell_init goes into shell_uart.c, function async_init. There it calls uart_rx_enable which returns -16 (busy) then (inside the async_init) assert (err == 0) is encountered.&lt;br /&gt;&lt;br /&gt;When trying to trace uart_rx_enable, I got thoroughly lost.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550999?ContentTypeID=1</link><pubDate>Thu, 09 Oct 2025 11:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e5f8a95-a077-4426-ab57-a002dc121758</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;After reading your problem description again and reviewing the implementation a bit more, I understand the problem better, but I&amp;#39;m&amp;nbsp;not sure I see a clean solution to this.&amp;nbsp;As you pointed out, the shell uart backend is initilized on startup regardless of the&amp;nbsp;&lt;span&gt;CONFIG_SHELL_AUTOSTART setting. This means the UART receiver will already be enabled when you reach main().&amp;nbsp;You could try to re-initialize he shell backend as done in this sample:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/29feb191e381db3f73eb2443f0bec047837d5086/samples/subsys/shell/shell_module/src/uart_reinit.c#L11"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/29feb191e381db3f73eb2443f0bec047837d5086/samples/subsys/shell/shell_module/src/uart_reinit.c#L11&lt;/a&gt;&amp;nbsp;to see if this enables you to properly re-enable the receiver.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550778?ContentTypeID=1</link><pubDate>Tue, 07 Oct 2025 08:38:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa20fdeb-e484-4095-8b09-ec3e8944b771</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;I think I would need to reproduce this on my end to understand why it&amp;#39;s failing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Well, the code is public. You can see it at &lt;a id="" href="https://bit.ly/4n33Vd6"&gt;https://bit.ly/4n33Vd6&lt;/a&gt;&amp;nbsp;. (The indirection is for privacy reasons, since we usually discuss future products on these forums.)&lt;br /&gt;&lt;br /&gt;The relevant files are device/src/{main.c,pin_wiring.c}.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;gt;&amp;nbsp;But do you need the ability to change the pinout more than once after reset?&lt;br /&gt;&lt;br /&gt;No.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;But I think we would like to do so a bit later during boot, somewhere in the main function.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Maybe the question is just whether changing the pinctrl without suspending the devices is actually dangerous in our situation. I.e., the shell has claimed the uart, but with `CONFIG_SHELL_AUTOSTART=n` technically shouldn&amp;#39;t be actually used at the time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550760?ContentTypeID=1</link><pubDate>Tue, 07 Oct 2025 06:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ede359cc-44b5-47c5-ae7c-5dd365a24ac5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think I would need to reproduce this on my end to understand why it&amp;#39;s failing. But do you need the ability to change the pinout more than once after reset? If not, the approach used in the dynamic pin control sample (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/zephyr/samples/boards/nordic/dynamic_pinctrl/README.html"&gt;https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/zephyr/samples/boards/nordic/dynamic_pinctrl/README.html&lt;/a&gt;)&amp;nbsp;will likely be better suited for you app.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550724?ContentTypeID=1</link><pubDate>Mon, 06 Oct 2025 14:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:609690b3-7a1f-459d-aa72-aae109ebae27</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Ah, right. I was calling uart_irq_rx_disable, but not uart_rx_disable &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f926.svg" title="Face palm"&gt;&amp;#x1f926;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Well. When I call the&amp;nbsp;uart_rx_disable, it returns -14, but indeed, the suspend doesn&amp;#39;t fail anymore.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;But:&lt;br /&gt;- If I suspend, call pinctrls, resume; then the resumes crash with various errors, all related to the drivers not being initialized.&lt;br /&gt;- If I suspend, call pinctrls, initialize the drivers, then call resume; then the devices remain dead.&lt;br /&gt;- If I suspend, call pinctrls, initialize the drivers; then the devices remain dead.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If I don&amp;#39;t suspend or resume the devices at all then everything seems to work fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550713?ContentTypeID=1</link><pubDate>Mon, 06 Oct 2025 13:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2d13852-4bf9-4447-9f1e-d5f26c180ffe</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;So as you pointed out, the assert is raised because UART reception is enabled while you try to suspend the driver.&amp;nbsp;&lt;/p&gt;
[quote user="kat829"]I am not explicitly enabling uart anywhere before this call site (not that I know of anyways).[/quote]
&lt;p&gt;It is enabled by the shell. Is the shell initialized at this point and have you tried calling&amp;nbsp;uart_rx_disable() first?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550665?ContentTypeID=1</link><pubDate>Mon, 06 Oct 2025 09:28:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64ea9df8-731c-4b66-b16b-eaa2f0afa08a</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Crashlog is here&lt;/p&gt;
&lt;p&gt;```&lt;br /&gt;ASSERTION FAIL @ WEST_TOPDIR/zephyr/drivers/serial/uart_nrfx_uarte.c:2124&lt;br /&gt;[00:00:07.173,767] &amp;lt;err&amp;gt; os: r0/a1:&amp;nbsp; 0x00000004&amp;nbsp; r1/a2:&amp;nbsp; 0x0000084c&amp;nbsp; r2/a3:&amp;nbsp; 0x20012030&lt;br /&gt;[00:00:07.173,797] &amp;lt;err&amp;gt; os: r3/a4:&amp;nbsp; 0x00000004 r12/ip:&amp;nbsp; 0x2000f568 r14/lr:&amp;nbsp; 0x00066dcf&lt;br /&gt;[00:00:07.173,797] &amp;lt;err&amp;gt; os:&amp;nbsp; xpsr:&amp;nbsp; 0x01000000&lt;br /&gt;[00:00:07.173,828] &amp;lt;err&amp;gt; os: r4/v1:&amp;nbsp; 0x40002000&amp;nbsp; r5/v2:&amp;nbsp; 0x000823fc&amp;nbsp; r6/v3:&amp;nbsp; 0x00088308&lt;br /&gt;[00:00:07.173,858] &amp;lt;err&amp;gt; os: r7/v4:&amp;nbsp; 0x20002f70&amp;nbsp; r8/v5:&amp;nbsp; 0x00000000&amp;nbsp; r9/v6:&amp;nbsp; 0x00000000&lt;br /&gt;[00:00:07.173,858] &amp;lt;err&amp;gt; os: r10/v7: 0x00000000&amp;nbsp; r11/v8: 0x00000000&amp;nbsp; &amp;nbsp; psp:&amp;nbsp; 0x200376b8&lt;br /&gt;[00:00:07.173,889] &amp;lt;err&amp;gt; os: EXC_RETURN: 0x0&lt;br /&gt;[00:00:07.173,889] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x000781e0&lt;br /&gt;[00:00:07.173,919] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0&lt;br /&gt;[00:00:07.173,980] &amp;lt;err&amp;gt; os: Current thread: 0x20012030 (main)&lt;br /&gt;```&lt;br /&gt;&lt;br /&gt;Or:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;```&lt;br /&gt;static void uarte_pm_suspend(const struct device *dev)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; NRF_UARTE_Type *uarte = get_uarte_instance(dev);&lt;br /&gt;&amp;nbsp; &amp;nbsp; const struct uarte_nrfx_config *cfg = dev-&amp;gt;config;&lt;br /&gt;&amp;nbsp; &amp;nbsp; struct uarte_nrfx_data *data = dev-&amp;gt;data;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; (void)data;&lt;br /&gt;#ifdef UARTE_ANY_ASYNC&lt;br /&gt;&amp;nbsp; &amp;nbsp; if (data-&amp;gt;async) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Entering inactive state requires device to be no&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* active asynchronous calls.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __ASSERT_NO_MSG(!data-&amp;gt;async-&amp;gt;rx.enabled); // &amp;lt;- here&lt;br /&gt;```&lt;br /&gt;&lt;br /&gt;I am not explicitly enabling uart anywhere before this call site (not that I know of anyways).&lt;br /&gt;&lt;br /&gt;The related configs that come to mind are:&lt;br /&gt;&lt;br /&gt;```&lt;br /&gt;CONFIG_CONSOLE=y&lt;br /&gt;CONFIG_UART_CONSOLE=y&lt;br /&gt;&lt;br /&gt;CONFIG_SERIAL=y&lt;br /&gt;CONFIG_SHELL=y&lt;br /&gt;CONFIG_SHELL_BACKEND_SERIAL=y&lt;br /&gt;CONFIG_SHELL_AUTOSTART=n&lt;br /&gt;&lt;br /&gt;# Also tried without success, while also commenting out the zephyr,console in the dts chosen section:&lt;br /&gt;#CONFIG_UART_CONSOLE=n&amp;nbsp;&lt;br /&gt;#CONFIG_CONSOLE=n&lt;br /&gt;```&lt;br /&gt;&lt;br /&gt;Any ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550556?ContentTypeID=1</link><pubDate>Fri, 03 Oct 2025 08:07:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79716b5c-0a88-4630-8806-1862bf25ec17</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Not at the moment. The changes have broken both our logging backends. Will dig later. Just wanted to let you know about the progress so that you don&amp;#39;t burn time on it ;-).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550550?ContentTypeID=1</link><pubDate>Fri, 03 Oct 2025 07:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccb820a-800d-4d18-b188-de0c26b32212</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It sounds like you have made good progress. Regarding the crash, do you have logging over UART (another instance) or RTT so you can get a crashlog?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550519?ContentTypeID=1</link><pubDate>Thu, 02 Oct 2025 15:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82f7b10d-bce3-4869-a576-2353b06262f6</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Well, it seems that the trouble is incompatibility of the interrupt uart driver (that is default for uart shell) with the async uart driver (that is used by our app).&amp;nbsp;&lt;br /&gt;When I enable:&amp;nbsp;&lt;br /&gt;```&lt;br /&gt;CONFIG_UART_0_ASYNC=y&lt;br /&gt;CONFIG_UART_0_INTERRUPT_DRIVEN=n&lt;br /&gt;```&lt;br /&gt;the uart application starts magically working even despite CONFIG_SHELL_BACKEND_SERIAL=y. Of course at this point shell doesn&amp;#39;t work when enabled instead of our app.&lt;br /&gt;&lt;br /&gt;It looks like a solution might be adding:&lt;br /&gt;```&lt;br /&gt;CONFIG_SHELL_BACKEND_SERIAL_API_ASYNC=y&lt;br /&gt;```&lt;br /&gt;Current state of affairs: an attempt to call to pm_device_action_run(&amp;amp;uart0, PM_DEVICE_ACTION_RESUME) results in a crash.&lt;br /&gt;&lt;br /&gt;I will continue digging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550488?ContentTypeID=1</link><pubDate>Thu, 02 Oct 2025 12:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66291592-a09b-4d02-b876-db0f03275888</guid><dc:creator>kat829</dc:creator><description>&lt;p&gt;Hi Vidar! &lt;br /&gt;&lt;br /&gt;Unfortunatelly, adding pm suspends and resumes have not changed much. I can see the signal go down when I suspend the device but when I configure the pins and resume it, it goes back up and stays there.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t understand why the `CONFIG_SHELL_BACKEND_SERIAL=y` affects the behavior after the pinctrl reconfiguration. Any debug tips on that front?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: On-demand start of uart shell and dynamic pin control.</title><link>https://devzone.nordicsemi.com/thread/550455?ContentTypeID=1</link><pubDate>Thu, 02 Oct 2025 10:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:794ee57d-ee20-4c44-997e-a523554d618d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Karel,&lt;/p&gt;
&lt;p&gt;One important thing to note is that the pinout&amp;nbsp;cannot&amp;nbsp;be changed&amp;nbsp;while the peripheral is enabled. Maybe the UARTE instance was enabled when you applied the new pin configuration? You can use the power management suspend and resume actions to disable and enable the peripheral like how I did in this sample:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/107317/configuring-uart1-using-pinctrl-for-two-uarts/463996"&gt;RE: configuring UART1 using pinctrl for two UARTs&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>