<?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>Occasional HardFault in nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77205/occasional-hardfault-in-nrf51822</link><description>Hi All, 
 
 Setup: 
 SoC: nRF51822 
 SDK: 11.0.0 
 Softdevice: S130 2.0.1 
 
 I am facing occasional HardFault and It is happening randomly. I need to test device few hours to generate it and still no guarantee it will generate. It seems it is stack overflow</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jul 2021 12:12:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77205/occasional-hardfault-in-nrf51822" /><item><title>RE: Occasional HardFault in nRF51822</title><link>https://devzone.nordicsemi.com/thread/319163?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 12:12:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fd61236-4b1a-4bf7-a6dc-ca4a1ad5fff8</guid><dc:creator>khodidas</dc:creator><description>&lt;p&gt;I found It :).&lt;/p&gt;
&lt;p&gt;Actually, my two function call each other indefinitely in certain situation which was making stack overflow.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Previous LR was 0x000253BB (4 byte before green box). So. I derived problem should be at that instruction. I investigated around that instruction and found a condition when&amp;nbsp;&lt;span&gt;two function can call each other indefinitely.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Tarun&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Occasional HardFault in nRF51822</title><link>https://devzone.nordicsemi.com/thread/319161?ContentTypeID=1</link><pubDate>Thu, 08 Jul 2021 12:08:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c72c4bd6-933e-4eb0-a6ef-31c69e30ba39</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;There is no easy way to debug a hardfault that takes variable time to reproduce. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27014/how-can-i-distinguish-the-reason-for-hardfault"&gt;This &lt;/a&gt;thread discusses this topic well enough to give you some info on how to debug it. I hope it helps&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>