<?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>Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117754/facing-issue-with-ble-and-uart-nrf5340</link><description>Hi, 
 I have tested my BLE code and UART code separately, and both worked correctly during individual testing. 
 However, when integrating both, I encountered an issue with UART. Specifically, when I try to enable UART RX, it triggers the callback for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jan 2025 07:32:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117754/facing-issue-with-ble-and-uart-nrf5340" /><item><title>RE: Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/thread/517137?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 07:32:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48aa0ecc-22b0-4c9f-9d9b-75d61418d807</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming that it worked. No, this will not affect FOTA.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/thread/517134?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 07:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf110ca9-46c0-4a00-bce4-e3c7fa7cb9df</guid><dc:creator>REDHAT</dc:creator><description>&lt;p&gt;Thank you so much for your input. It&amp;rsquo;s working fine now.&lt;/p&gt;
&lt;p&gt;This isn&amp;rsquo;t going to interfere with FOTA, is it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/thread/517119?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 05:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386e16e3-f570-4a71-9687-6d916c2e386e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So it seems like you have overlapping pin assignments.&amp;nbsp;The &amp;quot;uart&amp;quot; pins&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/7f8d857bf1f57b07e832d52263beaa23c91fef24/boards/nordic/nrf5340dk/nrf5340_cpuapp_common.dtsi#L45"&gt;here&lt;/a&gt;&amp;nbsp;will be assigned to the network core when the netcore is enabled (enabled automatically when CONFIG_BT is selected). See my answer in this post for how you can remove forwarding of these pins and make them accessible to the appcore instead:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/110289/nrf5340-gpio-forwarder-availibility/479104"&gt;RE: nrf5340 Gpio forwarder availibility&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/thread/517116?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 05:25:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:214c54e0-29a9-40fc-addc-69cbfc142999</guid><dc:creator>REDHAT</dc:creator><description>&lt;p&gt;HI,&lt;br /&gt;Vidar Berg.&lt;br /&gt;&lt;br /&gt;this are my pin configuration.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart1 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;57600&amp;gt;;
};

&amp;amp;uart0_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;;
	};

	group2 {
		psels = &amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;;
	};
};

&amp;amp;uart0_sleep {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 0, 20)&amp;gt;, &amp;lt;NRF_PSEL(UART_RX, 0, 22)&amp;gt;;
	};
};

&amp;amp;uart1_sleep {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 1, 1)&amp;gt;, &amp;lt;NRF_PSEL(UART_RX, 1, 0)&amp;gt;;
	};
};

&amp;amp;uart1_default {
	group1 {
		psels = &amp;lt;NRF_PSEL(UART_TX, 1, 1)&amp;gt;;
	};

	group2 {
		psels = &amp;lt;NRF_PSEL(UART_RX, 1, 0)&amp;gt;;
	};
};&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;yes I am using the same pins for UART.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;this is the reenabling code.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;    case UART_RX_BUF_REQUEST:
        err = uart_rx_buf_rsp(uart2_dev, rx_buf, sizeof(rx_buf));
        if (err) {
            LOG_ERR(&amp;quot;Failed to provide new RX buffer: %d&amp;quot;, err);
        }
        break;
    case UART_RX_BUF_RELEASED:
        // LOG_INF(&amp;quot;UART_RX_BUF_RELEASED&amp;quot;);
        break;
    case UART_RX_DISABLED:
        // k_sleep(K_MSEC(10));
        // k_msleep(10);
        LOG_INF(&amp;quot;UART_RX_DISABLED&amp;quot;);
        err = uart_rx_enable(uart2_dev, rx_buf, sizeof(rx_buf), UART_FIFO_TIMEOUT_MS);
        if (err) {
        LOG_ERR(&amp;quot;Failed to enable UART RX: %d&amp;quot;, err);

        }
        break;
case UART_RX_STOPPED:
    enum uart_rx_stop_reason reason = evt-&amp;gt;data.rx_stop.reason;
    switch (reason) {
        case UART_ERROR_OVERRUN:
            LOG_INF(&amp;quot;UART RX stopped: Overrun error&amp;quot;);
            break;
        case UART_ERROR_PARITY:
            LOG_INF(&amp;quot;UART RX stopped: Parity error&amp;quot;);
            break;
        case UART_ERROR_FRAMING:
            LOG_INF(&amp;quot;UART RX stopped: Framing error&amp;quot;);
            break;
        case UART_BREAK:
            LOG_INF(&amp;quot;UART RX stopped: Break interrupt&amp;quot;);
            break;
        case UART_ERROR_COLLISION:
            LOG_INF(&amp;quot;UART RX stopped: Collision error&amp;quot;);
            break;
        case UART_ERROR_NOISE:
            LOG_INF(&amp;quot;UART RX stopped: Noise error&amp;quot;);
            break;
        default:
            LOG_INF(&amp;quot;UART RX stopped: Unknown reason&amp;quot;);
            break;
    }
    break;
    default:
        // LOG_INF(&amp;quot;Unknown UART event: %d&amp;quot;, evt-&amp;gt;type);
        break;
    }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;i am using the UAER1 but named it as uart2 please note this!!&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define UART2_NODE DT_NODELABEL(uart1)
static const struct device *const uart2_dev = DEVICE_DT_GET(UART2_NODE);
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and I tried to enable the uart_rx_enable in call back and&amp;nbsp;UART_RX_DISABLED triggering continuedly.&lt;/p&gt;
&lt;p&gt;and this are the logs..&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; UART RX stopped: Framing error
I: UART_RX_DISABLED
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART_RX_DISABLED
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART_RX_DISABLED
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART_RX_DISABLED
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART_RX_DISABLED
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error
I: UART_RX_DISABLED
I: UART RX stopped: Framing error
I: UART RX stopped: Framing error&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please help me to resolve this, I am in final stage of the development.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/thread/516998?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 13:22:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:029519a4-dd27-464b-914a-298288fdfedb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The UART_RX_STOPPED event indicates that an UART error condition was triggered (OVERRUN, FRAMING errorr, etc). You can check the&amp;nbsp;uart_rx_stop_reason to find the exact error condition. That said, I&amp;#39;m not sure why you only experience this with BLE enabled. Are you using any of these pins for UARTE1?&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/7f8d857bf1f57b07e832d52263beaa23c91fef24/boards/nordic/nrf5340dk/nrf5340_cpuapp_common.dtsi#L45"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/7f8d857bf1f57b07e832d52263beaa23c91fef24/boards/nordic/nrf5340dk/nrf5340_cpuapp_common.dtsi#L45&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to re-enable UART RX from the&amp;nbsp;UART_RX_DISABLED event to see if the error condition gets triggered over and over again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Facing issue with BLE and UART (NRF5340)</title><link>https://devzone.nordicsemi.com/thread/516929?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 09:17:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e2901c0-3626-40e1-98b8-cf0798d0924d</guid><dc:creator>REDHAT</dc:creator><description>&lt;p&gt;Please note that I am using the UART1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>