<?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>How to find what is causing APP_ERROR:ERROR:FATAL</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70906/how-to-find-what-is-causing-app_error-error-fatal</link><description>After I write bonding data to flash memory (SoftDevice has been disabled before the write) I get an APP_ERROR:ERROR:FATAL. But I do not know what is causing it. I do an NRF_LOG_DEBUG(&amp;quot;Flash written\r\n&amp;quot;); after the flash write is done, and it is displayed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jan 2021 15:12:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70906/how-to-find-what-is-causing-app_error-error-fatal" /><item><title>RE: How to find what is causing APP_ERROR:ERROR:FATAL</title><link>https://devzone.nordicsemi.com/thread/291332?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 15:12:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6542f9ba-15df-45d0-ace3-6159c86029be</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;I just added the preprocessor in that ugly line. What I found was that the method sd_app_evt_wait() returns error code 2 which is&amp;nbsp;NRF_ERROR_SVC_HANDLER_MISSING&lt;strong&gt;. I did not check for any error codes on this method because the documentation states it only returns NRF_SUCCESS.&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Opps, error 2 is&amp;nbsp;NRF_ERROR_SOFTDEVICE_NOT_ENABLED. Of course it is disabled. I disabled it. So how do I handle that final for(;;) loop? Should I just return and exit main?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find what is causing APP_ERROR:ERROR:FATAL</title><link>https://devzone.nordicsemi.com/thread/291310?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 14:14:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf8eb4db-e7a9-4fbe-8985-356b3fa17cf4</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;My file does not have that. s130 for soft device and SDK 12.3.0.&lt;/p&gt;
&lt;p&gt;My file looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;quot;app_error.h&amp;quot;

#define NRF_LOG_MODULE_NAME &amp;quot;APP_ERROR&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
/*lint -save -e14 */

/**
 * Function is implemented as weak so that it can be overwritten by custom application error handler
 * when needed.
 */
__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
{
    NRF_LOG_ERROR(&amp;quot;Fatal\r\n&amp;quot;);
    NRF_LOG_FINAL_FLUSH();
    // On assert, the system can only recover with a reset.
#ifndef DEBUG
    NVIC_SystemReset();
#else
    app_error_save_and_stop(id, pc, info);
#endif // DEBUG
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It looks like I have to set a DEBUG preprocessor somewhere. The preprocessor list in Keil is one of the most&amp;nbsp;user-unfriendly interfaces I have seen. One line of limited size where one has to enter one after the other. Horrible. Perhaps there is another way?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to find what is causing APP_ERROR:ERROR:FATAL</title><link>https://devzone.nordicsemi.com/thread/291301?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 13:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:839ea42f-a76a-4c3a-9788-d4d5c524ae0e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Enable the DEBUG preprecessor flagIf you can start your program in debugger, you should be able to see the call trace when the hit the breakpoint of the error like this&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/617x397/__key/communityserver-discussions-components-files/4/pastedimage1611669547049v2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>