<?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>Hardfault after debug pause and start(NRF52, S132-SD-v2)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10552/hardfault-after-debug-pause-and-start-nrf52-s132-sd-v2</link><description>We have used the first version of the S132 softdevice with the Engineering A version of the nrf52 chip. Now with the newer Engineering B version, we have moved to the second version of the S132 softdevice. Since this version, we started to have some issues</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Dec 2015 11:29:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10552/hardfault-after-debug-pause-and-start-nrf52-s132-sd-v2" /><item><title>RE: Hardfault after debug pause and start(NRF52, S132-SD-v2)</title><link>https://devzone.nordicsemi.com/thread/39268?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2015 11:29:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6710e91a-42ad-4ba9-b523-bb4d02b76c7a</guid><dc:creator>M. Hoffmann</dc:creator><description>&lt;p&gt;Hi Hakon,&lt;/p&gt;
&lt;p&gt;Here is some extra information:&lt;/p&gt;
&lt;p&gt;We checked and we define the DEBUG symbol in the project and the PC = 0x00030706 must have been the HardFault_Handler.&lt;/p&gt;
&lt;p&gt;We found that the warning about the T-bit of the XPSR register has something to do with the implementation of the hardfault handler.&lt;/p&gt;
&lt;p&gt;HardFault_Handler:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;b	.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of the default handler. The warning is not visible when the default handler is used.&lt;/p&gt;
&lt;p&gt;When we used gdb from commandline and used backtrace, this was printed on the console:&lt;/p&gt;
&lt;p&gt;Program received signal SIGTRAP, Trace/breakpoint trap.&lt;/p&gt;
&lt;p&gt;0x000250ec in ?? ()&lt;/p&gt;
&lt;p&gt;(gdb) backtrace&lt;/p&gt;
&lt;p&gt;0  0x000250ec in ?? ()&lt;/p&gt;
&lt;p&gt;1  0x000250d6 in ?? ()&lt;/p&gt;
&lt;p&gt;Backtrace stopped: previous frame identical to this frame (corrupt stack?)&lt;/p&gt;
&lt;p&gt;But the processor did not end up in hardfault! All backtrace addresses are valid addresses that in application code.&lt;/p&gt;
&lt;p&gt;We should check our LPCxpresso settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hardfault after debug pause and start(NRF52, S132-SD-v2)</title><link>https://devzone.nordicsemi.com/thread/39267?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2015 09:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a37132e-d640-4f30-854b-468e883a9fa5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The address you&amp;#39;re referring to is in the application space, which means that this is where the HardFault occurred. If you look at your .map file generated, I would assume this is where your application has placed the implementation of the HardFault_Handler() function in flash. In GDB you should be able to do a &amp;#39;backtrace&amp;#39; cmd to see where the call stack (would recommend -O0 optimization to get this a bit more &amp;quot;readable&amp;quot; format).&lt;/p&gt;
&lt;p&gt;This is not an uncommon feature when stop/starting while debugging. This will essentially halt the MCU core until you resume, but keep peripherals, such as timers/RTC/radio/etc, running. The S132 stack itself will therefore service interrupts in a state which it should not be in, and throw an exception to the application (softdevice_assertion_handler-&amp;gt;assert_nrf_handler-&amp;gt;app_error_handler).&lt;/p&gt;
&lt;p&gt;If you have not set the define &amp;quot;DEBUG&amp;quot; in your project, the default behavior on an assert is a NVIC_SystemReset(), which may give warnings equal to yours. Could you ensure that -DDEBUG is added to your makefile and see if you get a blocking assert?&lt;/p&gt;
&lt;p&gt;Cheers,
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>