<?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>DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85731/dfu-and-fatal-error-can-not-re-start-system</link><description>Hi, 
 I&amp;#39;m using SDK17.02 on nRF52810, when my application have an error, it will log &amp;quot;fatal error&amp;quot; but never reset system. BTW, I&amp;#39;m not debugging and just watching the RTT VIWER with j-Link. 
 I will re-power after download also. 
 But when I shield NRF_BREAKPOINT_COND</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Mar 2022 09:58:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85731/dfu-and-fatal-error-can-not-re-start-system" /><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/359062?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 09:58:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc93c97b-adfc-4469-a091-724552cc258b</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/359046?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 09:29:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a0879c9-af58-4855-8d42-2120c3b2fd75</guid><dc:creator>Edvin</dc:creator><description>[quote user="ColorPen"]Ok...Do you mean I can not enable RTT log backend or just only disconnect J-link even I had enabled RTT backend?[/quote]
&lt;p&gt;You can leave RTT logging enabled, but when you open RTT-Viewer, it will be counting as a debug session.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/358891?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 13:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c127aba2-7d52-4224-ab6a-4c15b5a32842</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Ok...Do you mean I can not enable RTT log backend or just only disconnect J-link even I had enabled RTT backend?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/358810?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 09:59:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa1e2b05-e75b-4708-90b5-9cb9d6ba7e99</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ah, sorry that I didn&amp;#39;t catch that before. When I tested, I was using the UART log backend, and not the RTT, which was why I wasn&amp;#39;t seeing the same behavior.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you connect the RTT viewer, it counts as a debug session, because RTT is communicating with the nRF through the debugger. If you use UART as log backend, it will not stop. Otherwise, it will stop on a breakpoint as long as you are using the debugger (unless you comment out the BREAKPOINT_COND).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/358438?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 13:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12333776-f2ac-4ea1-bd13-fc39cab9cb30</guid><dc:creator>Taylor</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/85731/dfu-and-fatal-error-can-not-re-start-system/358387#358387"]You should see that the log says &amp;quot;Fatal error&amp;quot;, and then &amp;quot;System reset&amp;quot; over and over.[/quote]
&lt;p&gt;Yes, that&amp;#39;s my problem. I&amp;#39;m not in debugging session, and just watching RTT Viewer. And my system will stop at &amp;quot;Fatal error&amp;quot; but never showing &amp;quot;System reset&amp;quot;. I can upload my project if you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/358387?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 11:26:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38f3427f-e27a-4035-a176-c6a2ba82baaa</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The NRF_BREAKPOINT_COND is a macro basically acting as a breakpoint when you are debugging. As long as you are not in a debug session, this should not trigger.&lt;/p&gt;
&lt;p&gt;If you test this without a bootloader, one way to verify this is to use e.g. the ble_app_hrs example, (I chose this because it prints the log on UART). If you run this application with an added:&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK(1); in the end of your main() function, right before the main-loop:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for application main entry.
 */
int main(void)
{
    bool erase_bonds;

    // Initialize.
    log_init();
    timers_init();
    buttons_leds_init(&amp;amp;erase_bonds);
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    advertising_init();
    services_init();
    sensor_simulator_init();
    conn_params_init();
    peer_manager_init();

    // Start execution.
    NRF_LOG_INFO(&amp;quot;Heart Rate Sensor example started.&amp;quot;);
    application_timers_start();
    advertising_start(erase_bonds);
	
		APP_ERROR_CHECK(1);

    // Enter main loop.
    for (;;)
    {
        idle_state_handle();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You should see that the log says &amp;quot;Fatal error&amp;quot;, and then &amp;quot;System reset&amp;quot; over and over.&lt;/p&gt;
&lt;p&gt;If you enter a debug session, you should see that it stops on the NRF_BREAKPOINT_COND, and you can e.g. resume the application by pressing the resume button. In this case, it will reset in the NVIC_SystemReset();, and run into the same APP_ERROR_CHECK(1); again. If you exit the debug session in Keil (maybe it requires a manual reset, I don&amp;#39;t remember), then you should see that it will automatically reset after the &amp;quot;Fatal error&amp;quot; again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/358310?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 02:07:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb5c9324-0c64-4d79-b3ef-f79e044f6637</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/error1-_2800_2_2900_.png" /&gt;&lt;/p&gt;
&lt;p&gt;I need to do like this the system would&amp;nbsp;be reseted when occured an error.&lt;/p&gt;
&lt;p&gt;I do not care what&amp;#39;s the err_code, because I made an error on purpose just like initialize uart twice.&lt;/p&gt;
&lt;p&gt;Shouldn&amp;#39;t it be restarting when the system fails? So does DFU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Fatal Error can not  re-start system</title><link>https://devzone.nordicsemi.com/thread/357996?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 14:44:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79612629-56ee-49f6-a233-77c8e8cfc2df</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Try defining &amp;quot;DEBUG&amp;quot; in your preprocessor definitions, and then keep monitoring the RTT viewer. If you are not sure how to do that, please let me know what compiler/IDE you are using.&amp;nbsp;&lt;/p&gt;
[quote user=""]But when I shield&amp;nbsp;NRF_BREAKPOINT_COND, my system will reset successfully.[/quote]
&lt;p&gt;What do you mean by shielding NRF_BREAKPOINT_COND?&lt;/p&gt;
&lt;p&gt;What does the log say when you add &amp;quot;DEBUG&amp;quot; to your preprocessor definitions? It will probably point to some location in your code where you will find an APP_ERROR_CHECK(err_code). What is the err_code, and what function returned it?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>