<?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>Hard fault documentation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62597/hard-fault-documentation</link><description>Hi, 
 
 I would like to document the error reason and program counter on every hard fault. 
 I added it to my application, in HardFault_c_handler (). I save p_stack-&amp;gt;pc and cfsr . 
 The problem is that the program counter always saves as 0, so I can&amp;#39;t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Jan 2023 16:20:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62597/hard-fault-documentation" /><item><title>RE: Hard fault documentation</title><link>https://devzone.nordicsemi.com/thread/406522?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 16:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:518dcaae-e2af-494f-8cc5-c2178d858d65</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you cannot use fds in hardfault handler. Hardfault is higher priority exception than the SWI interrupts (BLE event handling) which is needed for the fds to work properly when using softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault documentation</title><link>https://devzone.nordicsemi.com/thread/406449?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 12:29:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b12cdba3-ba76-4d18-ad1b-6f1570c540d0</guid><dc:creator>ilyasbsran</dc:creator><description>&lt;p&gt;I don&amp;#39;t have a connection to the device all the time so I need to save this info in flash. But when I use fds library in HardFault_c_handler I am not able to save them. But when I use the fds library, I don&amp;#39;t get any errors either.&lt;/p&gt;
&lt;div id="gtx-trans" style="left:-288px;position:absolute;top:-20px;"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault documentation</title><link>https://devzone.nordicsemi.com/thread/406446?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 12:24:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30c01d48-1f4e-465e-ae5f-a62663eb3117</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Normally in the&amp;nbsp;&lt;span&gt;HardFault_c_handler default implementation you should have this deducible when debugging or are thrown out to the selected logger backend.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault documentation</title><link>https://devzone.nordicsemi.com/thread/406442?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 12:04:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b93240b5-32cd-4d43-a341-4f3429a29f14</guid><dc:creator>ilyasbsran</dc:creator><description>&lt;p&gt;Hi, Can you explain how you log the error reason and program counter? Do you log them into the flash? If the answer is yes, Which flash did you use?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hard fault documentation</title><link>https://devzone.nordicsemi.com/thread/255237?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 11:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99668775-4c73-455b-a89a-03036d9ee292</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;most likely it is invalid or garbage value popped for a corrupted stack. First thing i would check to see if there was enough RAM space for the application to run.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>