<?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 Receice Data nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24590/uart-receice-data-nrf52840</link><description>Hi everyone!
I have probelem with receice data over UART. In the other MCU use core ARM as : STM32, NXP... when a byte is recieved, MCU has flag to notify. That is &amp;quot;interrupt&amp;quot;. But in the NRF52, I can&amp;#39;t see it. I always use &amp;quot;polling&amp;quot; mechanism to receive</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Aug 2017 11:50:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24590/uart-receice-data-nrf52840" /><item><title>RE: UART Receice Data nrf52840</title><link>https://devzone.nordicsemi.com/thread/96825?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2017 11:50:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0effff9-fdeb-420f-b577-dba954d05ed4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, that should work fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Receice Data nrf52840</title><link>https://devzone.nordicsemi.com/thread/96824?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2017 02:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9f0072a-8c8c-408d-998e-1287b136c556</guid><dc:creator>MainOFF</dc:creator><description>&lt;p&gt;Thanks for your response. Can I use it as :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void uart_callback_handle(app_uart_evt_t * p_event)
{
    if (p_event-&amp;gt;evt_type == APP_UART_COMMUNICATION_ERROR)
    {
        APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);
    }
     if (p_event-&amp;gt;evt_type == APP_UART_FIFO_ERROR)
    {
        APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);
    }
		if( p_event-&amp;gt;evt_type == APP_UART_DATA_READY)
		{
			while(app_uart_get(&amp;amp;data)!=NRF_SUCCESS) {};
			data_arr[index]=data;
			index++;
				if(index==10)
				{index=0;xong=1;}
		}		 
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Receice Data nrf52840</title><link>https://devzone.nordicsemi.com/thread/96826?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 10:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec675e6e-751a-4656-83bd-2c12adf62f21</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The UART peripheral interrupts are enabled in the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=2_1_0_34_9_2#register.INTENSET"&gt;INTENSET&lt;/a&gt; registers. I recommend using the UART driver(nrf_drv_uart), where this is handled for you. The app_uart_fifo library uses the nrf_drv_uart, and you can initialize the UART module like this using the app_uart_fifo:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@snippet [UART Initialization] */
static void uart_init(void)
{
    uint32_t                     err_code;
    const app_uart_comm_params_t comm_params =
    {
        RX_PIN_NUMBER,
        TX_PIN_NUMBER,
        RTS_PIN_NUMBER,
        CTS_PIN_NUMBER,
        APP_UART_FLOW_CONTROL_DISABLED,
        false,
        UART_BAUDRATE_BAUDRATE_Baud115200
    };

    APP_UART_FIFO_INIT( &amp;amp;comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_event_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When UART data has been received, you will get a &lt;code&gt;APP_UART_DATA_READY&lt;/code&gt; event if you are using the app_uart_fifo. This is done in many of the examples in the SDK(e.g. ble_app_uart)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>