<?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 error with BLE and FreeRtos</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81547/stack-error-with-ble-and-freertos</link><description>Hello, 
 
 I am trying to make a code running the Ble stack adn the FreeRtos one, i started from the project ble_app_hrs_freertos_pca10040_s132, i&amp;#39;ve just removed some things and added a task : 
 
 When creating the tasks if a put a task depth of 256</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Nov 2021 10:15:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81547/stack-error-with-ble-and-freertos" /><item><title>RE: stack error with BLE and FreeRtos</title><link>https://devzone.nordicsemi.com/thread/338742?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 10:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb944382-4899-4a57-9bd6-983ae13663a9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This means that it is definitely related to your heap/task size. I think you should debug more into that direction into understanding your new task stack requirements.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack error with BLE and FreeRtos</title><link>https://devzone.nordicsemi.com/thread/338715?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 09:24:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6e22604-7a82-4efc-9a90-e9a92dcfd728</guid><dc:creator>Albin</dc:creator><description>&lt;p&gt;UPdate : i canged the heap_1.c to heap_2.c that has a better ram managment from my understading and it works.&lt;/p&gt;
&lt;p&gt;The only issue is that when i&amp;#39;m connected the Log thread don&amp;#39;t work anymore and i have no log printing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack error with BLE and FreeRtos</title><link>https://devzone.nordicsemi.com/thread/338710?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 09:13:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc6947b0-bc6c-46a9-b770-bde31816045a</guid><dc:creator>Albin</dc:creator><description>&lt;p&gt;Hello, i&amp;#39;ve tried but the issue is still the same even if i allocate mush more stack&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define configTOTAL_HEAP_SIZE                                                     ( 16384 )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;i tried also with 8192 but the issue is still the same&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: stack error with BLE and FreeRtos</title><link>https://devzone.nordicsemi.com/thread/338487?ContentTypeID=1</link><pubDate>Thu, 11 Nov 2021 07:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a9a19a4-8119-4533-bf92-17051a8bfe87</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I think the hrs_freertos example is using up all the free stack that is allocated in the FreeRTOSConfig.h file.&lt;/p&gt;
&lt;p&gt;You need to increase the maximum heap size&amp;nbsp;configTOTAL_HEAP_SIZE so that there is enough stack from the n&lt;a href="https://www.freertos.org/FreeRTOS_Support_Forum_Archive/April_2012/freertos_Task_Stack_allocation_problem_5198898.html"&gt;ew task you created&lt;/a&gt;. All the hardfaults and unpredictable behavior you are seeing could be a side affect from the stack overflow. Give enough stack to you task and most likely this issue will go away.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>