<?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>NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37521/nrf52840-usb_cdc_acm-uart</link><description>Hi, 
 I&amp;#39;m trying to combine serial UART functionality into the USBD_BLE_UART example. The goal is to send data in/out to the hardware UART as well. 
 I started off by loading the USBD_BLE_UART example, then added the UART functions from the UART peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Mar 2020 04:21:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37521/nrf52840-usb_cdc_acm-uart" /><item><title>RE: NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/thread/238693?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 04:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:009a325c-fa53-4a12-b09f-d08557ae15a3</guid><dc:creator>BattleDroid</dc:creator><description>&lt;p&gt;Hi Julian, how did you configure the TX and RX pins to correct this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/thread/145013?ContentTypeID=1</link><pubDate>Tue, 21 Aug 2018 04:50:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:485ccba6-ae49-4275-b98b-08daa72ab810</guid><dc:creator>Julian</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I have found the cause of this issue. When you asked about my uart_init() function , I went through it again and sure enough, the RX &amp;amp; TX pins are initialized wrongly. Sorry for such a newbie mistake.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d like to express my appreciation for your in-depth explanation on the UART SDK and hardware register.&lt;/p&gt;
&lt;p&gt;Thank you for your outstanding support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/thread/144709?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 12:06:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6b4acbc-7278-4440-af58-b8c1a6fe406b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I assume that you are printing &amp;quot;Communication error occurred while handling UART.&amp;quot; when you get the&amp;nbsp;APP_UART_COMMUNICATION_ERROR event.&lt;/p&gt;
&lt;p&gt;For APP_UART_COMMUNICATION_ERROR, the error-field contains the value in the ERRORSRC register for the UART peripheral.&lt;/p&gt;
&lt;p&gt;12 in binary is 1100, so looking at the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=2_1_0_34_9_4#register.ERRORSRC"&gt;ERRORSRC&amp;nbsp;r&lt;/a&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=2_1_0_34_9_4#register.ERRORSRC"&gt;egister&lt;/a&gt;&amp;nbsp;you are getting a Break condition and&amp;nbsp;Framing error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you&amp;nbsp;receiving anything over UART? Could you check with a&amp;nbsp;signal analyzer or oscilloscope ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is this a nRF52840-DK or a custom board?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How does your&amp;nbsp;uart_init() function looks like ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/thread/144615?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 01:57:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d700af-5bbe-40ad-99a4-f7ed0fb6b037</guid><dc:creator>Julian</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Sorry for not describing the issue in enough detail.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are absolutely right, the function that returns NRF_INVALID_STATE is actually nrfx_uart_init(), which resides in nrf_drv_uart_init(). It returns this error if the drv is already in initialized state.&lt;/p&gt;
&lt;p&gt;I have set&amp;nbsp;&lt;span&gt;NRF_LOG_BACKEND_UART_ENABLED to 0. Now I am getting a different error below. I couldn&amp;#39;t manage to trace down which function triggered this error at the moment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;info&amp;gt; app: USBD BLE UART example started.&lt;br /&gt;&amp;lt;error&amp;gt; app: Communication error occurred while handling UART.&lt;br /&gt;&amp;lt;error&amp;gt; app: ERROR 12 [NRF_ERROR_DATA_SIZE] at :0&lt;br /&gt;PC at: 0x00000000&lt;br /&gt;&amp;lt;error&amp;gt; app: End of error report&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This error occurred right on start up, and I&amp;#39;m not transmitting anything on the UART lines.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/thread/144423?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 07:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9833566e-eb8a-41ac-b31f-87de006aab4c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is it maybe&amp;nbsp;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrf__drv__uart.html?cp=4_0_0_6_9_0_28_0_12#gad7c986a0f927c30d6b1964609876045a"&gt;nrf_drv_uart_init()&lt;/a&gt; that returns&amp;nbsp;NRF_INVALID_STATE&amp;nbsp;? That indicates that the uart driver is already initialized.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then this is maybe happening because nrf_log is using uart as backend, and then you try to&amp;nbsp;initialize uart again after log_init()? If so, I would then recommend that you use RTT as logging backend instead.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In sdk_config.h, s&lt;/span&gt;&lt;span&gt;et&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED to 0 and&amp;nbsp;NRF_LOG_BACKEND_RTT_ENABLED to 1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840 USB_CDC_ACM + UART</title><link>https://devzone.nordicsemi.com/thread/144420?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 07:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7275783f-a47d-4068-8503-40d8470a68b8</guid><dc:creator>awneil</dc:creator><description>[quote userid="67842" url="~/f/nordic-q-a/37521/nrf52840-usb_cdc_acm-uart"] I get a NRF_INVALID_STATE error. [/quote]
&lt;p&gt;So where, exactly, do you get that error?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Step into wherever it&amp;#39;s happening to see what makes it say that ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>