<?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>Asynchronously receive over UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47630/asynchronously-receive-over-uart</link><description>I would like to receive data on UART asynchronously and handle the RX event in the backend in an IRQ handler. The application is - a user will be shown a menu and asked to enter a character. It is a kind of CLI. On receiving the character response, a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 May 2019 07:39:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47630/asynchronously-receive-over-uart" /><item><title>RE: Asynchronously receive over UART</title><link>https://devzone.nordicsemi.com/thread/188962?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 07:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cac20a21-d518-4344-978e-bf3d7fdef3de</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;Thanks for the much needed clarification.&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/47630/asynchronously-receive-over-uart/188885"]you will have to call it again when you receive the event/interrupt that the operation completed[/quote]
&lt;p&gt;...means, before I exit from the event handler, I understand I must call&amp;nbsp;&lt;em&gt;&lt;strong&gt;nrfx_uart_rx&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I did try the CLI example but my application has a screen which gets updated with live data apart from menu options.&amp;nbsp;I also looked into BLE over UART, UART and Serial examples as well. Am&amp;nbsp;using the examples to only get ideas as my requirement is just tx/rx one character at a time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asynchronously receive over UART</title><link>https://devzone.nordicsemi.com/thread/188885?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 14:55:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc651b0e-4f23-402d-9ff3-72e3fca84c92</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you provide a event_handler to&amp;nbsp;&lt;span&gt;nrfx_uart_init,&amp;nbsp;nrfx_uart_rx will setup the driver for &amp;quot;background&amp;quot; receiving of data. Note&amp;nbsp;that this function only setup a single receive operation, you will have to call it again when you receive the event/interrupt that the operation completed. It will not run in an infinite loop that will receive anything that is transmitted to the device. Did you try out the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/cli_example.html?cp=5_1_4_6_7"&gt;CLI example&lt;/a&gt;? It sounds similar to your application.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asynchronously receive over UART</title><link>https://devzone.nordicsemi.com/thread/188713?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 07:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5021a6ac-dd13-499d-80a1-5ce9368760a9</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;Once I call the nrfx_uart_rx function, the Rx will happen continuously over the back-end(like a separate thread running continuously in an infinite loop) when interrupt arrives each time. It is non-blocking as I am providing event_handler(which acts like an ISR) in nrfx_uart_init.&lt;/p&gt;
&lt;p&gt;Am I right?&lt;/p&gt;
&lt;p&gt;I had confusions with the examples as everytime the &amp;#39;read&amp;#39; or &amp;#39;get&amp;#39; functions are called in the examples explicitly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asynchronously receive over UART</title><link>https://devzone.nordicsemi.com/thread/188620?ContentTypeID=1</link><pubDate>Wed, 22 May 2019 14:18:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d330869-8af8-48bc-8438-ca0ff8ca90b3</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;There is already a CLI in the SDK.&lt;/p&gt;
&lt;p&gt;The Nordic UART Example (among others?) illustrates asynchronous (event-based) receiving from the UART peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>