<?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>nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23836/nrf52-stale-uart-rx-data</link><description>On a custom board with an nRF52832 communicating over UART with another microcontroller with no flow control capability. 
 SDK 13.0.0-1.alpha with an S132SD. 
 I have some weirdness where reading data from the UART is returning the previously received</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Jul 2017 17:58:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23836/nrf52-stale-uart-rx-data" /><item><title>RE: nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/thread/93777?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 17:58:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d625e7b6-3880-4edb-8358-c7d31ab5ec36</guid><dc:creator>operator</dc:creator><description>&lt;p&gt;Hell Hung, thank you very much for your response but as mentioned above I have resolved the issue by rejecting any potential garbage on the UART through a custom error checking and retry mechanism.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/thread/93780?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2017 13:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1591c3ee-6a87-451b-99a0-39ea0e62ad28</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Sorry to hear ab your struggle with the UART. Is it possible to reproduce the issue with a very simple code ? Let&amp;#39;s ignore BLE , simply send a byte to the peer and then wait for a byte (ACK/NACK ) to come back from the peer ?
From what I understand, you only receive the ACK of the pervious packet from the peer ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/thread/93781?ContentTypeID=1</link><pubDate>Sat, 29 Jul 2017 00:15:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b020b832-ffe6-4515-8113-93a25ab76b89</guid><dc:creator>operator</dc:creator><description>&lt;p&gt;I managed to more or less resolve the issue with a ferociously strict set of message checking logic and retries within the APP_UART_DATA_READY event handler.&lt;/p&gt;
&lt;p&gt;It doesn’t explain the stale data I was seeing but it’s a fairly robust and sufficient solution for the time being.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/thread/93779?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 19:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a1cb617-f442-47c0-ae6d-945b58055fee</guid><dc:creator>operator</dc:creator><description>&lt;p&gt;Additionally, I had a feeling the alpha SDK would come up as an issue (what exactly is different in the UART driver between the alpha and release version?) so I took the several hours necessary to port my code to the 13.1 SDK in a separate branch of my project and the result is exactly the same; the issue remains.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/thread/93778?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 19:07:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eacece4a-e44c-435e-b3ae-7301dfaa60f9</guid><dc:creator>operator</dc:creator><description>&lt;p&gt;The UART example in the SDK does not exhibit this behavior but it is also not representative of my use case.&lt;/p&gt;
&lt;p&gt;The issue noted above is the gist of problem. In my actual application a byte is written to a custom characteristic over BLE. This value is encoded with a message type and sent over UART to the secondary MCU which parses the data and sends back an acknowledgement message with the same value to confirm the data has been handled. This message is then read by the nRF52 (this is where I&amp;#39;m having the issue) and the value is used to update a separate characteristic byte value.&lt;/p&gt;
&lt;p&gt;I know that everything else in the communication chain is working properly as I can hardcode values and messages are still one behind. Values are reinitialized before every call so the only place the old data could be sitting is in the UART buffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Stale UART RX Data</title><link>https://devzone.nordicsemi.com/thread/93776?ContentTypeID=1</link><pubDate>Fri, 28 Jul 2017 08:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60c76897-45e4-4c35-9b1e-ae6a58e9bf33</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi, do you see the same issue with the uart example in the SDK ?
Also, the latest SDK is 13.1, you may consider moving away from the SDK v13 alpha.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>