<?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>peripheral uart sample: connecting causes permanent halting on background threads</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93729/peripheral-uart-sample-connecting-causes-permanent-halting-on-background-threads</link><description>When adding a low priority and delayed background thread to the peripheral uart sample, have issues where pairing with the device causes that background thread to halt and never run again. 
 In addition, whatever the advertising light is (LED1) never</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Nov 2022 17:11:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93729/peripheral-uart-sample-connecting-causes-permanent-halting-on-background-threads" /><item><title>RE: peripheral uart sample: connecting causes permanent halting on background threads</title><link>https://devzone.nordicsemi.com/thread/395185?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2022 17:11:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1ed92bf-0e72-47bc-b4ec-92f358f26f82</guid><dc:creator>droidecahedron</dc:creator><description>&lt;p&gt;Thank you for reaching out Naeem,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My application no longer has this issue on SDK2.0.2&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I do not have access to an nRF52840.&lt;/p&gt;
&lt;p&gt;Our organization is pushing a product with nRF52833 and it is table stakes to use the 52833, so that is the platform the development needs to go on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If it is any insight, when the bug was occurring, I noticed that immediately within the entry of the background thread, context switching would occur, which makes me wonder if in the new SDK some IRQ is throttling things.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Would be somewhere in&amp;nbsp;&lt;span&gt;ncs/version/zephyr/arch/arm/core/aarch32/swap.c/arch_swap(unsigned int) function.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral uart sample: connecting causes permanent halting on background threads</title><link>https://devzone.nordicsemi.com/thread/395181?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2022 16:39:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98a490dd-05e1-4353-b571-c0b8f9781bf2</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hi Johnny,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So basically, you wanted to add a thread to peripheral uart sample.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I started with peripheral uart example in NCS 2.1.2, 2.1.1, and 2.1.0 and it did not work properly on 52833DK (DK was rebooting).&lt;/p&gt;
&lt;p&gt;However, the same example in NCS 2.1.2, 2.1.1, and 2.1.0 worked properly on 52840DK without any modification.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, the same example in NCS 2.0.2 and 2.0.0 worked well on 52833DK. (There could be several reasons of a sample not working properly in a SDK for certain DK. I might not be aware about those.)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So as a first thing, can you start with peripheral uart in 2.0.2 on 52833DK?&lt;/p&gt;
&lt;p&gt;Or if you have 52840DK then build and flash the same example using the latest (2.1.2) nCS.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I continued with 52840DK, and was able to incorporate the thread and see all of the functionality.&lt;/p&gt;
&lt;p&gt;In the snapshot below, you can see that the thread is functional, and I am able to connect and disconnect and reconnect with the device. All of the LEDS were functioning properly as desired.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/1423.pastedimage1668098144446v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, can you try your project with nCS 2.0.2, or on 52840DK?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know accordingly.&lt;/p&gt;
&lt;p&gt;(P.S: I have limited 52833 availability)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>