<?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>UARTE can&amp;#39;t receive data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48986/uarte-can-t-receive-data</link><description>I&amp;#39;ve been playing around with the UART drivers on SDK 15.2. No issues with the Legacy (w/DMA) however I&amp;#39;ve tried switching over the NRFX_UARTE driver and I can&amp;#39;t get the driver to Recieve data. The Rx Event is never called in the handler, nor does nrfx_uarte_rx_ready</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jul 2019 07:25:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48986/uarte-can-t-receive-data" /><item><title>RE: UARTE can't receive data</title><link>https://devzone.nordicsemi.com/thread/196720?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 07:25:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71f49a7a-365a-4f4b-a234-19ff5f0f59dc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you set the pins in the config? By default, these are set to&amp;nbsp;NRF_UARTE_PSEL_DISCONNECTED.&lt;/p&gt;
&lt;p&gt;I tested this similar code, and I&amp;#39;m able to receive data in the event handler:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define UART_RX_BUF_SIZE 10
static uint8_t my_uart_rx_buffer_assigned[UART_RX_BUF_SIZE] = {0x00};


static void my_uarte_event_handler(nrfx_uarte_event_t const * p_event,
                              void *                     p_context)
{
    if(p_event-&amp;gt;type == NRFX_UARTE_EVT_RX_DONE)
    {
        memset(my_uart_rx_buffer_assigned, 0x00, UART_RX_BUF_SIZE);
    }
}

int main(void)
{
    bsp_board_init(BSP_INIT_LEDS);
    nrfx_uarte_t instance = NRFX_UARTE_INSTANCE(0);
    static nrfx_uarte_config_t my_uarte_config = NRFX_UARTE_DEFAULT_CONFIG;
    my_uarte_config.pselrxd = 8;
    my_uarte_config. pseltxd = 6;


    ret_code_t err_code = nrfx_uarte_init( &amp;amp;instance, &amp;amp;my_uarte_config ,  my_uarte_event_handler );

    APP_ERROR_CHECK(err_code);

    err_code = nrfx_uarte_rx( &amp;amp;instance,
    (uint8_t*)my_uart_rx_buffer_assigned,
    UART_RX_BUF_SIZE);
    APP_ERROR_CHECK(err_code);
    

    while (true) 
    {
        __WFE();
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE can't receive data</title><link>https://devzone.nordicsemi.com/thread/195224?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 19:02:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3ef9f3c-72f7-46f4-a6c2-df5dfa027cac</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;static nrfx_config_t my_uart_config = &lt;strong&gt;NRFX_UARTE_DEFAULT_CONFIG&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; err_code = nrfx_uarte_init( &amp;amp;mu_uarte,&lt;br /&gt; &amp;amp;&lt;span&gt;my_uarte_config&amp;nbsp;&lt;/span&gt;,&lt;br /&gt; my_uarte_event_handler );&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;nrfx_uarte_rx( &amp;amp;my_uart,&lt;br /&gt; (uint8_t*)my_uart_rx_buffer_assigned,&lt;br /&gt; UART_RX_BUF_SIZE);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With this code, the&amp;nbsp;&lt;span&gt;m&lt;/span&gt;&lt;span&gt;y&lt;/span&gt;&lt;span&gt;_uarte_event_handler&amp;nbsp;is never called.&amp;nbsp; I&amp;#39;ve checked that the pin assignment is correct in the board file, and I&amp;#39;ve disabled flow control&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE can't receive data</title><link>https://devzone.nordicsemi.com/thread/195103?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 11:13:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8827b996-d6a9-4daa-8c8a-d0e40cb8e271</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you post the code you used for configuring UARTE, and setting up the transfers? I&amp;#39;m not sure what the purpose of the function&amp;nbsp;&lt;span&gt;nrfx_uarte_rx_ready() is in the driver, to me it seems that using this function only makes sense to use together with&amp;nbsp;nrfx_uart_rx_enable() in the legacy UART driver for polling UART.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>