<?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 API Explanation &amp;amp; FiFo</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30044/uart-api-explanation-fifo</link><description>So I can see the &amp;quot;API Reference&amp;quot; documentation on the UART driver in the info centre, however this is all very low level and I am going to waste hours going through all this trying to decode it. Also the examples appear only to use a small subset of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Feb 2018 14:32:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30044/uart-api-explanation-fifo" /><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/120128?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 14:32:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b0b9660-019f-4f64-9023-5efc8d79511a</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;Sadly, without more doco, I think the learning curve it too steep, I will waste hours frustratingly thrashing. I&amp;#39;ll get some thing working on a per character basis using my own parser first. Then once I know what I am doing I can incorporate the nordic higher level functionality offered by either the UART Driver or nrf_cli_uart into later versions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/120114?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 13:15:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:973fb2bb-6d37-4ac1-8952-e1d8d7edd816</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;Thanks, that does sound useful.&amp;nbsp;I think I have just found some example code too:&amp;nbsp;/nordic/nRF5_SDK_13.0.0_04a0bfd/examples/peripheral/cli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/120110?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 13:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b794c5ef-a24f-4047-a859-aabf3cdc514a</guid><dc:creator>jakub</dc:creator><description>&lt;p&gt;I was hoping you can use CLI to meet this request:&lt;br /&gt;&amp;quot;&lt;span&gt;&amp;nbsp;I know that my data stream&amp;nbsp;starts with character Y and when good is of a certain length X and is terminated by &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;. Therefore I would simply like the UART (supporting code/Library) to accumulate into a buffer, once Y has arrived and to send me an event when I have X bytes at which point I can check for &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can define a command that starts with Y, and a callback that will be executed if one will call this command.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/120102?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 12:32:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea7fa8dc-64dd-48c9-ab80-0697bbbd1799</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;@jakub please tell what additional value I would gain using nrf_cli instead of &amp;nbsp;&lt;span&gt;&amp;ldquo;&lt;/span&gt;&lt;a href="https://goo.gl/3XYdVZ"&gt;UART Driver&lt;/a&gt;&lt;span&gt;&amp;rdquo;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119683?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 09:01:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef1df069-cac6-4e0c-ae24-97666fcdba0a</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;been working on other parts of the project. Will get back to the UART this week.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119682?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 08:59:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e83470-2ab6-4fe9-b65b-52892f3b8c15</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;thanks for putting this on my radar.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119672?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 08:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:246fc3b9-297d-4115-8f59-df4fb836dc22</guid><dc:creator>ketil</dc:creator><description>&lt;p&gt;Hi again, and thank you for the feedback. I will pass it on to the relevant parties. Did you manage to get the UART Driver&amp;nbsp;working for your application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119603?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 22:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0fe6961-78de-46d1-a1b6-5c7bc45a469e</guid><dc:creator>jakub</dc:creator><description>&lt;p&gt;Maybe you can try NRF_CLI module? Looks will fit your needs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119598?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 21:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c8186d8-a20b-4552-aef9-94116b0067a2</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;Hi Ketil I hope the new website permits me enough characters to say everything! I don&amp;rsquo;t believe a new UART API is required, just the existing one be made more understandable (faster) through some additional documentation.&lt;/p&gt;
&lt;p&gt;My objective is to create a parser which reads a UART stream from a sensor. The parser determines the validity level and if the threshold is reached the stream is parsed, the required data extracted and transmitted via BLE. I will be using a proprietary profile.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I know that my data stream&amp;nbsp;starts with character Y and when good is of a certain length X and is terminated by &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;. Therefore I would simply like the UART (supporting code/Library) to accumulate into a buffer, once Y has arrived and to send me an event when I have X bytes at which point I can check for &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Alternatively I would like to be the UART (Library) to accumulate into a buffer and send me an event when &amp;lt;LF&amp;gt; has arrived at which point I can check the correct&amp;nbsp;amount of data that has arrived.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The application only needs to act when the required data has arrived. Looking at the example code the programming module appears to require that the application look at every character that arrives. The examples &amp;quot;uart&amp;quot; and &amp;quot;ble_app_uart&amp;quot; both process a character at a time (this is the impression given), which conflicts with the requirement&amp;nbsp;for a&amp;nbsp;large FIFO buffers.&lt;/p&gt;
&lt;p&gt;Looking at the &lt;a href="https://goo.gl/5fYaXK"&gt;&amp;ldquo;UART module&amp;rdquo;&lt;/a&gt; documentation it would appear to work on a byte at a time. After further research I discovered the &amp;ldquo;&lt;a href="https://goo.gl/3XYdVZ"&gt;UART Driver&lt;/a&gt;&amp;rdquo; which appears a better match for my&amp;nbsp;programming module described above, in that the App can be notified when the require amount of data has been received. To my knowledge there is no example code for the &amp;ldquo;UART Driver&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;I could have saved lots&amp;nbsp;time if both these; &amp;ldquo;UART module&amp;rdquo; &amp;amp; &amp;ldquo;UART Driver&amp;rdquo; had been presented in a higher level document&amp;nbsp;together with&amp;nbsp;matching&amp;nbsp;application scenarios for&amp;nbsp;which they could&amp;nbsp;provide a solution.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Apple produces &lt;a href="https://goo.gl/NyQvZx"&gt;documentation&lt;/a&gt;, where a hierarchical approach is taken starting with application scenarios and then decomposing&amp;nbsp;down to &lt;a href="https://goo.gl/GYQuHy"&gt;API&amp;rsquo;s&lt;/a&gt;. It&amp;#39;s about ensuring the developer makes best use of their time enabling them to identifying which API&amp;#39;s are going to contribute to&amp;nbsp;their solution and this is&amp;nbsp;efficiently&amp;nbsp;achieved&amp;nbsp;by providing context.&lt;/p&gt;
&lt;p&gt;Hope this helps - now to try out&amp;nbsp;the &amp;quot;UART Driver&amp;quot;!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119337?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 12:04:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d47f8a56-f31c-4620-8c61-b51c0d82ba6c</guid><dc:creator>ketil</dc:creator><description>&lt;p&gt;It would be very much appreciated if you could post some examples of what your ideal UART API would look like. I will pass this information on to the developers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119339?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 07:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8340974e-db6a-4e09-9400-57cabb6e76ad</guid><dc:creator>venerley</dc:creator><description>&lt;p&gt;Hi Matt and thanks for your comments, no doubt I will end up following your suggestion. I suspect its a company cultural thing. The Nordic folks already understand how this stuff works inside and out consequently the pain of getting up to speed has passed for them, or is short lived as they can talk the creator of the API directly!&lt;/p&gt;
&lt;p&gt;The UART functionality seems comprehensive and I would like to architect my code efficiently, from the top down rather than hacking from the bottom up and getting very frustrated in the process. I need to create a parser on the data from the UART and I would like todo this optimally in terms of memory &amp;amp; cpu.&lt;/p&gt;
&lt;p&gt;It looks like there is no alternative; I will have to start the process of inefficient hacking and then start  posting questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART API Explanation &amp; FiFo</title><link>https://devzone.nordicsemi.com/thread/119338?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2018 02:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:377fd3ec-a61a-41b5-a490-85cf27378135</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;People will simply ignore your rant. Why don&amp;#39;t you table your &amp;quot;higher&amp;quot; (&amp;lt;--- whatever that means) level API here so that the good Nordic folks have something concrete to chew on?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>