<?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>NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15513/nrf52832-single-wire-uart</link><description>Is it possible to use the NRF52832 UART in half-duplex single-wire mode, by assigning TXD and RXD to the same GPIO, setting the GPIO drive to disconnect &amp;#39;1&amp;#39; and using a pull-up resistor?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Aug 2017 09:02:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15513/nrf52832-single-wire-uart" /><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59238?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2017 09:02:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0490fce9-e465-4979-9c57-e51e0e1fd2e8</guid><dc:creator>tuanson</dc:creator><description>&lt;p&gt;hi joojoo. This is my problem. can you give me your full code, pls? Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59237?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2017 15:02:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:214ab75d-b85d-465d-9d45-7c7f5b1c4541</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;The problem is now solved. The configuration of uart pin direction works correctly. It works by rebuilding the project, not by building (F7 in Keil IDE) the project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59235?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2017 09:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0168d651-e508-4cda-bd7f-72bc0135289c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Quangng: Could you post your full code ? What exactly inside uart_write() ? Would it be blocking code  ? I suspect that right after you send your reply and switch to RX, there is an issue that trigger the reply again ( as maybe there was something accidentally got in the RX buffer ).&lt;/p&gt;
&lt;p&gt;I would suggest you to create another question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59236?ContentTypeID=1</link><pubDate>Sun, 26 Mar 2017 23:08:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50d34176-8e77-4362-be0c-6f5e5453f33c</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Ole!&lt;/p&gt;
&lt;p&gt;So, you said that you will update the answer. How&amp;#39;s it going now? I also need this solution for my application requirements. I set UART TX and RX to the same pin (pin 6) and then connected this pin 6 to USB uart cable (a 10k resistor is connected between TX and Rx of the USB uart cable). In my application, the nrf52832 uart, most of the time, is set to Rx. Only when a valid command is received from an external processor, it changes the pin 6 direction to output and sends a reply. After finishing sending the reply, the application configures pin 6 direction to input again. I configure pin 6 for tx as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SERIAL_TX_PIN 6
#define SERIAL_RX_PIN 6
    nrf_gpio_cfg(
        SERIAL_TX_PIN,
        NRF_GPIO_PIN_DIR_OUTPUT,
        NRF_GPIO_PIN_INPUT_DISCONNECT,
        NRF_GPIO_PIN_PULLUP,
        NRF_GPIO_PIN_H0D1,
        NRF_GPIO_PIN_NOSENSE
    );

uart_write(&amp;quot;this is a reply&amp;quot;);

    nrf_gpio_cfg(
            SERIAL_RX_PIN,
            NRF_GPIO_PIN_DIR_INPUT,
            NRF_GPIO_PIN_INPUT_DISCONNECT,
            NRF_GPIO_PIN_PULLUP,
            NRF_GPIO_PIN_H0D1,
            NRF_GPIO_PIN_NOSENSE
    ); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem is that every time is send by uart tx, the terminal continously displays what has been sent out all the time witout stopping.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m actually porting my code from another BLE SoC to Nordic nRF52832 SoC. The hardware interface is nothing but a usb uart cable connected directly to pin 6 of nrf52832.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59234?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 12:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c5f4971-253a-4ce9-8426-82619163f00a</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;I misunderstood you when you said &amp;quot;disconnect&amp;quot;, I thought (for some reason) that you meant input buffer disconnect.&lt;/p&gt;
&lt;p&gt;Using S0D1 or H0D1 should work the same way as the diode, you are correct.&lt;/p&gt;
&lt;p&gt;I tested assigning UART RXD and TXD to the same pin and it works, but we cannot guarantee correct behaviour always. You should test it thoroughly before going for that solution.&lt;/p&gt;
&lt;p&gt;I will update my answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59233?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 11:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa249620-b7c3-41ab-8859-f3d396b8a350</guid><dc:creator>szmodz</dc:creator><description>&lt;p&gt;GPIO register PIN_CNF DRIVE field set to S0D1 or H0D1 has a similar effect to adding the external diode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59232?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 10:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3345276-d8f5-440b-bbb2-6912611ba38d</guid><dc:creator>szmodz</dc:creator><description>&lt;p&gt;Setting the output to disconnect &amp;#39;1&amp;#39; has basically the same effect as adding the diode. The diode is only needed with push-pull outputs, it&amp;#39;s not needed in the case of open drain outputs. When the GPIO is set to open drain mode (or &amp;quot;disconnect &amp;#39;1&amp;#39;&amp;quot; as called in the NRF52832 manual), the pin will only actively drive the &amp;#39;0&amp;#39; state. &amp;#39;1&amp;#39; will be floating, and the high state will only be forced by the pull up resistor. When TX is idle, the output state is &amp;#39;1&amp;#39;, or floating in case of open drain outputs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59231?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 10:41:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7404748d-a082-46c2-a4d3-472e2407f1a5</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The problem is when you are receiving data. If TX and RX is connected you will have a short when you are receiving data since TX pin is output (current will flow from TX pin on the nRF to the TX pin on the other device), that is why you need a diode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59230?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 15:22:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96de79ea-b774-403e-bd28-c9dd21ea3317</guid><dc:creator>szmodz</dc:creator><description>&lt;p&gt;I understand how that works, but I don&amp;#39;t see the need for a diode. NRF52832 has open-drain outputs on all GPIOs (GPIO drive set to disconnect &amp;#39;1&amp;#39;), so it should be enough to short TX and RX directly together, without the diode. I was simply wondering if i have to short two separate pads externally, or is it possible to short the signals internally using the PSELTXD and PSELRXD registers. Figure 21: GPIO Port and the GPIO pin details on page 112 suggests that it should work, but perhaps there&amp;#39;s something else which will prevent it from working. I don&amp;#39;t have the dev kit yet, otherwise I would just check and see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 single wire uart</title><link>https://devzone.nordicsemi.com/thread/59229?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 08:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24e0320b-185e-4f13-9d51-9672823b67f9</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;It is not possible.&lt;/p&gt;
&lt;p&gt;It may work if you put a diode between TX and RX and use pullup resistor on the RX line. Do a search on the internet, there is a lot of information about this topic with other MCUs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>