<?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>Stack overflow on Attribute write callback thread</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112223/stack-overflow-on-attribute-write-callback-thread</link><description>I have my software set up so that it does some computation within the Attribute write callback function like this. 
 
 
 
 
 
 
 
 
 b roadcastKeyHandler does somewhat of a big jobb here. calling broadcastKeyHandler from main does not seem to be a problem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jun 2024 18:19:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112223/stack-overflow-on-attribute-write-callback-thread" /><item><title>RE: Stack overflow on Attribute write callback thread</title><link>https://devzone.nordicsemi.com/thread/489375?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 18:19:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c964ecc-fd13-4a17-ae7d-d79d002d368a</guid><dc:creator>SimonDar</dc:creator><description>&lt;p&gt;&lt;span&gt;For anyone else encountering the same issue, setting the variables as static provided a fix. However, I&amp;#39;m uncertain whether this is due to a scope or a thread stack issue. Can anyone advise on how to increase the stack sizes for these threads, assuming they are indeed threads?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I suspect that these might be threads because I can still interact with them after implementing &lt;code&gt;k_sleep&lt;/code&gt; in the main function. Please correct me if I&amp;#39;m wrong.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>