<?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>Configure UART Transmit Pin as Open-Drain</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53851/configure-uart-transmit-pin-as-open-drain</link><description>Question: for the nRF52840, if I configure a GPIO pin as an open-drain output (DRIVE setting of S0D1) and then select this pin as a UART transmit pin, does the open drain setting persist or does the UART peripheral change the DRIVE setting? 
 Background</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Nov 2019 14:34:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53851/configure-uart-transmit-pin-as-open-drain" /><item><title>RE: Configure UART Transmit Pin as Open-Drain</title><link>https://devzone.nordicsemi.com/thread/217991?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2019 14:34:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cfc9f72-59cb-4e51-9f0b-12272191f96b</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Well, the peripheral it&amp;#39;s entirely dependent on the driver, which means that if you write your own driver that doesn&amp;#39;t override the GPIO configuration then it will not happen.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure UART Transmit Pin as Open-Drain</title><link>https://devzone.nordicsemi.com/thread/217791?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 14:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d039656-04f8-4b91-87a2-165607b90984</guid><dc:creator>abkirchhoff</dc:creator><description>&lt;p&gt;Jared,&lt;/p&gt;
&lt;p&gt;Thanks for the reply. I&amp;#39;m willing to skip the UART driver and configure the GPIO and UART registers directly. I&amp;#39;m wondering what changes the UART peripheral makes to the GPIO configuration. The product spec quotation says a peripheral can override the GPIO configuration, but it doesn&amp;#39;t say what part of the configuration is overridden.&lt;/p&gt;
&lt;p&gt;According to this quote from MartinBL in this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/23601/twi-stops-working---sda-bus-always-low"&gt;thread&lt;/a&gt;, it would seem that the DRIVE field in the GPIO config is not overridden (at least for TWI). Can anyone confirm that this is also true for the UART?&lt;/p&gt;
&lt;p&gt;MartinBL quote: &amp;quot;&lt;span&gt;I talked to one of our TWI architects and he said that the GPIO settings actually do influence the pin even when the TWI is enabled. In other words, changing the drive strength from S0D1 to S0S1 will have an effect on the TWI bus.&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure UART Transmit Pin as Open-Drain</title><link>https://devzone.nordicsemi.com/thread/217782?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 13:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b63fa87c-a955-4ece-b98c-8d219f2ffa9e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The UART driver will reconfigure the tx and rx pins after it has been initialized. This can be seen in the lower layer driver &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/13a7de7de72cfd444af468f11c0dbb9db7a26172/drivers/src/nrfx_uart.c#L72"&gt;nrfx_uart.c&lt;/a&gt; where it uses &lt;span&gt;apply_config() to configure the pins in the initializing&amp;nbsp;function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;From the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/gpio.html?cp=3_0_0_5_8_0#concept_o12_bgv_bs"&gt;product specification&lt;/a&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;Other peripherals in the system can connect to GPIO pins and override their output value and configuration, or read their analog or digital input value&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>