<?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>nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65138/nrf52840-dongle-uart</link><description>Hello, 
 I use the Blinky example from the SDK. Now I would like to implement an UART on the nRF52840 Dongle. But the program always stops at either nrf_drv_uart_rx or nrf_drv_uart_tx. Can anyone help me with that? 
 Thanks in advance!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Sep 2020 16:18:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65138/nrf52840-dongle-uart" /><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/269723?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2020 16:18:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3004e86d-e763-4732-9f02-e1cfb349c664</guid><dc:creator>luca brandt</dc:creator><description>&lt;p&gt;Cool that works! I only had to change these two variables in the config file.&lt;/p&gt;
&lt;p&gt;Thanks a lot! That&amp;#39;s awesome.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/269367?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 12:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d77eae86-b6e6-41a8-9269-386bc23912ea</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I got your file from the message.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;First of all, you have a few redefined definitions. LED_3, LED_4. You should make sure that defines like these only have one value. They are already defined in pca10056.h.&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t compile the project, because there are a lot of undefined variables and functions. I guess you have some custom files outside the project folder, or that you changed some of the default files in the SDK. Try to compile your project in a new unzipped, unmodified SDK, and you will see.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, your project uses the UART as a log backend, so you can&amp;#39;t use it in the application. If you need the UART in addition to logging, you need to disable the log, or change to RTT backend.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suggest that you change to the following in sdk_config.h:&lt;/p&gt;
&lt;p&gt;#define&amp;nbsp;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0&lt;br /&gt;#define&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED 0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/269322?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2020 09:31:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0802301-eb19-48e4-8e6c-2f0718084092</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What SDK version do you use, by the way?&lt;/p&gt;
&lt;p&gt;Is it possible to send the project, so that I can try to reproduce it?&lt;/p&gt;
&lt;p&gt;I guess it comes from nrfx_uarte_init() -&amp;gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfx_err_t nrfx_uarte_init(nrfx_uarte_t const *        p_instance,
                           nrfx_uarte_config_t const * p_config,
                           nrfx_uarte_event_handler_t  event_handler)
{
    NRFX_ASSERT(p_config);
    uarte_control_block_t * p_cb = &amp;amp;m_cb[p_instance-&amp;gt;drv_inst_idx];
    nrfx_err_t err_code = NRFX_SUCCESS;

    if (p_cb-&amp;gt;state != NRFX_DRV_STATE_UNINITIALIZED)
    {
        err_code = NRFX_ERROR_INVALID_STATE;
        NRFX_LOG_WARNING(&amp;quot;Function: %s, error code: %s.&amp;quot;,
                         __func__,
                         NRFX_LOG_ERROR_STRING_GET(err_code));
        return err_code;
    }

#if NRFX_CHECK(NRFX_PRS_ENABLED)
    static nrfx_irq_handler_t const irq_handlers[NRFX_UARTE_ENABLED_COUNT] = {
        #if NRFX_CHECK(NRFX_UARTE0_ENABLED)
        nrfx_uarte_0_irq_handler,
        #endif
        #if NRFX_CHECK(NRFX_UARTE1_ENABLED)
        nrfx_uarte_1_irq_handler,
        #endif
        #if NRFX_CHECK(NRFX_UARTE2_ENABLED)
        nrfx_uarte_2_irq_handler,
        #endif
        #if NRFX_CHECK(NRFX_UARTE3_ENABLED)
        nrfx_uarte_3_irq_handler,
        #endif
    };
    if (nrfx_prs_acquire(p_instance-&amp;gt;p_reg,
            irq_handlers[p_instance-&amp;gt;drv_inst_idx]) != NRFX_SUCCESS)
    {
        err_code = NRFX_ERROR_BUSY;
        NRFX_LOG_WARNING(&amp;quot;Function: %s, error code: %s.&amp;quot;,
                         __func__,
                         NRFX_LOG_ERROR_STRING_GET(err_code));
        return err_code;        // &amp;lt;-- This line
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Out of curiousity:&lt;/p&gt;
&lt;p&gt;Do you (try to) use logging? Can you send me your sdk_config.h file? What is NRF_LOG_ENABLED and&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED defined as, if they are present?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/269151?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 11:42:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:228b4415-36dd-4923-80cd-3f6e5905be1a</guid><dc:creator>lucaN</dc:creator><description>&lt;p&gt;I did some debugging now on the nRF52840 DK&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
uint8_t rx_buffer[1];
uint8_t tx_buffer[1];

nrf_drv_uart_t app_uart_inst = NRF_DRV_UART_INSTANCE(0);


uint32_t rm_uart_put(uint8_t c);
uint32_t rm_uart_get();

void rm_uart_init() 
{
    nrf_drv_uart_config_t cfg = NRF_DRV_UART_DEFAULT_CONFIG;

    cfg.baudrate              = UART_BAUDRATE_BAUDRATE_Baud115200;
    cfg.hwfc                  = NRF_UART_HWFC_DISABLED;
    cfg.pselrxd               = 26; // 29
    cfg.pseltxd               = 27; // 31
    cfg.use_easy_dma          = false;
 
    ret_code_t err_code;
    //err_code = nrfx_uart_init(&amp;amp;app_uart_inst, &amp;amp;cfg, NULL);
    err_code = nrf_drv_uart_init(&amp;amp;app_uart_inst, &amp;amp;cfg, 0); //Original
    APP_ERROR_CHECK(err_code);
}

void rm_uart_handle()
{
    uint32_t err_code;
    uint8_t send = 0;
    uint8_t recive = 1;

    err_code = rm_uart_put(send);

    recive = rm_uart_get();
}


uint32_t rm_uart_put(uint8_t c) 
{
    ret_code_t err_code;
    tx_buffer[0] = c;

    err_code = nrf_drv_uart_tx(&amp;amp;app_uart_inst, tx_buffer, 1);
    APP_ERROR_CHECK(err_code);
}

uint32_t rm_uart_get(void) 
{
    ret_code_t err_code;

    err_code = nrf_drv_uart_rx(&amp;amp;app_uart_inst, rx_buffer, 1);
    APP_ERROR_CHECK(err_code);

    return *rx_buffer;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That is&amp;nbsp;the error I get from putting the breakpoint to error_info from the APP_ERROR_CHECK() after the nrf_drv_uart_init function:&lt;/p&gt;
&lt;p&gt;void app_error_handler_bare(unsigned int error_code=0x00000011)&lt;/p&gt;
&lt;p&gt;In the infocenter it says that the error 0x11 is: The length of one or more input arguments was&amp;nbsp;invalid. The first input argument contains:&lt;/p&gt;
&lt;p&gt;app_uart_inst = {inst_idx=x00, uarte={p_reg=0x40002000, drv_inst_idx=0x00}, uart={p_reg=40002000, drv_inst_idx=0x00}}&lt;/p&gt;
&lt;p&gt;When I comment out that line&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    cfg.use_easy_dma          = false;
&lt;/pre&gt;, I get a 0x08 error instead. I don&amp;#39;t if that means anything because I still don&amp;#39;t really know what to do with all that.&lt;/p&gt;
&lt;p&gt;The UART Pins are not connected yet and advertising and BLE stuff is commented out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267787?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 09:37:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38bb796c-a955-4613-924f-278ad404dc81</guid><dc:creator>lucaN</dc:creator><description>&lt;p&gt;Alright. I&amp;nbsp;ordered&amp;nbsp;one. Thank you for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267782?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 09:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a642b42-c50b-4873-ba24-8d9f7622b6fd</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, I just wanted to make 100% sure that you didn&amp;#39;t think the pins were routed through the USB port (like it is on the DK). Then I am afraid you need to debug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267781?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 09:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f277e488-7df2-4af8-ae24-3c89f08dc15c</guid><dc:creator>lucaN</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Dongle.jpeg" /&gt;&lt;/p&gt;
&lt;p&gt;This is the set up. Voltage is provided&amp;nbsp;by&amp;nbsp;USB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267761?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 08:11:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:604f3c3e-9220-4d5e-8d84-0892aeb0a7c8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;[quote user="lucaN"][/quote]&lt;/p&gt;
&lt;p&gt;I connected two things to the UART.&lt;/p&gt;
&lt;p&gt;1) Rx and Tx to computer. send/recvice in PuTTY.&lt;/p&gt;
&lt;p&gt;2) The Rx and Tx Pins on the Dongle connected. So I would receive on the Dongle, what I sent from the Dongle.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1) How? Do you have some external UART-&amp;gt;USB bridge? Can you show me a picture of how these are connected?&lt;/p&gt;
&lt;p&gt;2) I am not sure that would work the way you are using it, with a blocking rx call.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You need to debug this. To do so, you need either an external debugger, or a DK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267745?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 07:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff00ce7e-f72b-403a-83f2-184557ceb59d</guid><dc:creator>lucaN</dc:creator><description>&lt;p&gt;Yes, I am using the Softdevice 140.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The code stops at either of these functions, nrf_drv_uart_tx and nrf_drv_uart_rx. I tried them individually.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is the code I am using.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
uint8_t rx_buffer[1];
uint8_t tx_buffer[1];

nrf_drv_uart_t app_uart_inst = NRF_DRV_UART_INSTANCE(0);


void rm_uart_put(uint8_t c);
uint8_t rm_uart_get();

void rm_uart_init() 
{
    nrf_drv_uart_config_t cfg = NRF_DRV_UART_DEFAULT_CONFIG;

    cfg.baudrate              = UART_BAUDRATE_BAUDRATE_Baud115200;
    cfg.hwfc                  = NRF_UART_HWFC_DISABLED;
    cfg.pselrxd               = 29; 
    cfg.pseltxd               = 31;
    cfg.use_easy_dma          = 0;
    
    ret_code_t ret;
    nrf_drv_uart_init(&amp;amp;app_uart_inst, &amp;amp;cfg, NULL);
}

void rm_uart_handle() 
{
    uint32_t err_code;
    uint8_t send = 0;
    uint8_t recive = 1;

    bsp_board_led_on(ADVERTISING_LED);
    rm_uart_put(send);
    nrf_delay_ms(1000);
    bsp_board_led_off(ADVERTISING_LED);
    nrf_delay_ms(1000);

    bsp_board_led_on(ADVERTISING_LED);
    recive = rm_uart_get();
    nrf_delay_ms(1000);
    bsp_board_led_off(ADVERTISING_LED);
}


void rm_uart_put(uint8_t c) 
{
    uint32_t err_code;
    tx_buffer[0] = c;

    nrf_drv_uart_tx(&amp;amp;app_uart_inst, tx_buffer, 1); 
}

uint8_t rm_uart_get(void) 
{
    ret_code_t err_code;

    nrf_drv_uart_rx(&amp;amp;app_uart_inst, rx_buffer, 1);
    

    return *rx_buffer;
}&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I connected two things to the UART.&lt;/p&gt;
&lt;p&gt;1) Rx and Tx to computer. send/recvice in PuTTY.&lt;/p&gt;
&lt;p&gt;2) The Rx and Tx Pins on the Dongle connected. So I would receive on the Dongle, what I sent from the Dongle.&amp;nbsp;&lt;/p&gt;
&lt;div class="lmt dl_top_element--wide lmt--web lmt--has_formality lmt--has_glossary lmt--medium_text lmt--showing_alternatives" id="dl_translator"&gt;
&lt;div class="lmt__sides_container"&gt;
&lt;div class="lmt__side_container lmt__side_container--target"&gt;
&lt;div class="lmt__textarea_container"&gt;
&lt;div class="lmt__translations_as_text"&gt;
&lt;p class="lmt__translations_as_text__item"&gt;However, both did not work.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267617?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 11:49:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffcca82d-05da-42f8-a57c-c3f587aeaf6d</guid><dc:creator>Edvin</dc:creator><description>[quote user="luca brandt"] I was wondering how you can use a program written for the DK(pca10056) with the Dongle(pca10059)[/quote]
&lt;p&gt;&amp;nbsp;Yes, it is described in the link I provided in the previous reply. Did you see the section &amp;quot;Adapt a BLE example (&lt;em&gt;with&lt;/em&gt; Softdevice) and program it using nRF Connect Programmer&amp;quot;? since you mention BLE, I assume your application uses a softdevice? Can you confirm this, please?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="luca brandt"]They use different SDKs.[/quote]
&lt;p&gt;&amp;nbsp;They do not.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you check whether it is nrf_drv_uart_tx or nrf_drv_uart_rx that casued the issue? Have you tried to turn the LED of between the two? In what state is the led stuck then?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="luca brandt"]Now, I would like to send and recive data over UART as&amp;nbsp;simple as possible. [/quote]
&lt;p&gt;&amp;nbsp;How did you set this up so far? Show me the function where you initialize your UART, and all snippets that are uart related.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What did you connect to your UART pins?&amp;nbsp;&lt;strong&gt;NB: That is important. Please answer this question&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When you call nrf_uart_rx() are you sure that there is any data incoming on the UART? the nrf_uart_rx is a blocking call. If there is no data incoming, it will stop here. If you want to use it together with other functionality in your app, I suggest you look into how it is done in the ble_app_uart example, where you have a callback function for the UART, instead of blocking calls. This way, the UART callback will trigger whenever you receive a byte on the UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267421?ContentTypeID=1</link><pubDate>Tue, 01 Sep 2020 10:16:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e2a6794-111c-4783-ad54-d8b2dbd29ed0</guid><dc:creator>luca brandt</dc:creator><description>&lt;p&gt;I know how to program the Dongle. I was wondering how you can use a program written for the DK(pca10056) with the Dongle(pca10059). They use different SDKs.&amp;nbsp; But it is not that importent.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alright. I am using the Blinky example from the SDK for the Dongle (pca10059). I implemented my own service and characteristics. I can already send and recive data over BLE. Now, I would like to send and recive data over UART as&amp;nbsp;simple as possible. On the Blinky example with my service.The BLE side of the code is not in use for the UART programming.That is not the problem.&lt;/p&gt;
&lt;p&gt;So I use:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    nrf_drv_uart_tx(&amp;amp;app_uart_inst, tx_buffer, 1);
    nrf_drv_uart_rx (&amp;amp;app_uart_inst, rx_buffer, 1);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I can see that the code stops at either of these functions, because I turn the&amp;nbsp;LED on&amp;nbsp;before, and off after calling the function. But the LED does not turn off. Hence my conclusion that the code stops at the function nrf_drv_uart_...().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now I am wondering why it does not work.&amp;nbsp;Excuse me&amp;nbsp;if my question was not well formulated.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267179?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 10:53:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0944b745-80db-4b80-b1e5-ddd192af5ef4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Like described in this blog:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If the UART is not the cause of your problem, then you need to debug your project to see what&amp;#39;s going on. Why does it stop? How do you determine that it has stopped?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="luca brandt"]I&amp;#39;m not using any kind of Error Handling. The code I posted is literally all I am using.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Obviously, you also have all the drivers and so on. Perhaps there is an APP_ERROR_CHECK() inside one of your function calls in nrf_drv_uart_...(). You will save yourself some time if you get hold of a debugger or a DK. NB: Read the part about the bootloader&amp;#39;s UICR and external debugger if you decide to go with the external debugger on the dongle.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267169?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 09:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04c1594a-0de4-4d06-849b-9eabe76fac25</guid><dc:creator>luca brandt</dc:creator><description>&lt;p&gt;What would the porting to the Dongle look like?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I connected the RX- and TX Pin to the serial port of my computer. (and voltage supply comes from the USB)&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not using any kind of Error Handling. The code I posted is literally all I am using.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But even when I connect the RX and TX Pins (as a loop), the code stops at the first nrf_drv_uart_...().&lt;/p&gt;
&lt;p&gt;Is there anyting I need to do before I use these functions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/267164?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 09:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d7e836d-4a68-47bc-90c1-5548bc78e26d</guid><dc:creator>Edvin</dc:creator><description>[quote user="luca brandt"]The nRF52840 DK uses the pca10056 SDK right? I want to use the Dongle eventually, so even if I have a working programm for the DK, I can&amp;#39;t use it on the Dongle. Am I mistaken?[/quote]
&lt;p&gt;&amp;nbsp;That is correct. In that case, you need to port it to the dongle.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[quote user="luca brandt"][/quote]&lt;/p&gt;
&lt;p&gt;When the pins are floating, shoudn&amp;#39;t I recive and send noise? Why would the code stop at:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="overflow:auto;"&gt;
&lt;div&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Because if the RX pin is not connected to anything, and you receive some noise on the RX pin, the UART peripheral will try to make sense of it, and generate an event saying that something went wrong during the RX.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you have something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        case APP_UART_COMMUNICATION_ERROR:
            APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Try to comment out the line containing&amp;nbsp;APP_ERROR_HANDLER(...)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So do you have anything connected to the UART pins on the dongle? NB: The UART pins are not the USB pins on the dongle. If nothing is connected, try to remove the uart from your project, or at least comment out the error handling from the UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/266935?ContentTypeID=1</link><pubDate>Fri, 28 Aug 2020 09:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:157f7377-aecc-4baf-a987-90552f4f2892</guid><dc:creator>luca brandt</dc:creator><description>&lt;p&gt;Thanks for your answer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF52840 DK uses the pca10056 SDK right? I want to use the Dongle eventually, so even if I have a working programm for the DK, I can&amp;#39;t use it on the Dongle. Am I mistaken?&lt;/p&gt;
&lt;p&gt;When the pins are floating, shoudn&amp;#39;t I recive and send noise? Why would the code stop at:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_drv_uart_tx(&amp;amp;app_uart_inst, tx_buffer, 1);
nrf_drv_uart_rx (&amp;amp;app_uart_inst, rx_buffer, 1);&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But could I try to pull TX and RX high, with external restistors?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Luca&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 Dongle UART</title><link>https://devzone.nordicsemi.com/thread/266026?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 14:19:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:157f9c69-3db8-406d-ac4b-4fec9907cf3b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;For development, please use an nRF52840 DK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I guess the issue is that you receive a COMMUNICATION_ERROR event, because your UART pins are floating. But you need a programmer to verify this, so that you can debug.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF52840 DK has an on board debugger, but the dongle does not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The debugger will allow for debugging and logging.&lt;/p&gt;
&lt;p&gt;It will save you a lot of time. Perhaps it is worth the expense.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>