<?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>How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69945/how-to-read-data-from-uart-rx-interrupt-sdk-17-0-2</link><description>Hi 
 I want to receive data through UART RX interrupt. 
 --&amp;gt; A n interruption occurs to notify me w hen one character(byte) is received, and i store it to my memory buffer 
 
 The example project I used is &amp;quot; examples/peripheral/uart/main.c &amp;quot; 
 But this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 May 2021 11:09:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69945/how-to-read-data-from-uart-rx-interrupt-sdk-17-0-2" /><item><title>RE: How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/311735?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 11:09:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36cf120f-9495-4a76-82df-84774f5fd47d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Are you still having issues with this?&lt;/p&gt;
&lt;p&gt;If so, maybe you can summarize your issue and what progress you have had so far, and open a new ticket?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/305980?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 05:51:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7aa5d53d-b07b-4835-90d8-c1e36c4a0ef8</guid><dc:creator>MMD</dc:creator><description>&lt;p&gt;I entered the code you said but nothing will be executed. Can you help? thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/305979?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 05:49:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fbc75cd-c1b9-4a02-aa77-714a84161acb</guid><dc:creator>MMD</dc:creator><description>&lt;p&gt;Can you help me and tell me how it was done? (I will see your code)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/286789?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 07:10:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee576a54-0282-4e17-85e4-7e4c3550cdaf</guid><dc:creator>Henry_Chou</dc:creator><description>&lt;p&gt;But the handler is not included the RX data timeout procedure. You have to apply the RTC timer handler for timeout by your own.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/286788?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 07:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0437ec0-e022-4fcc-8fb1-12842b317e6c</guid><dc:creator>M333_TW</dc:creator><description>&lt;p&gt;thanks for your help!&lt;/p&gt;
&lt;p&gt;its working after changing the initial settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read data from UART RX interrupt? (SDK 17.0.2)</title><link>https://devzone.nordicsemi.com/thread/286783?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 05:24:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:057a7add-6e6e-447a-b7ed-97327a3f6912</guid><dc:creator>Henry_Chou</dc:creator><description>&lt;p&gt;Applay as this&lt;/p&gt;
&lt;p&gt;static void uart_init(void)&lt;br /&gt;{&lt;br /&gt; uint32_t err_code;&lt;/p&gt;
&lt;p&gt;const app_uart_comm_params_t comm_params =&lt;br /&gt; {&lt;br /&gt; .rx_pin_no = RX_PIN_NUMBER,&lt;br /&gt; .tx_pin_no = TX_PIN_NUMBER,&lt;br /&gt; //.rts_pin_no = RTS_PIN_NUMBER,&lt;br /&gt; //.cts_pin_no = CTS_PIN_NUMBER,&lt;br /&gt; .flow_control = APP_UART_FLOW_CONTROL_DISABLED, //APP_UART_FLOW_CONTROL_ENABLED,&lt;br /&gt; .use_parity = false,&lt;br /&gt; .baud_rate = UART_BAUDRATE_BAUDRATE_Baud115200&lt;br /&gt; };&lt;/p&gt;
&lt;p&gt;APP_UART_FIFO_INIT(&amp;amp;comm_params,&lt;br /&gt; UART_RX_BUF_SIZE,&lt;br /&gt; UART_TX_BUF_SIZE,&lt;br /&gt; uart_event_handle,&lt;br /&gt; APP_IRQ_PRIORITY_LOWEST,&lt;br /&gt; err_code);&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK(err_code);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;void uart_event_handle(app_uart_evt_t * p_event)&lt;br /&gt;{&lt;br /&gt; static uint8_t data_array[128];&lt;br /&gt; static uint8_t index = 0;&lt;/p&gt;
&lt;p&gt;switch (p_event-&amp;gt;evt_type)&lt;br /&gt; {&lt;br /&gt; /**@snippet [Handling data from UART] */&lt;br /&gt; case APP_UART_DATA_READY:&lt;br /&gt; //UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index]));&lt;br /&gt; app_uart_get(&amp;amp;data_array[index]);&lt;br /&gt; index++;&lt;/p&gt;
&lt;p&gt;if ((data_array[index - 1] == &amp;#39;\n&amp;#39;) || (index &amp;gt;=127))&lt;br /&gt; {&lt;br /&gt; data_array[index]=0;&lt;br /&gt; index = 0;&lt;br /&gt; memcpy(uart_rx_buff,data_array,sizeof(data_array));&lt;br /&gt; }&lt;br /&gt; break;&lt;br /&gt; /**@snippet [Handling data from UART] */&lt;br /&gt; case APP_UART_COMMUNICATION_ERROR:&lt;br /&gt; APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;case APP_UART_FIFO_ERROR:&lt;br /&gt; APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);&lt;br /&gt; break;&lt;/p&gt;
&lt;p&gt;default:&lt;br /&gt; break;&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>