<?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>MPU Exception Handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84348/mpu-exception-handler</link><description>Hi, 
 I am using the stack guard and need to implement a custom exception handler. Could you please push me in the right direction. 
 Thanks, 
 J</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Feb 2022 17:49:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84348/mpu-exception-handler" /><item><title>RE: MPU Exception Handler</title><link>https://devzone.nordicsemi.com/thread/351401?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 17:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45b898e8-b337-4ef3-9e8d-f7cafdf4d9e4</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Hardfault only occurs after the exception you seek is not handled correctly, methinks, for example if access blocked by SD. Perhaps look at these exception modules, which might give yo whatever functionality is required:&lt;/p&gt;
&lt;p&gt;MemoryManagement_Handler()&lt;/p&gt;
&lt;p&gt;MWU_IRQHandler()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU Exception Handler</title><link>https://devzone.nordicsemi.com/thread/351400?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 17:28:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88e6b000-8197-497a-9024-86113cabf11a</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;Thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU Exception Handler</title><link>https://devzone.nordicsemi.com/thread/351291?ContentTypeID=1</link><pubDate>Fri, 04 Feb 2022 11:12:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:128a9aa5-afb0-49f4-88db-a9b0f6d8fbb8</guid><dc:creator>Sigurd</dc:creator><description>[quote user="JZone"]HardFault_Handler() is triggered&amp;nbsp;by default,&amp;nbsp; which is a catch all for a variety of issues.[/quote]
&lt;p&gt;We have a &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_hardfault.html"&gt;HardFault handling library&lt;/a&gt;&amp;nbsp;in the SDK.&lt;br /&gt;To use it, add these to your projects:&lt;br /&gt;$(SDK_ROOT)/components/libraries/hardfault/hardfault_implementation.c&lt;br /&gt;$(SDK_ROOT)/components/libraries/hardfault/nrf52/handler/hardfault_handler_gcc.c //use the correct file depending on your toolchain&lt;br /&gt;And set HARDFAULT_HANDLER_ENABLED to 1 in sdk_config.h, and optionally add DEBUG_NRF in your preprocessor definitions(adds breakpoint right before the call to &lt;span&gt;HardFault_process()&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;HardFault_process function is weak, and you can implement your own custom&amp;nbsp;HardFault_process function in your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU Exception Handler</title><link>https://devzone.nordicsemi.com/thread/351207?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 18:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bcdbfd9-4c18-49f5-8f3b-72c1d41d2102</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;&lt;span&gt;Thanks, I am familiar with those links. I believe they do not cover custom handlers.&amp;nbsp;&lt;/span&gt;&lt;span&gt;HardFault_Handler() is triggered&amp;nbsp;by default,&amp;nbsp; which is a catch all for a variety of issues.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU Exception Handler</title><link>https://devzone.nordicsemi.com/thread/350984?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 02:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32134f60-ce74-43b1-919a-2a057a13174a</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;Couple of useful links I noted a while back here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58813/stack-guard-and-mpu"&gt;stack-guard-and-mpu&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/47040/stack-overflow-and-stack-guard"&gt;stack-overflow-and-stack-guard&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MPU Exception Handler</title><link>https://devzone.nordicsemi.com/thread/350982?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 00:52:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5d661b7-0c20-4683-9080-f6f1a8ada628</guid><dc:creator>JZone</dc:creator><description>&lt;p&gt;BTW. I do use Soft Device&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>