<?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>SDK 17.1 UART example exit with error_code=0x0c or 0x4001</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88709/sdk-17-1-uart-example-exit-with-error_code-0x0c-or-0x4001</link><description>I am working on UART example and serial port. 
 I got compile error and modified retarget.c line 99 with 
 #if defined(__SES_VERSION) &amp;amp;&amp;amp; (__SES_VERSION &amp;gt;= 34000) &amp;amp;&amp;amp; !defined(__SEGGER_RTL_VERSION) 
 I got like error and set 
 Project -&amp;gt; Options... -&amp;gt; Library</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Jun 2022 07:52:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88709/sdk-17-1-uart-example-exit-with-error_code-0x0c-or-0x4001" /><item><title>RE: SDK 17.1 UART example exit with error_code=0x0c or 0x4001</title><link>https://devzone.nordicsemi.com/thread/371560?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 07:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef8a95cf-2bc7-4287-afc9-931043bf10c1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I suggest that you try to hook up a logic analyzer on the UART pins to check whether the RS232 device actually sends 0x79. Does the RS232 cable work after this &amp;quot;garbage data&amp;quot;?&amp;nbsp;&lt;/p&gt;
[quote user="tni"]&lt;p&gt;&amp;gt;&lt;span&gt;Where do you see the 0x4001?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;app_error_handler_gcc.c line 47,&amp;nbsp;app_error_handler()&lt;/p&gt;[/quote]
&lt;p&gt;Ah, you mean that the ID is 0x4001. That just means that it is an NRF_FAULT_ID_SDK_ERROR (and not an SDK_ASSERT, or a Softdevice assert).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 17.1 UART example exit with error_code=0x0c or 0x4001</title><link>https://devzone.nordicsemi.com/thread/371499?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 19:04:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f266490-2e67-4b38-aca7-56f7aaad980b</guid><dc:creator>tni</dc:creator><description>&lt;p&gt;FT232R USB - RS232C cable does not work with UART sample.&lt;/p&gt;
&lt;p&gt;I got APP_UART_COMMUNICATION_ERROR and garbage data of 0x79.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Prolific USB-TTL cable is working fine with UART sample. No communication error. No garbage data.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 17.1 UART example exit with error_code=0x0c or 0x4001</title><link>https://devzone.nordicsemi.com/thread/371495?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 17:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:161e27c5-cce0-468d-8444-719a82f35d30</guid><dc:creator>tni</dc:creator><description>&lt;p&gt;&amp;gt;&lt;span&gt;Where do you see the 0x4001?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;app_error_handler_gcc.c line 47,&amp;nbsp;app_error_handler()&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I comment out main.c line76 for workaround this issue.&lt;/p&gt;
&lt;pre&gt;//APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;I saw some garbage data of 0x79 after app_uart_get()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 17.1 UART example exit with error_code=0x0c or 0x4001</title><link>https://devzone.nordicsemi.com/thread/371425?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2022 13:14:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:686c0638-df85-4683-9d57-d8f450126174</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The most common sources of the APP_UART_COMMUNICATION_ERROR event is either that there is a floating RX pin (not connected to anything, so the input voltage can drift and generate &amp;quot;junk&amp;quot; data), or that the connected device is using the incorrect baudrate (the nRF and the connected device are not using the same baudrate).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What do you mean by &amp;quot;example exits with err_code = 0x0c or 0x4001&amp;quot;? Are both of these coming from the same event? APP_UART_COMMUNICATION_ERROR? The 0x0C means that it is a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=4_2_0_34_9_4#register.ERRORSRC"&gt;framing error&lt;/a&gt;, but this should not be able to give an err_code of 0x4001.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where do you see the 0x4001?&lt;/p&gt;
&lt;p&gt;what is your UART connected to? And what baudrate does the connected device use? (and what baudrate do you use?)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>