<?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 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12097/nrf52-stuck-on-convolution-function</link><description>Whenever I try to run the following Convolution function for the 12th time in my code, the Processor is halted and I get the following Error on console: 
 Performing single step...
...Target halted (PC = 0x000031A8)
Reading all registers
Read 4 bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Feb 2016 00:27:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12097/nrf52-stuck-on-convolution-function" /><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45778?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2016 00:27:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b200b869-74a1-4b32-8665-fe38021e5fb5</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;What is the state of all the registers when the processor is stopped. It would be useful to see the stack pointer, the control and status flags, all of them, to see if there&amp;#39;s an error. How about a backtrace, is there one?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45777?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 21:18:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:980800c7-b233-4e28-8412-334284cbe3dd</guid><dc:creator>Muhammad Ahmad Shah</dc:creator><description>&lt;p&gt;I added the following line right after the realloc command used in the AddAtSpecificIndex function above: if(InputArray-&amp;gt;array==NULL){ &amp;quot; PRINT SOMETHING VIA UART &amp;quot;}
However, I don&amp;#39;t get any such indication.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45776?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 13:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21523601-b947-452f-99b0-1cdce02844da</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You should always check the return value of &lt;code&gt;realloc()&lt;/code&gt;. If unsuccessful, it will return &lt;code&gt;NULL&lt;/code&gt;. It would be interesting to know if this is what happens in this case or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45775?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 12:54:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14b426c0-6e93-45e2-a3db-48a9b3bc5182</guid><dc:creator>Muhammad Ahmad Shah</dc:creator><description>&lt;p&gt;The AddAtSpecificIndex command is made to make an Array act like a Matlab Array. So you can change whatever value at whatever index you want.&lt;/p&gt;
&lt;p&gt;The result array initially holds one Initial Value at the Zeroeth Index. The AddAtSpecificIndex function handles the re-allocation of memory for adding values at whatever index the user wants, as is now visible in the updated Question above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45774?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2016 12:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4dafba7-973b-408e-9b07-343a5b8a5d57</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Your result array can only hold 1 float (&lt;code&gt;ArrayPtr-&amp;gt;array = (float *)malloc(1 * sizeof(float));&lt;/code&gt;). Is that intentional?&lt;/p&gt;
&lt;p&gt;Also, what is the implementation of &lt;code&gt;AddAtSpecificIndex()&lt;/code&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45783?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 23:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea160545-449e-4fc7-a552-3f8731ae5b43</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;So that probably is something else. Unfortunately I am not able to help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45782?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 22:53:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b28960a-02a1-40a5-afcc-5a34b0ebdad4</guid><dc:creator>Muhammad Ahmad Shah</dc:creator><description>&lt;p&gt;I changed the Heap size in gcc_startup_nrf52.s from 8192 to 12288 and reduced the Stack size to 4096 but nothing changes. It still gets stuck at the same iteration of the for loop. Even if I increase the Heap more, I still get stuck at the same iteration.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45781?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 22:51:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4c992ab-6b68-45d3-89b7-34673481d06c</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Increase/decrease heap/stack and check if u get more/less successfull calls&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45780?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 22:47:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a44af6e-b8be-4e9e-b84c-63be04623c09</guid><dc:creator>Muhammad Ahmad Shah</dc:creator><description>&lt;p&gt;Is there a way to check that ? And if I am overflowing the heap or stack, what&amp;#39;s the best possible solution that I may have ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 stuck on Convolution Function</title><link>https://devzone.nordicsemi.com/thread/45779?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 22:41:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc20f468-c4bf-49d2-8dce-c11172271e23</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;I bet you overflow the heap. Or stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>