<?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>Uart event handler problems</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38816/uart-event-handler-problems</link><description>Let&amp;#39;s first compare two pieces code: 
 This one works: 
 
 But this one doesn&amp;#39;t: 
 
 My problem is that as soon as I try to process received data, some of data is lost. Is this a concurrency issue? It seems to me that the problem occurs if too much time</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Sep 2018 11:22:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38816/uart-event-handler-problems" /><item><title>RE: Uart event handler problems</title><link>https://devzone.nordicsemi.com/thread/150013?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7bc18bd-0ade-4853-a225-37afb0565186</guid><dc:creator>Hein</dc:creator><description>&lt;p&gt;Yes, that does make sense, the event handler is basically an interrupt, so when you spend a lot of time in the event handler, you will get a buffer overrun and loose some bytes. The best way to approach this type of code is to only copy the bytes into the buffer in the event handler and then process the buffer outside of the interrupt using the app scheduler.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart event handler problems</title><link>https://devzone.nordicsemi.com/thread/150006?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12780b9e-7c86-4c2d-886b-20c60c0293fe</guid><dc:creator>Igor</dc:creator><description>&lt;p&gt;At the beginning it is fine, but later data tend to be&amp;nbsp;incomplete. However, this is just a shorten example. The more code I add to the event handler, the more data I loose.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart event handler problems</title><link>https://devzone.nordicsemi.com/thread/149986?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 10:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcdc35b5-03ac-4773-9264-0ca2521ce3ee</guid><dc:creator>Hein</dc:creator><description>&lt;p&gt;Hi, do you mean that you are losing data from message 2 while processing message 1 ? Or do you mean that message 1 is missing some bytes ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>