<?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>Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74782/use-uart-but-make-the-tx-pin-open-drain</link><description>It is possible to switch the TX pin to open drain, when the UART is enabled on an nrf53? 
 My goal is to use the uart as a 1 wire interface,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 May 2021 15:33:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74782/use-uart-but-make-the-tx-pin-open-drain" /><item><title>RE: Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/thread/310537?ContentTypeID=1</link><pubDate>Wed, 19 May 2021 15:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2f91fef-7e71-4a5c-a6c6-2a451ee5d8de</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;I edited my response above to show input connected; assuming you are wanting to use a single pin for both Tx and Rx. Let us know if you have it working ok - thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/thread/309999?ContentTypeID=1</link><pubDate>Mon, 17 May 2021 22:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40cea632-270b-4a81-9545-c90121e4d779</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;OK, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/thread/309998?ContentTypeID=1</link><pubDate>Mon, 17 May 2021 22:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:289b1d93-56b6-4eb2-ae38-b2c4e5784731</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Ah, I see. Try adding this function in SDKv1.5.1&amp;nbsp;&lt;em&gt;uart_nrfx_uarte.c&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_STATIC_INLINE void cfg_tx_pin(uint32_t pin_number)
{
    nrf_gpio_cfg(
        pin_number,
        NRF_GPIO_PIN_DIR_OUTPUT,
        NRF_GPIO_PIN_INPUT_CONNECT,  // Connect for single pix tx/rx
        NRF_GPIO_PIN_PULLUP, // If not using external pull-up
        NRF_GPIO_PIN_H0D1,  // Open drain
        NRF_GPIO_PIN_NOSENSE);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then change this around line 1424 in &lt;em&gt;uart_nrfx_uarte.c&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	nrf_gpio_pin_write(config-&amp;gt;pseltxd, 1);
	nrf_gpio_cfg_output(config-&amp;gt;pseltxd);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	nrf_gpio_pin_write(config-&amp;gt;pseltxd, 1);
	cfg_tx_pin(config-&amp;gt;pseltxd);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/thread/309994?ContentTypeID=1</link><pubDate>Mon, 17 May 2021 19:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6569a229-1895-4036-bfcf-af1564bf28a7</guid><dc:creator>Jordan Archer</dc:creator><description>&lt;p&gt;You missed the original question.&amp;nbsp; Can I make the uart device, with the TX pin being open drain?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/thread/309306?ContentTypeID=1</link><pubDate>Tue, 11 May 2021 15:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:952f23f8-cc68-4bd7-820a-3b28585d5360</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;A couple of more links; note you might be able to spoof 1-wire with 3-wire SPI., don&amp;#39;t remember if I tried that&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/39358/dht22-sensor-data-pin-reading-low/152553#152553"&gt;dht22-sensor&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/545/1-wire-code-problem"&gt;1-wire-code-problem&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68214/3-wire-spi-bi-directional-communication/279985#279985"&gt;3-wire-spi-bi-directional&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use UART, but make the TX pin open drain.</title><link>https://devzone.nordicsemi.com/thread/309277?ContentTypeID=1</link><pubDate>Tue, 11 May 2021 13:46:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:400013dd-66f0-4b24-af50-b21244479108</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Since we do not have a one wire implementation I would suggest you look at the third party implementation suggested in this thread: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30474/nrf52-dallas-slave-1-wire-with-bt"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/30474/nrf52-dallas-slave-1-wire-with-bt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is written for nRF51 originaly, but it should run on the nRF52 as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>