<?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>control stuck in hardfault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33704/control-stuck-in-hardfault</link><description>Hi, 
 We are using nrf51822 QFAAH00 with SDK 110 v8.1.0 in our project, the application will hangs or not work when control stuck at address 0x6b0 (sometimes at 0x640) programmer in debug mode, when we check the call Stack it list with NRF_POWER_RAMONx_RAMxON_ONMODE_Msk</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 May 2018 07:49:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33704/control-stuck-in-hardfault" /><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131445?ContentTypeID=1</link><pubDate>Wed, 09 May 2018 07:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbcb5156-4a7e-4a4d-a1e4-327e0e07bad3</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;On for example &lt;a href="https://manned.org/arm-none-eabi-addr2line/2fa07f35"&gt;this&lt;/a&gt; page, you can find the documentation for arm-none-eabi-addr2line, it can be useful to read.&lt;/p&gt;
&lt;p&gt;Please check the address of the hardfault: PC = SP + 0x18 = 0x20002990&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131436?ContentTypeID=1</link><pubDate>Wed, 09 May 2018 06:39:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0667f262-8a55-4514-9b0b-46d4ba93304e</guid><dc:creator>nagaraj</dc:creator><description>&lt;p&gt;I have given random address on command line, command line return with ??:0&amp;nbsp; what this return value indicates?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nagaraj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131337?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 10:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db0cacde-26fc-4ef3-a2e1-6af40e8e2b59</guid><dc:creator>nagaraj</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;what is address have to give in command line, we are using&amp;nbsp;SEGGER_RTT_PRINTF to print the log messages, sometimes control struck in&amp;nbsp;SEGGER_RTT_vprintf function.&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;Nagaraj&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131317?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 08:41:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e333e5dd-2d2e-49ac-9395-c4150a20fb0d</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;arm-none-eabi-addr2line is a command line tool, so no need to use it with IAR. In the build folder from your project, you should find a .elf file, use arm-none-eabi-addr2line &amp;quot;on&amp;quot; that file, like described in my previous answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131305?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 08:10:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:153d1ad1-cb6a-4bb6-a060-d8e32262eec7</guid><dc:creator>nagaraj</dc:creator><description>&lt;p&gt;&lt;span&gt;sd_system_off() never called in our Application. can you please tell me how to use&amp;nbsp;arm-none-eabi-addr2line in iar.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131289?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 07:24:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78f7b962-5f8f-469c-8e87-0b2b13c8a90c</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;R1&amp;nbsp;is pointing at the register POWER --&amp;gt; SYSTEM_OFF.&lt;/p&gt;
&lt;p&gt;Does your application call sd_system_off() in an interrupt context with high priority?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/131283?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 06:48:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f22b40d-5362-4321-b85b-9abc6173158c</guid><dc:creator>nagaraj</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;We using iar workbench, where to add above command line , what is address have to give.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nagaraj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/130931?ContentTypeID=1</link><pubDate>Fri, 04 May 2018 07:29:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3da1c0e9-18a5-4be5-a510-a0611a34398b</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Could you use arm-none-eabi-addr2line.exe to find the line in the application code that results in the hardfault?&lt;/p&gt;
&lt;p&gt;It should be used the following way:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;arm-none-eabi-addr2line -e yourapplication.elf address &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;arm-none-eabi-addr2line -e yourapplication.axf address &lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/130719?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 06:33:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17dbc4df-2037-4890-ae40-5805e25f6ff4</guid><dc:creator>nagaraj</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; We Change&lt;span&gt;&amp;nbsp;SDK 110 v8.1.0&amp;nbsp; to SDK v10.0.0 with softdevice 8.0.0&lt;/span&gt;, &lt;span&gt;&amp;nbsp;here also facing same issue application hangs&amp;nbsp;in call stack&amp;nbsp;&amp;nbsp; NRF_POWER_RAMONx_RAMxON_ONMODE_Msk + 0x6ad, and control stuck in lower address 0x6b4,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;even i try to set O&lt;span&gt;ptimization level&amp;nbsp; to none but result same.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This is happening when no central Device connected to nrf51 module.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;PSP:0xFFFFFFFC&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1020x840/__key/communityserver-discussions-components-files/4/cpu_5F00_registers.PNG" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1020x720/__key/communityserver-discussions-components-files/4/memory_5F00_address.PNG" /&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;NAGARAJ&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: control stuck in hardfault</title><link>https://devzone.nordicsemi.com/thread/129692?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 08:25:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fcc0f12-1985-426a-b9be-aba72355fe71</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;First, which optimization level do you use for the code? For proper debugging using the callstack, the optimization level has to be set to &amp;#39;0&amp;#39;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looking at the register values:&lt;/p&gt;
&lt;p&gt;IPSR Exception number = 0x03 : &lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/CHDBIBGJ.html"&gt;The interrupt is a hardfault&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;LR =&amp;nbsp;&lt;span style="color:#11171a;font-family:&amp;#39;GT Eesti&amp;#39;, Helvetica, Arial, sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;background-color:#ffffff;float:none;"&gt;&lt;span style="font-family:andale mono, monospace;"&gt;0xFFFFFFF1&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp; --&amp;gt; the hardfault comes from an interrupt&lt;/p&gt;
&lt;p&gt;PC = SP + 0x18 = 0x20002990 : address of the instruction that hardfaults. That instruction can be found in the .map file generated by the project. Which instruction is causing the hardfault?&lt;/p&gt;
&lt;p&gt;PSP: What is its value?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>