<?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>App Freezing randomly</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70929/app-freezing-randomly</link><description>Dear All, 
 We are using nrf52480, we our app is simply scanning for Near By Ble, and if the UUID of a ble Matches it send the data to another controller through Lib Uart Serial port. 
 1) Main controller sends a command to the BLE through UART and tells</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Feb 2021 00:03:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70929/app-freezing-randomly" /><item><title>RE: App Freezing randomly</title><link>https://devzone.nordicsemi.com/thread/292351?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 00:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bae70089-58f5-417f-85c3-a0f6dbbbce75</guid><dc:creator>Nadeem</dc:creator><description>&lt;p&gt;Thanks for ur great support&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Freezing randomly</title><link>https://devzone.nordicsemi.com/thread/291699?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 08:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b30ac7b6-b4e7-4685-a941-e69ef3c68011</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The program counter (PC) tells us at what address the CPU executing code from. Now, the next step is to find out where this address is in your program code. One way to find out is by using the dissamber view in your IDE as shown below. Maybe the program is stuck inside the app_error_fault_handler().&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Segger embedded studio&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611822617594v1.jpeg" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Freezing randomly</title><link>https://devzone.nordicsemi.com/thread/291440?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 08:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29595cdb-9d52-473c-85f6-f91b1e7ffa70</guid><dc:creator>Nadeem</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611736579690v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is what i got... but what does it mean?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Freezing randomly</title><link>https://devzone.nordicsemi.com/thread/291420?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 06:58:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e91f60e4-f132-4ccc-9a80-80fb7b8bcd5d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Nadeem,&lt;/p&gt;
&lt;p&gt;nrfjprog is included in our &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download"&gt;nRF Command Line Tools&lt;/a&gt; package, so you need to make sure you have installed this package first. Once it is installed you can run the command from terminal window as the screenshot below shows.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611730638388v1.png" alt=" " /&gt;&lt;/p&gt;
[quote user="Nadeem"]Do you just put this code in my code, do i need to register this handler anywhere or is it automaticaly taken care of..[/quote]
&lt;p&gt;&amp;nbsp;yes, you can place it anywhere in your code. This will replace the default &amp;quot;weak&amp;quot; hardfault handler implementation in the startup file.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Freezing randomly</title><link>https://devzone.nordicsemi.com/thread/291331?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 15:12:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:832689fc-424d-4dbe-ba99-6d320c9ea594</guid><dc:creator>Nadeem</dc:creator><description>&lt;p&gt;Dear Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks allot for your reply..&lt;/p&gt;
&lt;p&gt;Please can you explain more how to do this&amp;nbsp;&lt;span&gt;nrfjprog --readregs?&amp;nbsp; I have no&amp;nbsp;idea where to start with this command? Is there a command line in Segger?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have been trying to figure out how to do what your suggesting but whenever i connect to the ble it reset its .. So the error is lost. It will be greatly appreciated if you can explain more.&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 for the HardFault Code..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;void HardFault_Handler(void)&lt;br /&gt;{&lt;br /&gt; /* Perform a system reset to recover from fault */&lt;br /&gt; NVIC_SystemReset();&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you just put this code in my code, do i need to register this handler anywhere or is it automaticaly taken care of..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanking you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Nadeem Jamal&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Freezing randomly</title><link>https://devzone.nordicsemi.com/thread/291277?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 13:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c5d15aa-7153-4da0-a913-2ad09a4170f9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you attach the debugger after the device has crashed to see where the program got stuck (e.g., by running &amp;quot;nrfjprog --readregs&amp;quot;)? A &amp;quot;crash&amp;quot; will usually cause the program to either enter the app_error_fault handler (&lt;span&gt;&lt;a title="Error module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_error.html?cp=7_1_3_13"&gt;Error module&lt;/a&gt;&lt;/span&gt;) or the hardfault exception handler (&lt;span&gt;&lt;a title="HardFault handling library" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_hardfault.html?cp=7_1_3_22"&gt;HardFault handling library&lt;/a&gt;&lt;/span&gt;)..&lt;/p&gt;
&lt;p&gt;If you just want the device to automaitcally reset if a fault is triggered, then you can define the hardfault interrupt handler like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void HardFault_Handler(void)
{
    /* Perform a system reset to recover from fault */
    NVIC_SystemReset();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>