<?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>In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38017/in-our-application-we-need-to-receive-data-from-two-uart-together</link><description>Dear Sir, we are developing an application on the nRF52840 kit with SDK 15.0.0. We are using Keil as compiler. In our application we need to receive data from two uart together. If we use only one uart the application work fine, but if we add the second</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Nov 2018 08:02:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38017/in-our-application-we-need-to-receive-data-from-two-uart-together" /><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/157877?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 08:02:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f0fd87f-1e4c-450d-ad48-c73d8990dbd4</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Andrea,&lt;/p&gt;
&lt;p&gt;I am very sorry for the delay.&lt;/p&gt;
&lt;p&gt;I will ping him and so we can proceed on the private case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/157829?ContentTypeID=1</link><pubDate>Sat, 17 Nov 2018 10:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:066d05dc-fce3-48c3-9bc7-1a76420c2641</guid><dc:creator>Andrea Pasotti</dc:creator><description>&lt;p&gt;Martin, the board is at you company.&lt;/p&gt;
&lt;p&gt;Jorgen started to work on it but suddenly disappeared.&lt;/p&gt;
&lt;p&gt;See private ticket&amp;nbsp;&lt;span&gt;Case ID: 215341.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Provide us with an update&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/156915?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 14:19:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5de46007-7bc2-42fb-92a2-78400e77fecc</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&lt;/p&gt;
&lt;p&gt;Please provide the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting" rel="noopener noreferrer" target="_blank"&gt;error log&lt;/a&gt;&amp;nbsp;and the pins that are &lt;strong&gt;not&lt;/strong&gt; marked with &amp;quot;&lt;span&gt;Standard drive, low frequency I/O only&amp;quot; are recommended for UART.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/152257?ContentTypeID=1</link><pubDate>Tue, 09 Oct 2018 15:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95ef0726-5530-49df-a295-92f93515f53e</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The nrf_serial_read function returns the timeout error .&lt;/p&gt;
&lt;p&gt;Which are the Pins recommended for use the UART ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/152239?ContentTypeID=1</link><pubDate>Tue, 09 Oct 2018 13:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4a60095-7a8c-432c-bddf-3ab5f36cdbb4</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;From what function are you getting this error code?&lt;/p&gt;
&lt;p&gt;also note that &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52840.ps%2Fpin.html&amp;amp;cp=2_0_0_6_0" rel="noopener noreferrer" target="_blank"&gt;p0.03 is not recommended for UART.&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-9cea5f2011eb43719506c1d164835d84/pastedimage1539093302287v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/151289?ContentTypeID=1</link><pubDate>Tue, 02 Oct 2018 16:29:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a88f38c2-b421-4bcb-9583-54f431b35b01</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I have modified the files in attached ( nrf_serial.h, nrf_serial.c and sdk_config.h ), to receive data from two uart together as in this llink.&lt;/p&gt;
&lt;p&gt;I have connected the kit so:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/two-serial-scheme-Rev01.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When the a serial not work, i receive the error code 0x0D.&lt;/p&gt;
&lt;p&gt;What do you think ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/150915?ContentTypeID=1</link><pubDate>Mon, 01 Oct 2018 09:36:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17e74dab-d6b4-44c0-87ee-f6ecc68203e4</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So if I understand correctly you have issues with the unmodified &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fserial_uartes_example.html&amp;amp;cp=4_0_0_4_5_36" rel="noopener noreferrer" target="_blank"&gt;Serial Port Library Example with two UARTEs&lt;/a&gt;&amp;quot; and your modified version?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(Remember how the unmodified example is supposed to work:)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-9cea5f2011eb43719506c1d164835d84/pastedimage1538386426470v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;How are you connected to the kit (physically)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;do you get any error codes or information when you&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;debug&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;span&gt;the application?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/150656?ContentTypeID=1</link><pubDate>Thu, 27 Sep 2018 10:04:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:969c2220-1d64-4151-8619-67bffc3cf336</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I have installed SDK 15.2 in my board and I have used the example project serial_uartes with SDK15.2. I begin by recieving data from the first uart and it works fine. When i beginning to receive data from second uart both the uart stop to work. &lt;br /&gt;In the example I modified only the receive and trasmision pins and the baude rate of one of the two uart (the first uart is 9600, the second 115200). I attached main.c file .&lt;br /&gt;Why doesn&amp;#39;t its work ?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Copyright (c) 2018, Nordic Semiconductor ASA
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stddef.h&amp;gt;

#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_drv_clock.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_drv_power.h&amp;quot;
#include &amp;quot;nrf_serial.h&amp;quot;
#include &amp;quot;app_timer.h&amp;quot;


#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;app_util.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

/** @file
 * @defgroup nrf_serial_uartes_example main.c
 * @{
 * @ingroup nrf_serial_uartes_example
 * @brief Example of @ref nrf_serial usage. Loopback example using two UARTE peripherals.
 *        Please short Arduino SCL and SDA GPIOs to start transmission.
 *
 */

#define OP_QUEUES_SIZE          3
#define APP_TIMER_PRESCALER     NRF_SERIAL_APP_TIMER_PRESCALER

static void sleep_handler(void)
{
    __WFE();
    __SEV();
    __WFE();
}

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config,
                      RX_PIN_NUMBER, TX_PIN_NUMBER,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_9600,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config,
                      3, 4,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_115200,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);


#define SERIAL_FIFO_TX_SIZE 32
#define SERIAL_FIFO_RX_SIZE 32

NRF_SERIAL_QUEUES_DEF(serial0_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);
NRF_SERIAL_QUEUES_DEF(serial1_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);


#define SERIAL_BUFF_TX_SIZE 1
#define SERIAL_BUFF_RX_SIZE 1

NRF_SERIAL_BUFFERS_DEF(serial0_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);
NRF_SERIAL_BUFFERS_DEF(serial1_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);


NRF_SERIAL_CONFIG_DEF(serial0_config, NRF_SERIAL_MODE_DMA,
                      &amp;amp;serial0_queues, &amp;amp;serial0_buffs, NULL, sleep_handler);
NRF_SERIAL_CONFIG_DEF(serial1_config, NRF_SERIAL_MODE_DMA,
                      &amp;amp;serial1_queues, &amp;amp;serial1_buffs, NULL, sleep_handler);


NRF_SERIAL_UART_DEF(serial0_uarte, 0);
NRF_SERIAL_UART_DEF(serial1_uarte, 1);


int main(void)
{
    ret_code_t ret;

    ret = nrf_drv_clock_init();
    APP_ERROR_CHECK(ret);
    ret = nrf_drv_power_init(NULL);
    APP_ERROR_CHECK(ret);

    nrf_drv_clock_lfclk_request(NULL);
    ret = app_timer_init();
    APP_ERROR_CHECK(ret);

    // Initialize LEDs and buttons.
    bsp_board_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS);

    ret = nrf_serial_init(&amp;amp;serial0_uarte, &amp;amp;m_uarte0_drv_config, &amp;amp;serial0_config);
    APP_ERROR_CHECK(ret);

    ret = nrf_serial_init(&amp;amp;serial1_uarte, &amp;amp;m_uarte1_drv_config, &amp;amp;serial1_config);
    APP_ERROR_CHECK(ret);

	char	tmp_buff_send [ 10 ] = { 0x50 , 0x00 , 0x05 , 0x23 , 0x04 , 0x64 , 0x03 , 0x01 , 0x00 , 0x14 } ;
	
	// Attivo la funzione autolistcard
	( void ) nrf_serial_write ( &amp;amp;serial1_uarte , &amp;amp;tmp_buff_send , 10 , NULL , 100 ) ;

    static char tx_message [ ] = &amp;quot;Hello nrf_serial!\n\r&amp;quot; ;

    ret = nrf_serial_write ( &amp;amp;serial0_uarte ,
                           tx_message ,
                           strlen ( tx_message ) ,
                           NULL ,
                           NRF_SERIAL_MAX_TIMEOUT ) ;
		
    ( void ) nrf_serial_flush ( &amp;amp;serial0_uarte , 0 ) ; 

    while (true)
    {
        char c;
        ret = nrf_serial_read(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 1);
			
        if (ret != NRF_SUCCESS)
        {
            continue;
        }
				
        (void)nrf_serial_write(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial0_uarte, 0);

        ret = nrf_serial_read(&amp;amp;serial1_uarte, &amp;amp;c, sizeof(c), NULL, 1);
				
        if (ret != NRF_SUCCESS)
        {
            continue;
        }
				
        (void)nrf_serial_write(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial1_uarte, 0);
				
    }
		
}

/** @} */
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/150020?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a21a63c-93a9-4aae-8d03-a4cea329271c</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&lt;/p&gt;
&lt;p&gt;When I compare your code to the one in&amp;nbsp;&lt;em&gt;examples\peripheral\serial_uartes\&amp;nbsp;&lt;/em&gt;in &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/" rel="noopener noreferrer" target="_blank"&gt;SDK15.2&lt;/a&gt;, I can see that you have some different naming for the functions with&amp;nbsp;&lt;em&gt;serial1_uarte&lt;/em&gt; vs. &lt;em&gt;serial0 _uarte.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(line 177-178)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please test and verify that the&amp;nbsp;&lt;em&gt;examples\peripheral\serial_uartes\&amp;nbsp;&lt;/em&gt;&lt;span&gt;in&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/" rel="noopener noreferrer" target="_blank"&gt;SDK15.2&lt;/a&gt;&amp;nbsp;runs on your board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/150019?ContentTypeID=1</link><pubDate>Mon, 24 Sep 2018 11:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fef268f-d752-409e-a3e7-b91ea2723a2f</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&lt;/p&gt;
&lt;p&gt;When I compare your code to the one in&amp;nbsp;&lt;em&gt;examples\peripheral\serial_uartes\&amp;nbsp;&lt;/em&gt;in &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/" rel="noopener noreferrer" target="_blank"&gt;SDK15.2&lt;/a&gt;, I can see that you have some different naming for the functions with&amp;nbsp;&lt;em&gt;serial1_uarte&lt;/em&gt; vs. &lt;em&gt;serial0 _uarte.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;(line 177-178)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please test and verify that the&amp;nbsp;&lt;em&gt;examples\peripheral\serial_uartes\&amp;nbsp;&lt;/em&gt;&lt;span&gt;in&amp;nbsp;&lt;/span&gt;&lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/" rel="noopener noreferrer" target="_blank"&gt;SDK15.2&lt;/a&gt;&amp;nbsp;runs on your board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/149492?ContentTypeID=1</link><pubDate>Wed, 19 Sep 2018 15:12:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a90a13da-4526-4433-b443-7e9c7d7c8584</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have modified the code as you suggested me, but in this way both uarts don&amp;#39;t works. There is another test can I do ?&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Copyright (c) 2018, Nordic Semiconductor ASA
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stddef.h&amp;gt;

#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_drv_clock.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_drv_power.h&amp;quot;
#include &amp;quot;nrf_serial.h&amp;quot;
#include &amp;quot;app_timer.h&amp;quot;


#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;app_util.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

/** @file
 * @defgroup nrf_serial_uartes_example main.c
 * @{
 * @ingroup nrf_serial_uartes_example
 * @brief Example of @ref nrf_serial usage. Loopback example using two UARTE peripherals.
 *        Please short Arduino SCL and SDA GPIOs to start transmission.
 *
 */

#define OP_QUEUES_SIZE          3
#define APP_TIMER_PRESCALER     NRF_SERIAL_APP_TIMER_PRESCALER

static void sleep_handler(void)
{
    __WFE();
    __SEV();
    __WFE();
}

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config,
                      RX_PIN_NUMBER, TX_PIN_NUMBER,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_9600,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config,
                      3, 4,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_115200,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);


#define SERIAL_FIFO_TX_SIZE 32
#define SERIAL_FIFO_RX_SIZE 32

NRF_SERIAL_QUEUES_DEF(serial0_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);
NRF_SERIAL_QUEUES_DEF(serial1_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);


#define SERIAL_BUFF_TX_SIZE 1
#define SERIAL_BUFF_RX_SIZE 1

NRF_SERIAL_BUFFERS_DEF(serial0_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);
NRF_SERIAL_BUFFERS_DEF(serial1_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);


NRF_SERIAL_CONFIG_DEF(serial0_config, NRF_SERIAL_MODE_DMA,
                      &amp;amp;serial0_queues, &amp;amp;serial0_buffs, NULL, sleep_handler);
NRF_SERIAL_CONFIG_DEF(serial1_config, NRF_SERIAL_MODE_DMA,
                      &amp;amp;serial1_queues, &amp;amp;serial1_buffs, NULL, sleep_handler);

//NRF_SERIAL_CONFIG_DEF(serial0_config, NRF_SERIAL_MODE_POLLING,
//                      NULL, NULL, NULL, NULL);
//NRF_SERIAL_CONFIG_DEF(serial1_config, NRF_SERIAL_MODE_POLLING,
//                      NULL, NULL, NULL, NULL);


NRF_SERIAL_UART_DEF(serial0_uarte, 0);
NRF_SERIAL_UART_DEF(serial1_uarte, 1);


int main(void)
{
    ret_code_t ret;

    ret = nrf_drv_clock_init();
    APP_ERROR_CHECK(ret);
    ret = nrf_drv_power_init(NULL);
    APP_ERROR_CHECK(ret);

    nrf_drv_clock_lfclk_request(NULL);
    ret = app_timer_init();
    APP_ERROR_CHECK(ret);

    // Initialize LEDs and buttons.
    bsp_board_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS);

    ret = nrf_serial_init(&amp;amp;serial0_uarte, &amp;amp;m_uarte0_drv_config, &amp;amp;serial0_config);
    APP_ERROR_CHECK(ret);

    ret = nrf_serial_init(&amp;amp;serial1_uarte, &amp;amp;m_uarte1_drv_config, &amp;amp;serial1_config);
    APP_ERROR_CHECK(ret);
	
		char	tmp_buff_send [ 10 ] = { 0x50 , 0x00 , 0x05 , 0x23 , 0x04 , 0x64 , 0x03 , 0x01 , 0x00 , 0x14 } ;
		
		// Attivo la funzione autolistcard
		( void ) nrf_serial_write ( &amp;amp;serial1_uarte , &amp;amp;tmp_buff_send , 10 , NULL , 100 ) ;

    static char tx_message[] = &amp;quot;Hello nrf_serial!\n\r&amp;quot;;

    ret = nrf_serial_write(&amp;amp;serial0_uarte,
                           tx_message,
                           strlen(tx_message),
                           NULL,
                           NRF_SERIAL_MAX_TIMEOUT);
    (void)nrf_serial_flush(&amp;amp;serial0_uarte, 0);

    while (true)
    {
        char c;
        ret = nrf_serial_read(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 1);
			
        while (ret != NRF_SUCCESS)
        {
            continue;
        }

        (void)nrf_serial_write(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial0_uarte, 0);

        ret = nrf_serial_read(&amp;amp;serial1_uarte, &amp;amp;c, sizeof(c), NULL, 1);
				
        while (ret != NRF_SUCCESS)
        {
            continue;
        }
        (void)nrf_serial_write(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial1_uarte, 0);
    }
}

/** @} */
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/149391?ContentTypeID=1</link><pubDate>Wed, 19 Sep 2018 10:38:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a8e4354-1dea-4f33-8138-dd10929f561c</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&lt;/p&gt;
&lt;p&gt;Could you try to change:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; if (ret != NRF_SUCCESS)
        {
            continue;
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;while(ret != NRF_SUCCESS)
        {
            continue;
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in your &lt;em&gt;main.c&lt;/em&gt; instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/148744?ContentTypeID=1</link><pubDate>Fri, 14 Sep 2018 08:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab753b2b-434a-468f-afb6-1d6daf6dc3aa</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Hello, anyone can i help me ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/147631?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 14:29:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcccf8d7-5b9c-4321-a561-96103df81f33</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;I have used the example project serial_uartes with SDK15.1. I begin by recieving data from the first uart and it works fine. When i beginning to receive data from second uart both the uart stop to work. Whit this new library the conditions are changed, before (SDK 15.0) after a random time, one of the two uart stops to work but random, now (SDK 15.1) whe the data come to the second uart both stop to work.&lt;br /&gt;In the example I modified only the receive and trasmision pins and the baude rate of one of the two uart (the first uart is 9600, the second 115200).&lt;br /&gt;What do you think?&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Copyright (c) 2018, Nordic Semiconductor ASA
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 *
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 *
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 *
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stddef.h&amp;gt;

#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_drv_clock.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_drv_power.h&amp;quot;
#include &amp;quot;nrf_serial.h&amp;quot;
#include &amp;quot;app_timer.h&amp;quot;


#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;app_util.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

/** @file
 * @defgroup nrf_serial_uartes_example main.c
 * @{
 * @ingroup nrf_serial_uartes_example
 * @brief Example of @ref nrf_serial usage. Loopback example using two UARTE peripherals.
 *        Please short Arduino SCL and SDA GPIOs to start transmission.
 *
 */

#define OP_QUEUES_SIZE          3
#define APP_TIMER_PRESCALER     NRF_SERIAL_APP_TIMER_PRESCALER

static void sleep_handler(void)
{
    __WFE();
    __SEV();
    __WFE();
}

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte0_drv_config,
                      RX_PIN_NUMBER, TX_PIN_NUMBER,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_9600,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config,
                      3, 4,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_115200,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);


#define SERIAL_FIFO_TX_SIZE 32
#define SERIAL_FIFO_RX_SIZE 32

NRF_SERIAL_QUEUES_DEF(serial0_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);
NRF_SERIAL_QUEUES_DEF(serial1_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);


#define SERIAL_BUFF_TX_SIZE 1
#define SERIAL_BUFF_RX_SIZE 1

NRF_SERIAL_BUFFERS_DEF(serial0_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);
NRF_SERIAL_BUFFERS_DEF(serial1_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);


NRF_SERIAL_CONFIG_DEF(serial0_config, NRF_SERIAL_MODE_DMA,
                      &amp;amp;serial0_queues, &amp;amp;serial0_buffs, NULL, sleep_handler);
NRF_SERIAL_CONFIG_DEF(serial1_config, NRF_SERIAL_MODE_DMA,
                      &amp;amp;serial1_queues, &amp;amp;serial1_buffs, NULL, sleep_handler);


NRF_SERIAL_UART_DEF(serial0_uarte, 0);
NRF_SERIAL_UART_DEF(serial1_uarte, 1);


int main(void)
{
    ret_code_t ret;

    ret = nrf_drv_clock_init();
    APP_ERROR_CHECK(ret);
    ret = nrf_drv_power_init(NULL);
    APP_ERROR_CHECK(ret);

    nrf_drv_clock_lfclk_request(NULL);
    ret = app_timer_init();
    APP_ERROR_CHECK(ret);

    // Initialize LEDs and buttons.
    bsp_board_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS);

    ret = nrf_serial_init(&amp;amp;serial0_uarte, &amp;amp;m_uarte0_drv_config, &amp;amp;serial0_config);
    APP_ERROR_CHECK(ret);

    ret = nrf_serial_init(&amp;amp;serial1_uarte, &amp;amp;m_uarte1_drv_config, &amp;amp;serial1_config);
    APP_ERROR_CHECK(ret);
	
		char	tmp_buff_send [ 10 ] = { 0x50 , 0x00 , 0x05 , 0x23 , 0x04 , 0x64 , 0x03 , 0x01 , 0x00 , 0x14 } ;
		
		// Attivo la funzione autolistcard
		( void ) nrf_serial_write ( &amp;amp;serial1_uarte , &amp;amp;tmp_buff_send , 10 , NULL , 100 ) ;

    static char tx_message[] = &amp;quot;Hello nrf_serial!\n\r&amp;quot;;

    ret = nrf_serial_write(&amp;amp;serial0_uarte,
                           tx_message,
                           strlen(tx_message),
                           NULL,
                           NRF_SERIAL_MAX_TIMEOUT);
    (void)nrf_serial_flush(&amp;amp;serial1_uarte, 0);

    while (true)
    {
        char c;
        ret = nrf_serial_read(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 1);
        if (ret != NRF_SUCCESS)
        {
            continue;
        }
        (void)nrf_serial_write(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial0_uarte, 0);

        ret = nrf_serial_read(&amp;amp;serial1_uarte, &amp;amp;c, sizeof(c), NULL, 1);
        if (ret != NRF_SUCCESS)
        {
            continue;
        }
        (void)nrf_serial_write(&amp;amp;serial0_uarte, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial1_uarte, 0);
    }
}

/** @} */
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/147544?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 10:10:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c549258-44f7-4951-a13b-1bcde9a6986d</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Your source basically doesn&amp;#39;t work on my PC.&lt;/p&gt;
&lt;p&gt;May you please check our example? Please download SDK15.1 link:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/eng/nordic/Products/nRF52832/nRF5-SDK-zip/59012"&gt;https://www.nordicsemi.com/eng/nordic/Products/nRF52832/nRF5-SDK-zip/59012&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And run example:&amp;nbsp;examples\peripheral\serial_uartes\&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This example is (I hope) what you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/147276?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 06:56:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51660837-f5a0-4943-aa2f-26ebeb88ffcb</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Do you have an idea ? Please, help us we have a big problem to continue the development of the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146808?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 14:29:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8db684b0-fb81-49e9-8176-de1cde043756</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;gt;Also, do you get any error codes or information when you debug the application?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;No, I don&amp;#39;t have any error codes when I debug the application. The nrf_serial_read returns the error code 0x0D (timeout).&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Another thingh I found by testing the device, if I reduce the RX buffer (for example 32) the problem happens quickly, otherwise if I increase the buffer (for example 128) the problem hapens later. It seems depending by the RX buffer.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Another information, the baudrate of the two uart are different, one is 9600, the other is 115200.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Any idea?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146806?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 14:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88bf6d90-59ee-4ff6-8062-c87e151ae6d7</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;&amp;gt;Also, do you get any error codes or information when you debug the application?&lt;br /&gt;No, I don&amp;#39;t have any error codes when I debug the application. The nrf_serial_read returns the error code 0x0D (timeout).&lt;br /&gt;Another thingh I found by testing the device, if I reduce the RX buffer (for example 32) the problem happens quickly, otherwise if I increase the buffer (for example 128) the problem hapens later. It seems depending by the RX buffer.&lt;br /&gt;Another information, the baudrate of the two uart are different, one is 9600, the other is 115200.&lt;br /&gt;Any idea?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146781?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 12:48:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0b28245-d764-4f66-8ef3-85e8912b8ce3</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Yes&amp;nbsp;I have also replaced the files.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146780?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 12:46:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f990bde3-d884-4f3d-9eb9-dd553daa6526</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Yes i have also replaced the files (main.c, sdk_config, nfr_serial.c,nrf_serial.h).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146758?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 12:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8fc97f1-96bc-4ce5-a3d7-49a96406daf4</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&lt;/p&gt;
&lt;p&gt;You did replace the files suggested in the thread as well?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE for SDK15 users:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order to make it work you need to replace:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;main.c&lt;/li&gt;
&lt;li&gt;sdk_config&lt;/li&gt;
&lt;li&gt;nrf_serial.c&lt;/li&gt;
&lt;li&gt;nrf_serial.h&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, do you get any error codes or information when you &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;debug &lt;/a&gt;the application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146689?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 09:14:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fac7b978-a413-4ea2-b85e-28158b6fa12b</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Good morning,&lt;/p&gt;
&lt;p&gt;I saw link you sent me :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/25173/nrf52840-uart1-not-working-in-sdk-14#post-id-168360"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/25173/nrf52840-uart1-not-working-in-sdk-14#post-id-168360&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I followed the indications but the problem it&amp;#39;s not solved. I recieve data from both the uart and after a random time interval, one uart stops to receive.&lt;br /&gt;I think there is a bug in the uart library because the firmare I wrote to test it is very very easy but the problem happen again.&lt;br /&gt;Attached the test code.&lt;br /&gt;Please, help us we have a big problem to continue the development of the application.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Copyright (c) 2016 - 2018, Nordic Semiconductor ASA
 * 
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 * 
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 
 * 2. Redistributions in binary form, except as embedded into a Nordic
 *    Semiconductor ASA integrated circuit in a product or a software update for
 *    such product, must reproduce the above copyright notice, this list of
 *    conditions and the following disclaimer in the documentation and/or other
 *    materials provided with the distribution.
 * 
 * 3. Neither the name of Nordic Semiconductor ASA nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 * 
 // GM
 
 * 4. This software, with or without modification, must only be used with a
 *    Nordic Semiconductor ASA integrated circuit.
 * 
 * 5. Any software provided in binary form under this license must not be reverse
 *    engineered, decompiled, modified and/or disassembled.
 * 
 * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS
 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 */
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stddef.h&amp;gt;

#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_drv_clock.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_drv_power.h&amp;quot;
#include &amp;quot;nrf_serial.h&amp;quot;
#include &amp;quot;app_timer.h&amp;quot;


#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;app_util.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

/** @file
 * @defgroup nrf_serial_example main.c
 * @{
 * @ingroup nrf_serial_example
 * @brief Example of @ref nrf_serial usage. Simple loopback.
 *
 */

#define OP_QUEUES_SIZE          3
#define APP_TIMER_PRESCALER     NRF_SERIAL_APP_TIMER_PRESCALER

static void sleep_handler(void)
{
    __WFE();
    __SEV();
    __WFE();
}

NRF_SERIAL_DRV_UART_CONFIG_DEF ( m_uart0_drv_config,
                      RX_PIN_NUMBER, TX_PIN_NUMBER,
                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,
                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,
                      NRF_UART_BAUDRATE_9600,
											UART_DEFAULT_CONFIG_IRQ_PRIORITY ) ;

NRF_SERIAL_DRV_UART_CONFIG_DEF ( m_serial_uart_badge_reading_drv_config ,
                      3 , 4 ,	// Rx pin = P0.03 -- Tx pin = P0.04
                      RTS_PIN_NUMBER , CTS_PIN_NUMBER ,
                      NRF_UART_HWFC_DISABLED , NRF_UART_PARITY_EXCLUDED ,
                      NRF_UART_BAUDRATE_115200 ,
                      UART_DEFAULT_CONFIG_IRQ_PRIORITY ) ; 

#define SERIAL_FIFO_TX_SIZE 64
#define SERIAL_FIFO_RX_SIZE 128

NRF_SERIAL_QUEUES_DEF(serial_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);

NRF_SERIAL_QUEUES_DEF ( serial_uart_badge_reading_queues , SERIAL_FIFO_TX_SIZE , SERIAL_FIFO_RX_SIZE ) ;

#define SERIAL_BUFF_TX_SIZE 1
#define SERIAL_BUFF_RX_SIZE 1

NRF_SERIAL_BUFFERS_DEF(serial_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);

// Configuro i buffer delle seriali	
NRF_SERIAL_BUFFERS_DEF ( serial_uart_badge_reading_buffs , SERIAL_BUFF_TX_SIZE , SERIAL_BUFF_RX_SIZE ) ;

NRF_SERIAL_CONFIG_DEF(serial_config, NRF_SERIAL_MODE_IRQ,
                      &amp;amp;serial_queues, &amp;amp;serial_buffs, NULL, sleep_handler);
											
											// Configuro le seriali											
NRF_SERIAL_CONFIG_DEF ( serial_uart_badge_reading_config , NRF_SERIAL_MODE_IRQ ,
                        &amp;amp;serial_uart_badge_reading_queues , &amp;amp;serial_uart_badge_reading_buffs , NULL , sleep_handler ) ;	// sostituito NULL ( il secondo ) a sleep_handler		

//NRF_SERIAL_CONFIG_DEF(serial_config, NRF_SERIAL_MODE_POLLING,
//                      NULL, NULL, NULL, NULL);
//NRF_SERIAL_CONFIG_DEF(serial_uart_badge_reading_config, NRF_SERIAL_MODE_POLLING,
//                      NULL, NULL, NULL, NULL);
										
NRF_SERIAL_UART_DEF ( serial_uart , 0 ) ;

NRF_SERIAL_UART_DEF ( serial_uart_badge_reading , 1 ) ;

char	buff_received_uart_badge [ 30 ] = &amp;quot;&amp;quot; ;
char	tmp_buff_debug  [ 50 ] = &amp;quot;&amp;quot; ;
char	UID_badge [ 10 ] = &amp;quot;&amp;quot; ;

int main(void)
{	
		ret_code_t ret;

    ret = nrf_drv_clock_init();
    APP_ERROR_CHECK(ret);
    ret = nrf_drv_power_init(NULL);
    APP_ERROR_CHECK(ret);

    nrf_drv_clock_lfclk_request(NULL);
    ret = app_timer_init();
    APP_ERROR_CHECK(ret);

    // Initialize LEDs and buttons.
    bsp_board_init(BSP_INIT_LEDS | BSP_INIT_BUTTONS);

    ret = nrf_serial_init(&amp;amp;serial_uart, &amp;amp;m_uart0_drv_config, &amp;amp;serial_config);
		APP_ERROR_CHECK(ret);
	
		// Inizializzo la seriale 	
		ret = nrf_serial_init ( &amp;amp;serial_uart_badge_reading , &amp;amp;m_serial_uart_badge_reading_drv_config , &amp;amp;serial_uart_badge_reading_config ) ;
		APP_ERROR_CHECK(ret);
	
    static char tx_message[] = &amp;quot;Hello nrf_serial 2!\n\r&amp;quot;;

    ret = nrf_serial_write(&amp;amp;serial_uart,
                           tx_message,
                           strlen(tx_message),
                           NULL,
                           NRF_SERIAL_MAX_TIMEOUT);
													 
    APP_ERROR_CHECK(ret);	
		
		char	tmp_buff_send [ 10 ] = { 0x50 , 0x00 , 0x05 , 0x23 , 0x04 , 0x64 , 0x03 , 0x01 , 0x00 , 0x14 } ;
		
		// Attivo la funzione autolistcard
		( void ) nrf_serial_write ( &amp;amp;serial_uart_badge_reading , &amp;amp;tmp_buff_send , 10 , NULL , 100 ) ;

		ret_code_t ret_loop ;
		
		while (true)
		{		
				/********************* Serial 1. *********************
				*/
				
				char c ;
						
				ret_loop = nrf_serial_read ( &amp;amp;serial_uart , &amp;amp;c , sizeof ( c ) , NULL , 1 ) ;        			
				
				if ( ret_loop != NRF_SUCCESS )
					;
				else
				{
					( void ) nrf_serial_write ( &amp;amp;serial_uart , &amp;quot;y&amp;quot; , 1 , NULL , 0 ) ;
					( void ) nrf_serial_flush ( &amp;amp;serial_uart , 0 ) ;					
					
				}
				
				/********************* Serial 2. *********************
				*/
							
				ret_loop = nrf_serial_read ( &amp;amp;serial_uart_badge_reading , &amp;amp;c , sizeof ( c ) , NULL , 1 ) ;
			
				if ( ret_loop != NRF_SUCCESS )
					;
				else
				{								
					( void ) nrf_serial_write ( &amp;amp;serial_uart , &amp;quot;x&amp;quot; , 1 , NULL , 0 ) ;
					( void ) nrf_serial_flush ( &amp;amp;serial_uart_badge_reading , 0 ) ;
					
				}		

//				nrf_serial_rx_drain ( &amp;amp;serial_uart ) ;

//				nrf_serial_rx_drain ( &amp;amp;serial_uart_badge_reading ) ;				
								
		}
		
}

/** @} */
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146613?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 06:58:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f0e356b-f1f2-40ca-9623-16124ba6478d</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Gianmarco,&lt;/p&gt;
&lt;p&gt;Please have a look at&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/question/168233/nrf52840-uart1-not-working-in-sdk-14/?answer=168360#post-id-168360"&gt;this answer&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146577?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 16:34:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac44132e-cecb-4929-a5ad-31b182392f0c</guid><dc:creator>Gianmarco Scarpelli</dc:creator><description>&lt;p&gt;Thanks for the response !!! But i don&amp;#39;t use the&amp;nbsp;&lt;span&gt;NRF_LOG.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In our application we need to receive data from two uart together</title><link>https://devzone.nordicsemi.com/thread/146569?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 16:20:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82c01556-8b7a-401a-959f-7f104acb435c</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;NRF_LOG may consume one of the UARTs. Try switching to Segger RTT logging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>