<?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>Catch HardFault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99340/catch-hardfault</link><description>I am using the Nordik SDK 17 and want to capture all soft and hardware faults. 
 In the sdk_config.h I set: 
 I was able to implement (override) the app_error_handler and app_error_fault_handler. But adding HardFault_process and HardFault_Handler to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 May 2023 07:34:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99340/catch-hardfault" /><item><title>RE: Catch HardFault</title><link>https://devzone.nordicsemi.com/thread/424156?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 07:34:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d58336b0-8ad7-4fdc-aba0-7640e6b6af23</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="111887" url="~/f/nordic-q-a/99340/catch-hardfault/424153"]Unknown function at 0x00000A60[/quote]
&lt;p&gt;&lt;span&gt;0x00000A60 is the hardfault exception handler inside the MBR. It&amp;#39;s normally forwarded to the main application, but&amp;nbsp;will get trapped if breakpoint on hardfault is enabled in SES.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;You can disable it like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1587130782995v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Catch HardFault</title><link>https://devzone.nordicsemi.com/thread/424153?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 07:26:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71628e24-c10b-46db-9cc8-2091ea39e16e</guid><dc:creator>BvdP4Celsius</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I had the lib already added to the project, the&amp;nbsp;&lt;span&gt;HARDFAULT_HANDLER_ENABLED is set in skf_config.h and app_config.h. The preprocessor define&amp;nbsp;DEBUG_NRF was set. Running the program in Segger studio (debug mode) resulted in Unknown function at 0x00000A60&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1683530489878v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am unable to set a breakpoint in the&amp;nbsp;HardFault_process (looks like no code is generated here, optimization is set to off).&amp;nbsp;HardFault_Handler is not called. &lt;br /&gt;Is there anything else I forgot&amp;nbsp;to set?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regard,&lt;br /&gt;Bob&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Catch HardFault</title><link>https://devzone.nordicsemi.com/thread/423791?ContentTypeID=1</link><pubDate>Thu, 04 May 2023 12:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71859c2a-15fa-41cd-94e4-565ddc60bd0b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When&amp;nbsp;adding the&amp;nbsp;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_hardfault.html"&gt;HardFault handling library&lt;/a&gt; to your project&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Add these to your projects:&lt;/p&gt;
&lt;p&gt;$(SDK_ROOT)/components/libraries/hardfault/hardfault_implementation.c&amp;nbsp;&lt;br /&gt;$(SDK_ROOT)/components/libraries/hardfault/nrf52/handler/hardfault_handler_gcc.c&amp;nbsp; (variant here depends on your toolchain)&lt;/p&gt;
&lt;p&gt;And set HARDFAULT_HANDLER_ENABLED to 1 in sdk_config.h, and add DEBUG_NRF in your preprocessor definitions&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>