<?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>LESC and FreeRTOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51449/lesc-and-freertos</link><description>Does LESC is supported in FreeRTOS? 
 I init BLE modules in FreeRTOS tasks. After LESC is enabled, system returns error in nrf_crypto_rng_init(). Looks like nrf_stack_info_overflowed() isn&amp;#39;t for FreeRTOS. I thought this API check the main stack, not the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 May 2020 14:40:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51449/lesc-and-freertos" /><item><title>RE: LESC and FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/249005?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 14:40:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af890f7d-efe5-4295-af98-d967e40bcaaa</guid><dc:creator>bfriedk1</dc:creator><description>&lt;p&gt;Susheel -&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for the follow-up. Indeed, removing the stack check macro is the only workaround at this time. FYI - the issue is also covered in this post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/54770/lesc-initialization-on-freertos"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/54770/lesc-initialization-on-freertos&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LESC and FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/248859?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 07:29:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ae4d89a-7850-4df1-89e5-cbe766528b25</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi, Sorry for late response, but searching for issues made me look into this.&lt;/p&gt;
&lt;p&gt;. The code is for nRF5 which doesn&amp;#39;t support threads, so we are just checking against the main stack to see if there is a stack overflow. You can remove the stack check or substitute with a stack check with the current thread stack you are in. The stack limit is just a sanity test to ensure that we don&amp;#39;t fly over the stack limit. The crypto doesn&amp;#39;t &lt;em&gt;require&lt;/em&gt;&amp;nbsp;main stack utilization. It is just testing if there is room on main stack because nRF5 SDK assumes that there is only one.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The workaround right now: Remove the stack-check macro (fill it with empty content) and see that you don&amp;#39;t blow over your stack or write code that can check per-thread if you have room left in your stack&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LESC and FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/221178?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 00:34:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65433763-3e77-4e37-abbf-98aae54a9111</guid><dc:creator>bfriedk1</dc:creator><description>&lt;p&gt;Hello -&lt;/p&gt;
&lt;p&gt;I am also trying to get LESC working on FreeRTOS. Based on suggestions here, I am now linking the hard-float/no-interrupts variant of the&amp;nbsp;libnrf_cc310_0.9.12.a library. In my application I am setting the same crypto sdk_config.h options as the ble_app_multirole_lesc app. We are using more RAM than the typical example app, but otherwise I don&amp;#39;t believe our compiler/linker settings are different:&lt;/p&gt;
&lt;p&gt;arm_architecture=&amp;quot;v7EM&amp;quot;&lt;br /&gt;arm_core_type=&amp;quot;Cortex-M4&amp;quot;&lt;br /&gt;arm_endian=&amp;quot;Little&amp;quot;&lt;br /&gt;arm_fp_abi=&amp;quot;Hard&amp;quot;&lt;br /&gt;arm_fpu_type=&amp;quot;FPv4-SP-D16&amp;quot;&lt;br /&gt;arm_linker_heap_size=&amp;quot;61440&amp;quot;&lt;br /&gt;arm_linker_process_stack_size=&amp;quot;0&amp;quot;&lt;br /&gt;arm_linker_stack_size=&amp;quot;8192&amp;quot;&lt;/p&gt;
&lt;p&gt;With these options I am also getting the stack overflow in nrf_stack_info_overflowed(). We are initializing the BLE modules in our application based on the ble_app_hrs_freertos example.I have tried increasing our linker stack size to 16384, but that doesn&amp;#39;t seem to make any difference.&lt;/p&gt;
&lt;p&gt;When I run the ble_app_hrs_freertos app, which also works as expected, I&amp;nbsp;looked at the values being compared here in nrf_stack_info_overflowed:&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_scroller"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_cursor-layer ace_hidden-cursors"&gt;
&lt;div class="ace_cursor"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (NRF_STACK_INFO_GET_SP() &amp;lt; NRF_STACK_INFO_BASE)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The values are:&lt;/p&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_scroller"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_text-layer"&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;0x2003e000 &amp;lt; 0x2003fed8
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;&lt;/div&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;&lt;/div&gt;
&lt;div class="ace_layer ace_cursor-layer ace_hidden-cursors"&gt;
&lt;div class="ace_cursor"&gt;In my app (which fails) the values are:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_scroller"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;&lt;a class="fullscreen" href="#"&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;0x2003e000 &amp;lt; 0x20009d38
&lt;/pre&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using a 20 KB stack size in the FreeRTOS task that initializes BLE. What do I need to change in my configuration/code to get past the stack overflow check successfully?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Brian&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LESC and FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/206414?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2019 13:34:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e237b4e1-5452-4134-a019-a039c10ecd18</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You need to try the non interrupt variant of cypto library to make it work with &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49549/need-freertos-help-for-rnd-example-project-in-sdk"&gt;FreeRTOS&lt;/a&gt;. There are issues to make crypto interrupt variant work with RTOS environment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>