<?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>APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12275/app-uart-communication-error-eror-code</link><description>both for APP_UART_FIFO_INIT and APP_UART_INIT i never receive APP_UART_DATA_READY 
 but at least i get APP_UART_DATA sometimes .
most of the times i get APP_UART_COMMUNICATION_ERROR with uart_evt-&amp;gt;data.error_communication being either 1 or 4 or 8 randomly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 06 Mar 2016 11:33:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12275/app-uart-communication-error-eror-code" /><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46406?ContentTypeID=1</link><pubDate>Sun, 06 Mar 2016 11:33:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e154bb2-7ecf-4e0e-85d7-29ba5285381c</guid><dc:creator>aep</dc:creator><description>&lt;p&gt;@RK Hmm. I&amp;#39;ll try to make a full logic analysis including CTS/RTS when i get the time. I did see a difference when enabling flow control, so i dont think it plain didn&amp;#39;t work at all. It just didn&amp;#39;t fix the issue i had. Just not blocking fixed it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46405?ContentTypeID=1</link><pubDate>Sat, 05 Mar 2016 13:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b92242b-55f3-49e5-8556-119e9948586b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Sorry but neither of those two conclusions really make much sense. Flow control when enabled on both sides with RTS/CTS connected absolutely stops the UART in both directions from overflowing its buffer. That has nothing at all to do with the softdevice nor interrupt priorities or anything else. As long as the RTS/CTS are deasserted, you can take as long as you like to service the UART, cycles, milliseconds or seconds and it and the other end will just sit there quietly and wait for buffer space to become available.&lt;/p&gt;
&lt;p&gt;So what you&amp;#39;re seeing has to be something else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46404?ContentTypeID=1</link><pubDate>Sat, 05 Mar 2016 12:07:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0757bd27-8a6e-48f4-ba9f-f6729aa7c066</guid><dc:creator>aep</dc:creator><description>&lt;p&gt;(edit: might not be the correct answer?)&lt;/p&gt;
&lt;p&gt;Turns out that i incorrectly assumed turning on flow control would allow me to block the uart event handler for longer than one cycle.  Apparantly flow controll doesn&amp;#39;t work that way or is too slow or something.&lt;/p&gt;
&lt;p&gt;Even with flowcontroll enabled , do not block the uart event handler&lt;/p&gt;
&lt;p&gt;Also the uart event handler must be a high priority interrupt, otherwise the softdevice breaks it. The internal hw buffer is just 6 bytes or so, that leaves enough cpu time to put those bytes into an app_fifo and trigger event scheduler to call a function on the mainloop with lower priority to parse the data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46403?ContentTypeID=1</link><pubDate>Fri, 04 Mar 2016 09:39:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52daab75-eb31-47c2-9053-dd0324248b29</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You can get FRAMING or BREAK errors if the transmitting device restarts, could that be the case? Do you get the error often? If you are using the APP_ERROR_HANDLER on the error I would consider changing it to a more suitable error handler, because APP_ERROR_HANDLER will either reset the chip or go into infinite while loop, see &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46402?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2016 15:48:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b42aa86-3398-4fc6-96be-0a8818ab4d22</guid><dc:creator>aep</dc:creator><description>&lt;p&gt;bah of course i used the wrong file, thanks Ole.&lt;/p&gt;
&lt;p&gt;with app_uart_fifo i just get APP_UART_COMMUNICATION_ERROR with error code 4 and no other event.&lt;/p&gt;
&lt;p&gt;All of this is with or without flow control btw, but with flow control its a tiny bit better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46401?ContentTypeID=1</link><pubDate>Thu, 03 Mar 2016 10:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c380941-fd5d-48f6-8e9a-f4f63794c035</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Sounds like that. Are you using app_uart.c or app_uart_fifo.c? You should use the fifo file. Are you running an example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46400?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2016 18:12:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d013c397-8812-4707-b94c-b30b5c243acf</guid><dc:creator>aep</dc:creator><description>&lt;p&gt;Yeap, My logic analyzer shows its matching up fine. Curiously i receive exactly 5 or 6 characters until i get an error. It sounds like the fifo doesnt actually work and the internal hw buffer is just 6 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: APP UART COMMUNICATION ERROR eror code</title><link>https://devzone.nordicsemi.com/thread/46399?ContentTypeID=1</link><pubDate>Wed, 02 Mar 2016 16:27:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1c2d62d-6787-44de-b27d-a746c5fe8451</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The uart_evt-&amp;gt;data.error_communication is equal to the ERRORSRC register, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.0/uart.html#register.ERRORSRC"&gt;here&lt;/a&gt; (same for nRF51). You are receiving OVERRUN, FRAMING and BREAK errors which can occur if you are using the wrong baudrate. Have you configured the same baudrate on both sides of the UART?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>