<?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>nRF52 Software Serial library similar to Arduino software serial</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83287/nrf52-software-serial-library-similar-to-arduino-software-serial</link><description>I have made a software serial library for nRF52840 similar to Arduino software serial. It is working fine. nRF52840 has two UARTE instance and one UART instance, As for my application requirement I need 3 UART or UARTE instances. 
 Working baud rates</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Jan 2022 15:17:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83287/nrf52-software-serial-library-similar-to-arduino-software-serial" /><item><title>RE: nRF52 Software Serial library similar to Arduino software serial</title><link>https://devzone.nordicsemi.com/thread/346737?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 15:17:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b81623e4-4d04-4060-8b69-87348c2f1aed</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Ok, seems it is working when connected with the J-Link VCOM on the DK at 9600 baudrate.&lt;/p&gt;
&lt;p&gt;Looks like the optimization level affects the timing enough to break it at higher baudrate levels though. 57600/76800 is unstable or not working correctly with optimization set to anything below level 3 during my testing. Once I was actually able to receive data correctly with application baudrate set to 76800 and terminal set to 57600.&lt;/p&gt;
&lt;p&gt;115200 baudrate is also working for TX with optimization level set to 3 on my end, but RX is not working correctly. However, it seems is just 1 bit off the expected, so you may have to check if there is some way you can resolve it:&lt;/p&gt;
&lt;p&gt;Expected:&lt;span&gt;&amp;quot;H&amp;quot;: 0x48 -&amp;gt; 0xC8, &amp;quot;E&amp;quot;:&amp;nbsp;&lt;/span&gt;&lt;span&gt;0x45 -&amp;gt; 0xC5, &amp;quot;L&amp;quot;:&amp;nbsp;0x4C -&amp;gt; 0xCC, &amp;quot;O&amp;quot;:&amp;nbsp;0x4F -&amp;gt; 0xCF,&amp;nbsp;&lt;/span&gt;&amp;quot;h&amp;quot;: 0x68 -&amp;gt; 0xE8, &amp;quot;e&amp;quot;:&amp;nbsp;&lt;span&gt;0x65 -&amp;gt; 0xE5, &amp;quot;l&amp;quot;: 0x6C -&amp;gt; 0xEC, &amp;quot;o&amp;quot;: 0x6F -&amp;gt; 0xEF.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Software Serial library similar to Arduino software serial</title><link>https://devzone.nordicsemi.com/thread/346340?ContentTypeID=1</link><pubDate>Thu, 06 Jan 2022 06:02:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b604adc5-736f-4645-bbcc-84fd74eb7a12</guid><dc:creator>Venus_Bilandi</dc:creator><description>&lt;p&gt;Okay. Jorgen, it will not work with this connection. Please use hardware UART or UARTE with it for testing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Software Serial library similar to Arduino software serial</title><link>https://devzone.nordicsemi.com/thread/346257?ContentTypeID=1</link><pubDate>Wed, 05 Jan 2022 15:12:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf1daef7-7899-433b-a156-08cf725fac66</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Used your exact code/files, connected P1.10 to P1.11. It HardFaults at gpio.c:130.&lt;/p&gt;
&lt;p&gt;Built using SES for pca10056/nRF52840 target.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Software Serial library similar to Arduino software serial</title><link>https://devzone.nordicsemi.com/thread/345903?ContentTypeID=1</link><pubDate>Tue, 04 Jan 2022 12:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c955d032-dc28-48d4-a837-d8ad9d6fb90a</guid><dc:creator>Venus_Bilandi</dc:creator><description>&lt;p&gt;what &lt;span&gt;are&amp;nbsp;the&amp;nbsp;&lt;/span&gt;connections?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Software Serial library similar to Arduino software serial</title><link>https://devzone.nordicsemi.com/thread/345892?ContentTypeID=1</link><pubDate>Tue, 04 Jan 2022 12:26:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c94f5f63-5966-4028-8667-253cffba27ec</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What is not working with 115200 baudrate? I tried your code, but I got hardfault in&amp;nbsp;gpiote_drvInEventhandler(), is there some code missing?&lt;/p&gt;
&lt;p&gt;Handling 115200 baudrate in software will be quite work-intensive for the CPU to handle all the interrupts. You may need to consider writing your own GPIOTE interrupt handler for this specific purpose, to reduce the overhead of the generic checks that is performed in the GPIOTE driver. An optimized interrupt handler that is doing only what is required, may help resolve your issues.&lt;/p&gt;
&lt;p&gt;Note that SW/bit-banging UART will not work well together with BLE or other high-priority interrupt tasks, as this will block you from keeping the timing requirements of the UART reading/writing.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>