<?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>Soft UART (Uart-bitbang) on nRF52 DK (nrf52832) fails with</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126513/soft-uart-uart-bitbang-on-nrf52-dk-nrf52832-fails-with</link><description>Hi all hope you all are fine and doing well. 
 I am trying to use the Soft UART (uart-bitbang.c driver) on nRF52 DK for a low-speed UART connection. The initialization fails with the following error: &amp;lt;err&amp;gt; uart_bitbang: Couldn&amp;#39;t configure tx counter.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Jan 2026 08:49:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126513/soft-uart-uart-bitbang-on-nrf52-dk-nrf52832-fails-with" /><item><title>RE: Soft UART (Uart-bitbang) on nRF52 DK (nrf52832) fails with</title><link>https://devzone.nordicsemi.com/thread/558964?ContentTypeID=1</link><pubDate>Mon, 19 Jan 2026 08:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aee87d03-577e-4ad3-9ffc-2634940a960e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I see. In general, I am not convinced uart bitbanging is a good idea in applications that typically run in our chips. The baudrate is fairly low, but you still have 2400 bits per second, or 0.4ms per bit. If you have some softdevice/bluetooth interrupt that it needs to handle at the same time as you are trying to bitbang, you will loose some of these bits.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As &lt;a href="https://devzone.nordicsemi.com/members/turboj"&gt;Turbo J&lt;/a&gt;&amp;nbsp; says, try setting the rx and tx timers, and see if that helps. But as you see here, if each bitbanged uart requires two timer instances, then you will quickly run out of these.&lt;/p&gt;
&lt;p&gt;Do you intend to use these UARTs at the same point in time? Or is it typically one after the other?&lt;/p&gt;
&lt;p&gt;I suggest you look into using the nrfx drivers directly, instead of via the zephyr uart drivers. If you do that, you can stop an uart instance, change the gpios, and start it again, and this way, communicate with many different UART devices, using only one UART instance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For reference, you can check out:&lt;/p&gt;
&lt;p&gt;NCS\modules\hal\nordic\nrfx\samples\src\nrfx_uarte&lt;/p&gt;
&lt;p&gt;I see that it doesn&amp;#39;t have an overlay file: nrf52dk_nrf52832.overlay, but you can copy the one for nRF52840, and do some modifications to test. The pins are defined in v3.2.1\modules\hal\nordic\nrfx\samples\common\boards\&amp;lt;board_name&amp;gt;_config.h, but you can also just declare these pins in your own files.&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><item><title>RE: Soft UART (Uart-bitbang) on nRF52 DK (nrf52832) fails with</title><link>https://devzone.nordicsemi.com/thread/558919?ContentTypeID=1</link><pubDate>Fri, 16 Jan 2026 19:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40608a4c-4d35-4cfb-aeb5-7ca130c25762</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;I&amp;#39;ve looked into the dts binding, you are missing the RX and TX timer. Those are required in the DTS overlay.&lt;/p&gt;
&lt;p&gt;The code does not throw an error because the timers are technically optional in half duplex mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Soft UART (Uart-bitbang) on nRF52 DK (nrf52832) fails with</title><link>https://devzone.nordicsemi.com/thread/558917?ContentTypeID=1</link><pubDate>Fri, 16 Jan 2026 17:38:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f59617b8-8b2a-47fb-9bd8-3bda95fcc915</guid><dc:creator>M.Nabeel</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/edvin-holmseth"&gt;Edvin&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Thank you for your response.&lt;/p&gt;
&lt;p&gt;This is not a Zephyr sample application, I am currently testing the &lt;strong&gt;uart_bitbang (soft UART) driver using two GPIOs in a loopback configuration (TX &amp;rarr; RX)&lt;/strong&gt; as part of my project validation.&lt;/p&gt;
&lt;p&gt;My goal is to use the &lt;strong&gt;UART bitbang technique to run a Modbus RTU slave at a baud rate of 2400&lt;/strong&gt;. I was not fully aware whether the &lt;strong&gt;nRF52832 is officially supported for uart_bitbang&lt;/strong&gt;, so this test is mainly to verify feasibility on this board.&lt;/p&gt;
&lt;p&gt;I am using &lt;strong&gt;nRF Connect SDK v3.2.0&lt;/strong&gt;, and as far as I can see, the &lt;code&gt;uart-bitbang&lt;/code&gt; driver was recently added like 8 months ago. The reason I want to use a software UART is that my &lt;strong&gt;hardware UART is already occupied by an LD2402 motion detection sensor&lt;/strong&gt;, and in my final design I plan to connect &lt;strong&gt;multiple Modbus slave devices (3&amp;ndash;4) to a single master&lt;/strong&gt;, which requires an additional UART interface.&lt;/p&gt;
&lt;p&gt;I understand that using a hardware UART is generally preferable, but due to this constraint, I am exploring the soft UART option.&lt;/p&gt;
&lt;p&gt;Currently, I have enabled the following configuration for uart bitbang in my &lt;strong&gt;&lt;code&gt;prj.conf&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;CONFIG_UART_BITBANG=y
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_COUNTER=y
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And this is my board overlay &lt;strong&gt;(&lt;code&gt;nrf52dk_nrf52832.overlay&lt;/code&gt;):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/ {
    uart_bb0: uart_bitbang_0 {
        compatible = &amp;quot;zephyr,uart-bitbang&amp;quot;;
        status = &amp;quot;okay&amp;quot;;
        label = &amp;quot;UART_BB0&amp;quot;;

        tx-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_HIGH&amp;gt;;
        rx-gpios = &amp;lt;&amp;amp;gpio0 14 GPIO_ACTIVE_HIGH&amp;gt;;

        current-speed = &amp;lt;2400&amp;gt;;
        data-bits = &amp;lt;8&amp;gt;;
        stop-bits = &amp;quot;1&amp;quot;;
        parity = &amp;quot;none&amp;quot;;
    };
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;At the moment, I am only trying to perform a &lt;strong&gt;basic loopback test&lt;/strong&gt;, where data sent on the TX GPIO (for example, &lt;code&gt;&amp;quot;Hello UART Bitbang&amp;quot;&lt;/code&gt;) should be received on the RX GPIO.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please let me know if I am missing something in the configuration (for example, related to the TX counter setup), or if there are known limitations of &lt;code&gt;uart-bitbang&lt;/code&gt; on the nRF52832 that would prevent this from working?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Soft UART (Uart-bitbang) on nRF52 DK (nrf52832) fails with</title><link>https://devzone.nordicsemi.com/thread/558900?ContentTypeID=1</link><pubDate>Fri, 16 Jan 2026 13:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e89c2f3-fa3e-4d23-8e43-1c3f02f23227</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What sample are you using to test this? Is the nRF52832 defined as a supported board for this application? I have not seen this driver before (I see that it is new in v3.2.1 (3.2.0?))&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In uart_bitbang.c, there are two cases this error will be printed.&amp;nbsp;One of these return true:&lt;/p&gt;
&lt;p&gt;config-&amp;gt;tx_countr == NULL&lt;/p&gt;
&lt;p&gt;!device_is_ready(config-&amp;gt;tx_counter)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why do you want to use a UART bitbang? There are several instances of HW UART on the nrf52832, is it not better to use any of these?&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>